From 9508510f0b27da3278fa1161eb2ba3dd1e3e2030 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期三, 26 七月 2023 13:14:00 +0800 Subject: [PATCH] 2023年07月26日13:12:21 --- HDL_ON/UI/UI0-Public/TopViewDiv.cs | 91 +++++++++++++++++++++++++-------------------- 1 files changed, 50 insertions(+), 41 deletions(-) diff --git a/HDL_ON/UI/UI0-Public/TopViewDiv.cs b/HDL_ON/UI/UI0-Public/TopViewDiv.cs index e20fdc3..572cffe 100644 --- a/HDL_ON/UI/UI0-Public/TopViewDiv.cs +++ b/HDL_ON/UI/UI0-Public/TopViewDiv.cs @@ -26,6 +26,7 @@ /// </summary> Button btnBack; + public Button btnTilte; /// <summary> /// 鏍囬鍚嶇О /// </summary> @@ -79,12 +80,12 @@ /// </summary> /// <param name="frame"></param> /// <param name="tilte"></param> - public void LoadTopView() + public void LoadTopView(uint color = CSS_Color.TopViewColor)//,Action<List<Function> action { contentView = new FrameLayout() { Height = Application.GetRealHeight(64), - BackgroundColor = CSS_Color.TopViewColor, + BackgroundColor = color, }; baseView.AddChidren(contentView); @@ -98,7 +99,7 @@ }; contentView.AddChidren(btnBackIcon); - Button btnTilte = new Button() + btnTilte = new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(30), @@ -110,6 +111,7 @@ Text = title }; contentView.AddChidren(btnTilte); + btnBack = new Button() @@ -169,11 +171,15 @@ var btnSetting = new Button() { - X = Application.GetRealWidth(337), - Y = Application.GetRealHeight(29), - Width = Application.GetMinRealAverage(28), - Height = Application.GetMinRealAverage(28), - UnSelectedImagePath = "FunctionIcon/Light/LightScene/SetLightSceneIcon.png", + X = Application.GetRealWidth(337-37), + Y = Application.GetRealHeight(20), + Width = Application.GetMinRealAverage(28+37), + Height = Application.GetMinRealAverage(28+19), + TextID = StringId.CombinedDimming, + TextSize = CSS_FontSize.TextFontSize, + TextColor = CSS_Color.MainColor, + IsMoreLines = true + //UnSelectedImagePath = "FunctionIcon/Light/LightScene/SetLightSceneIcon.png", }; contentView.AddChidren(btnSetting); @@ -219,6 +225,8 @@ }; } + + /// <summary> /// 鎴块棿鏍囬鍖哄煙 /// </summary> @@ -255,17 +263,17 @@ /// <param name="room"></param> /// <param name="skipAction"></param> /// <param name="text"></param> - public void LoadTopView_SettingText(Action skipAction,string text) + public void LoadTopView_SettingText(Action skipAction,string text,bool isDelColor = false) { LoadTopView(); var btnSetting = new Button() { - X = Application.GetRealWidth(337-100), + X = Application.GetRealWidth(355-100), Y = Application.GetRealHeight(29), Width = Application.GetMinRealAverage(100), Height = Application.GetMinRealAverage(28), - TextColor = CSS_Color.MainColor, + TextColor = isDelColor ?CSS_Color.WarningColor: CSS_Color.MainColor, TextSize = CSS_FontSize.TextFontSize, TextAlignment = TextAlignment.CenterRight, Text = text, @@ -334,9 +342,9 @@ /// </summary> /// <param name="frame"></param> /// <param name="tilte"></param> - public void LoadTopView_Add3tyIot(string type, Action<string, string> callBack) + public void LoadTopView_Add3tyIot( Action<string, string> callBack) { - LoadTopView(); + LoadTopView(CSS_Color.MainBackgroundColor); var btnAddIcon = new Button() { @@ -344,39 +352,40 @@ Y = Application.GetRealHeight(29), Width = Application.GetMinRealAverage(28), Height = Application.GetMinRealAverage(28), - UnSelectedImagePath = "Public/AddIcon.png", + UnSelectedImagePath = "Public/LinkIotIcon.png", }; contentView.AddChidren(btnAddIcon); btnAddIcon.MouseUpEventHandler += (sender, e) => { - if (type == "floors") - { - Action<string> callBackAction = (floorName) => - { - callBack("add", floorName); - }; - string newFloorName = "1F"; - for (int i = 0; i < SpatialInfo.CurrentSpatial.FloorList.Count + 1;) - { - newFloorName = ++i + "F"; - if (null == SpatialInfo.CurrentSpatial.FloorList.Find((obj) => obj.roomName == newFloorName)) - { - break; - } - } - var fs = new List<string>(); - foreach (var f in SpatialInfo.CurrentSpatial.FloorList) - { - fs.Add(f.roomName); - } - new PublicAssmebly().LoadDialog_EditParater(StringId.AddFloors, newFloorName, callBackAction, StringId.FloorNameCannotBeEmpty, - StringId.AddFloorFailed_FloorAlreadyExist, fs); - } - else - { - callBack("", ""); - } + var page = new Iot_BrandListPage(); + MainPage.BasePageView.AddChidren(page); + page.LoadPage(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + }; + } + + + /// <summary> + /// 鍚慺ramelayout娣诲姞椤堕儴鍖哄煙,绗笁鏂瑰钩鍙� + /// </summary> + public void LoadTopView_3tyIot(Action action) + { + LoadTopView(CSS_Color.MainBackgroundColor); + + var btnAddIcon = new Button() + { + X = Application.GetRealWidth(337), + Y = Application.GetRealHeight(29), + Width = Application.GetMinRealAverage(28), + Height = Application.GetMinRealAverage(28), + UnSelectedImagePath = "Public/Iot_agreement_icon.png", + }; + contentView.AddChidren(btnAddIcon); + + btnAddIcon.MouseUpEventHandler += (sender, e) => + { + action(); }; } -- Gitblit v1.8.0