From a4924de3136289d10cabbf2f61a228387d44ded7 Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期四, 07 十一月 2019 13:48:36 +0800 Subject: [PATCH] Merge branch 'dev-tzy' into DEV_GXC --- ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLightSettionForm.cs | 80 ++++++++++++++++++---------------------- 1 files changed, 36 insertions(+), 44 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLightSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLightSettionForm.cs index 220071e..efd7e12 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLightSettionForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLightSettionForm.cs @@ -47,11 +47,8 @@ //璁剧疆鏍囬淇℃伅 base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uBackLight)); - HdlThreadLogic.Current.RunThread(() => - { - //鍒濆鍖栦腑閮ㄦ帶浠� - this.InitMiddleFrame(); - }); + //鍒濆鍖栦腑閮ㄦ帶浠� + this.InitMiddleFrame(); } /// <summary> @@ -65,34 +62,31 @@ { return; } - HdlThreadLogic.Current.RunMain(() => + //娓呯┖bodyFrame + this.ClearBodyFrame(); + + //鍚勭鑳屽厜鐏殑瀹瑰櫒 + var frameLinght = new FrameLayout(); + frameLinght.Height = Application.GetRealHeight(1003); + frameLinght.Y = Application.GetRealHeight(170); + bodyFrameLayout.AddChidren(frameLinght); + + //娣诲姞鑺傝兘妯″紡 + this.AddEnergyConservationRow(frameLinght); + //娣诲姞鐐瑰嚮鍓嶏紝浜害杩涘害鏉� + this.AddBeforeClickProgress(frameLinght); + //娣诲姞鐐瑰嚮鍚庯紝浜害杩涘害鏉� + this.AddAfterClickProgress(frameLinght); + + //淇濆瓨 + var btnSave = new BottomClickButton(); + btnSave.TextID = R.MyInternationalizationString.uSave; + bodyFrameLayout.AddChidren(btnSave); + btnSave.ButtonClickEvent += (sender, e) => { - //娓呯┖bodyFrame - this.ClearBodyFrame(); - - //鍚勭鑳屽厜鐏殑瀹瑰櫒 - var frameLinght = new FrameLayout(); - frameLinght.Height = Application.GetRealHeight(1003); - frameLinght.Y = Application.GetRealHeight(170); - bodyFrameLayout.AddChidren(frameLinght); - - //娣诲姞鑺傝兘妯″紡 - this.AddEnergyConservationRow(frameLinght); - //娣诲姞鐐瑰嚮鍓嶏紝浜害杩涘害鏉� - this.AddBeforeClickProgress(frameLinght); - //娣诲姞鐐瑰嚮鍚庯紝浜害杩涘害鏉� - this.AddAfterClickProgress(frameLinght); - - //淇濆瓨 - var btnSave = new BottomClickButton(); - btnSave.TextID = R.MyInternationalizationString.uSave; - bodyFrameLayout.AddChidren(btnSave); - btnSave.ButtonClickEvent += (sender, e) => - { - //淇濆瓨闈㈡澘鏁版嵁 - this.SavePanelData(); - }; - }); + //淇濆瓨闈㈡澘鏁版嵁 + this.SavePanelData(); + }; } #endregion @@ -141,14 +135,14 @@ //褰撳墠浜害 var btnProgressView1 = new NormalViewControl(200, 49, true); btnProgressView1.X = ControlCommonResourse.XXLeft; - btnProgressView1.Y = Application.GetRealHeight(161); + btnProgressView1.Y = Application.GetRealHeight(164); btnProgressView1.TextSize = 12; btnProgressView1.TextColor = UserCenterColor.Current.TextGrayColor1; btnProgressView1.TextID = R.MyInternationalizationString.uNowLuminance; frameBack.AddChidren(btnProgressView1); var btnProgress1 = new NormalViewControl(200, 49, true); btnProgress1.X = Application.GetRealWidth(222); - btnProgress1.Y = Application.GetRealHeight(158); + btnProgress1.Y = Application.GetRealHeight(164); btnProgress1.TextSize = 12; btnProgress1.TextColor = UserCenterColor.Current.TextGrayColor1; btnProgress1.Text = energyModeInfo.level + "%"; @@ -297,13 +291,12 @@ uint backColor = this.GetColorByRGB((byte)R1, (byte)G1, (byte)B1); var btnColor = new NormalViewControl(Application.GetMinRealAverage(69), Application.GetMinRealAverage(69), false); btnColor.X = btnColorView.Right + Application.GetRealHeight(23); - btnColor.Radius = (uint)Application.GetMinRealAverage(69); + btnColor.Radius = (uint)Application.GetMinRealAverage(69) / 2; btnColor.BackgroundColor = backColor; frameColor.AddChidren(btnColor, ChidrenBindMode.BindEventOnly); var btnRight = new NormalViewControl(Application.GetMinRealAverage(58), Application.GetMinRealAverage(58), false); btnRight.UnSelectedImagePath = "Item/Next.png"; - btnRight.BackgroundColor = UserCenterColor.Current.Green; btnRight.X = frameColor.Width - Application.GetMinRealAverage(58); frameColor.AddChidren(btnRight, ChidrenBindMode.BindEventOnly); btnRight.Y += Application.GetMinRealAverage(8); @@ -425,13 +418,12 @@ uint backColor = this.GetColorByRGB((byte)R1, (byte)G1, (byte)B1); var btnColor = new NormalViewControl(Application.GetMinRealAverage(69), Application.GetMinRealAverage(69), false); btnColor.X = btnColorView.Right + Application.GetRealHeight(23); - btnColor.Radius = (uint)Application.GetMinRealAverage(69); + btnColor.Radius = (uint)Application.GetMinRealAverage(69) / 2; btnColor.BackgroundColor = backColor; frameColor.AddChidren(btnColor, ChidrenBindMode.BindEventOnly); var btnRight = new NormalViewControl(Application.GetMinRealAverage(58), Application.GetMinRealAverage(58), false); btnRight.UnSelectedImagePath = "Item/Next.png"; - btnRight.BackgroundColor = UserCenterColor.Current.Green; btnRight.X = frameColor.Width - Application.GetMinRealAverage(58); frameColor.AddChidren(btnRight, ChidrenBindMode.BindEventOnly); btnRight.Y += Application.GetMinRealAverage(8); @@ -468,7 +460,7 @@ //寮�鍚繘搴︽潯 this.ShowProgressBar(); //浜害璋冭妭(浠栦滑璇撮殢渚挎嬁涓�璺洖璺氨琛屼簡) - linghtLevelInfo = await HdlDevicePanelLogic.Current.GetDeviceLightSettion(panelDevice); + linghtLevelInfo = await HdlPanelLogic.Current.GetDeviceLightSettion(panelDevice); if (linghtLevelInfo == null) { //鍏抽棴杩涘害鏉� @@ -476,14 +468,14 @@ return false; } //鑺傝兘妯″紡(浠栦滑璇撮殢渚挎嬁涓�璺洖璺氨琛屼簡) - energyModeInfo = await HdlDevicePanelLogic.Current.GetDeviceEnergyConservationMode(panelDevice); + energyModeInfo = await HdlPanelLogic.Current.GetDeviceEnergyConservationMode(panelDevice); if (energyModeInfo == null) { //鍏抽棴杩涘害鏉� this.CloseProgressBar(ShowReLoadMode.YES); return false; } - keyColorData = await HdlDevicePanelLogic.Current.GetPanelEpointColorInfo(panelDevice); + keyColorData = await HdlPanelLogic.Current.GetPanelEpointColorInfo(panelDevice); if (this.keyColorData == null) { //鍏抽棴杩涘害鏉� @@ -507,21 +499,21 @@ { this.ShowProgressBar(); //浜害璋冭妭鏇存敼(浠栦滑璇撮殢渚夸竴涓洖璺氨琛�) - var result = await HdlDevicePanelLogic.Current.SetDeviceLightSettion(panelDevice, linghtLevelInfo.panelDirectionsLevel, linghtLevelInfo.panelBacklightLevel); + var result = await HdlPanelLogic.Current.SetDeviceLightSettion(panelDevice, linghtLevelInfo.panelDirectionsLevel, linghtLevelInfo.panelBacklightLevel); if (result == false) { this.CloseProgressBar(); return; } //鑺傝兘妯″紡淇敼(浠栦滑璇撮殢渚夸竴涓洖璺氨琛�) - result = await HdlDevicePanelLogic.Current.SetDeviceEnergyConservationMode(panelDevice, energyModeInfo.enable, energyModeInfo.time, energyModeInfo.level); + result = await HdlPanelLogic.Current.SetDeviceEnergyConservationMode(panelDevice, energyModeInfo.enable, energyModeInfo.time, energyModeInfo.level); this.CloseProgressBar(); if (result == false) { return; } //璁剧疆鎸夐敭闈㈡澘鎸囧畾绔偣鐨勩�愭寚绀虹伅寮�鍏抽鑹层�戠殑淇℃伅 - result = await HdlDevicePanelLogic.Current.SetPanelEpointColorInfo(panelDevice, this.keyColorData); + result = await HdlPanelLogic.Current.SetPanelEpointColorInfo(panelDevice, this.keyColorData); if (result == false) { return; -- Gitblit v1.8.0