From 25429f085093d89d543a0b90e30d0d62d1b7dac9 Mon Sep 17 00:00:00 2001 From: hxb <hxb@hdlchina.com.cn> Date: 星期二, 30 八月 2022 09:37:38 +0800 Subject: [PATCH] 合并了IOS的代码 --- ZigbeeApp/Shared/Phone/UserCenter/Device/Relay/RelayNationalBackLightSettionForm.cs | 59 +++++++++++++++++++++++++++++++++++++++-------------------- 1 files changed, 39 insertions(+), 20 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Relay/RelayNationalBackLightSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Relay/RelayNationalBackLightSettionForm.cs index 75fc9ce..e531000 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Relay/RelayNationalBackLightSettionForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Relay/RelayNationalBackLightSettionForm.cs @@ -25,6 +25,10 @@ /// </summary> private List<CommonDevice> listDevice = null; /// <summary> + /// 璁惧绫诲瀷 + /// </summary> + private DeviceEnumInfo deviceEnumInfo = null; + /// <summary> /// 鏁版嵁鏄惁鍙樻洿 /// </summary> private bool valueChanged = false; @@ -40,7 +44,8 @@ { this.ScrollEnabled = false; - this.listDevice = HdlDeviceCommonLogic.Current.GetDevicesByMac(i_deviceMac); + this.listDevice = Common.LocalDevice.Current.GetDevicesByMac(i_deviceMac); + this.deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(this.listDevice); //璁剧疆澶撮儴淇℃伅 base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uBackLight)); @@ -65,7 +70,7 @@ //鐐瑰嚮鐘舵�� var btnClickStatu = new NormalViewControl(600, 49, true); - btnClickStatu.X = HdlControlResourse.XXLeft; + btnClickStatu.X = ControlCommonResourse.XXLeft; btnClickStatu.Y = Application.GetRealHeight(207); btnClickStatu.TextSize = 12; btnClickStatu.TextColor = UserCenterColor.Current.TextGrayColor3; @@ -74,15 +79,20 @@ //鍚勭鑳屽厜鐏殑瀹瑰櫒 var frameLinght = new FrameLayout(); - frameLinght.Height = Application.GetRealHeight(748); + frameLinght.Height = Application.GetRealHeight(311 + 23); frameLinght.Y = Application.GetRealHeight(279); frameLinght.BackgroundColor = UserCenterColor.Current.White; bodyFrameLayout.AddChidren(frameLinght); //娣诲姞1-6骞叉帴鐐圭殑鑳屽厜鐏繘搴︽潯 this.AddSixDryContactProgress(frameLinght); - //绗竷骞叉帴鐐圭殑鑳屽厜鐏繘搴︽潯 - this.AddSevenDryContactProgress(frameLinght); + //濡傛灉鏄浗鏍�3璺�10A缁х數鍣ㄥ皬妯″潡,瀹冩病鏈夌涓冨共鎺ョ偣 + if (this.deviceEnumInfo.ConcreteType != Common.DeviceConcreteType.Relay_NationalThreeLoadTenA) + { + //绗竷骞叉帴鐐圭殑鑳屽厜鐏繘搴︽潯 + frameLinght.Height = Application.GetRealHeight(748); + this.AddSevenDryContactProgress(frameLinght); + } //娣诲姞鑺傝兘妯″紡 this.AddEnergyConservationRow(btnClickStatu, frameLinght); @@ -146,7 +156,7 @@ btnSwitch.IsSelected = !btnSwitch.IsSelected; energyModeInfo.enable = btnSwitch.IsSelected; //灞曞紑鎴栬�呯缉灏忕殑楂樺害 - var value = Application.GetRealHeight(259 + 23) + HdlControlResourse.ListViewRowHeight; + var value = Application.GetRealHeight(259 + 23) + ControlCommonResourse.ListViewRowHeight; if (btnSwitch.IsSelected == true) { frameBack.Height += value; @@ -172,7 +182,7 @@ } //褰撳墠浜害 - btnProgressView1.X = HdlControlResourse.XXLeft; + btnProgressView1.X = ControlCommonResourse.XXLeft; btnProgressView1.Y = Application.GetRealHeight(161); btnProgressView1.TextSize = 12; btnProgressView1.TextColor = UserCenterColor.Current.TextGrayColor1; @@ -202,7 +212,7 @@ seekBar1.Progress = energyModeInfo.level; var btnTemp1 = new NormalViewControl(200, 49, true); - btnTemp1.X = HdlControlResourse.XXLeft; + btnTemp1.X = ControlCommonResourse.XXLeft; btnTemp1.Y = Application.GetRealHeight(325); btnTemp1.TextSize = 12; btnTemp1.TextColor = UserCenterColor.Current.TextGrayColor3; @@ -221,7 +231,7 @@ if (energyModeInfo.enable == true) { //灞曞紑鎴栬�呯缉灏忕殑楂樺害 - var value = Application.GetRealHeight(259 + 23) + HdlControlResourse.ListViewRowHeight; + var value = Application.GetRealHeight(259 + 23) + ControlCommonResourse.ListViewRowHeight; frameBack.Height += value; btnClickStatu.Y += value; frameLinght.Y += value; @@ -327,7 +337,7 @@ private void AddSixDryContactProgress(FrameLayout frameLinght) { var btnProgressView1 = new NormalViewControl(200, 49, true); - btnProgressView1.X = HdlControlResourse.XXLeft; + btnProgressView1.X = ControlCommonResourse.XXLeft; btnProgressView1.Y = Application.GetRealHeight(29); btnProgressView1.TextSize = 12; btnProgressView1.TextColor = UserCenterColor.Current.TextGrayColor1; @@ -340,6 +350,11 @@ btnProgress1.TextColor = UserCenterColor.Current.TextGrayColor1; btnProgress1.Text = linghtLevelInfo.panelDirectionsLevel + "%"; frameLinght.AddChidren(btnProgress1); + //濡傛灉鏄浗鏍�3璺�10A缁х數鍣ㄥ皬妯″潡,鍒欎负1-4 + if (this.deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.Relay_NationalThreeLoadTenA) + { + btnProgressView1.Text = "Dry1-4"; + } //杩涘害鏉� var seekBar1 = new SeekBarControl(); @@ -356,7 +371,7 @@ seekBar1.Progress = linghtLevelInfo.panelDirectionsLevel; var btnTemp1 = new NormalViewControl(200, 49, true); - btnTemp1.X = HdlControlResourse.XXLeft; + btnTemp1.X = ControlCommonResourse.XXLeft; btnTemp1.Y = Application.GetRealHeight(193); btnTemp1.TextSize = 12; btnTemp1.TextColor = UserCenterColor.Current.TextGrayColor3; @@ -372,12 +387,16 @@ btnTemp2.Text = "100%"; frameLinght.AddChidren(btnTemp2); - //绾� - var btnLine = new NormalViewControl(Application.GetRealWidth(965), HdlControlResourse.BottomLineHeight, false); - btnLine.Y = Application.GetRealHeight(311); - btnLine.Gravity = Gravity.CenterHorizontal; - btnLine.BackgroundColor = UserCenterColor.Current.ButtomLine; - frameLinght.AddChidren(btnLine); + //濡傛灉涓嶆槸鍥芥爣3璺�10A缁х數鍣ㄥ皬妯″潡 + if (this.deviceEnumInfo.ConcreteType != Common.DeviceConcreteType.Relay_NationalThreeLoadTenA) + { + //绾� + var btnLine = new NormalViewControl(Application.GetRealWidth(965), ControlCommonResourse.BottomLineHeight, false); + btnLine.Y = Application.GetRealHeight(311); + btnLine.Gravity = Gravity.CenterHorizontal; + btnLine.BackgroundColor = UserCenterColor.Current.ButtomLine; + frameLinght.AddChidren(btnLine); + } //濡傛灉褰撳墠鏄睍绀烘ā鏉� if (Common.Config.Instance.Home.IsShowTemplate == true) @@ -397,7 +416,7 @@ private void AddSevenDryContactProgress(FrameLayout frameLinght) { var btnProgressView1 = new NormalViewControl(200, 49, true); - btnProgressView1.X = HdlControlResourse.XXLeft; + btnProgressView1.X = ControlCommonResourse.XXLeft; btnProgressView1.Y = Application.GetRealHeight(369); btnProgressView1.TextSize = 12; btnProgressView1.TextColor = UserCenterColor.Current.TextGrayColor1; @@ -426,7 +445,7 @@ seekBar1.Progress = linghtLevelInfo.panelBacklightLevel; var btnTemp1 = new NormalViewControl(200, 49, true); - btnTemp1.X = HdlControlResourse.XXLeft; + btnTemp1.X = ControlCommonResourse.XXLeft; btnTemp1.Y = Application.GetRealHeight(533); btnTemp1.TextSize = 12; btnTemp1.TextColor = UserCenterColor.Current.TextGrayColor3; @@ -443,7 +462,7 @@ frameLinght.AddChidren(btnTemp2); //绾� - var btnLine = new NormalViewControl(Application.GetRealWidth(965), HdlControlResourse.BottomLineHeight, false); + var btnLine = new NormalViewControl(Application.GetRealWidth(965), ControlCommonResourse.BottomLineHeight, false); btnLine.Gravity = Gravity.CenterHorizontal; btnLine.Y = Application.GetRealHeight(651); btnLine.BackgroundColor = UserCenterColor.Current.ButtomLine; -- Gitblit v1.8.0