From 21923381bdac04d1633b168c97accc81f0898d84 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期一, 23 三月 2020 16:45:31 +0800 Subject: [PATCH] 上传版本 --- ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueButtonSettionForm.cs | 54 ++++++++++++++++++++++-------------------------------- 1 files changed, 22 insertions(+), 32 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueButtonSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueButtonSettionForm.cs index f381cb9..9c1b5b4 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueButtonSettionForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueButtonSettionForm.cs @@ -1,4 +1,5 @@ -锘縰sing System; +锘縰sing Shared.Common; +using System; using System.Collections.Generic; using System.Text; using ZigBee.Device; @@ -173,8 +174,6 @@ this.AddBindRow(); //娣诲姞鑳屽厜鐏 this.AddBackLightRow(); - //娣诲姞鎺ヨ繎鎰熷簲琛� - this.AddProximityInductionRow(); //鍒濆鍖栨甯冨畬鎴� tableContr.FinishInitControl(bodyFrameLayout, this.listview); @@ -273,34 +272,25 @@ btnLight.AddRightArrow(); btnLight.ButtonClickEvent += (sender, e) => { - var form = new PanelBackLightSettionForm(); - form.AddForm((Panel)nowSelectDevice); + List<CommonDevice> listNewDevice = new List<CommonDevice> { }; + listNewDevice.Add((Panel)nowSelectDevice); + var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(listNewDevice); + //濡傛灉璁惧鏄柟鎮﹀紑鎺ц澶囷紝鑳屽厜鐏〉闇�瑕佹粦鍔ㄤ笖鏈夋帴杩戞劅搴斿姛鑳� + if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueTwo + || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFour + || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueEight) + { + var form = new PanelBackLighWithSensorForm(); + form.AddForm((Panel)nowSelectDevice); + } + else + { + //涓嶅甫鎺ヨ繎鎰熷簲鐨� + var form = new PanelBackLightSettionForm(); + form.AddForm((Panel)nowSelectDevice); + } }; } - } - - #endregion - - #region 鈻� 鎺ヨ繎鎰熷簲___________________________ - - /// <summary> - /// 娣诲姞鎺ヨ繎鎰熷簲琛� - /// </summary> - private void AddProximityInductionRow() - { - //鎺ヨ繎鎰熷簲 - var rowContr = new FrameRowControl(listview.rowSpace / 2); - rowContr.UseClickStatu = false; - listview.AddChidren(rowContr); - rowContr.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uProximityInduction), 600); - //搴曠嚎 - rowContr.AddBottomLine(); - //寮�鍏� - var btnSwitch = rowContr.AddMostRightSwitchIcon(); - btnSwitch.ButtonClickEvent += (sender, e) => - { - btnSwitch.IsSelected = !btnSwitch.IsSelected; - }; } #endregion @@ -357,19 +347,19 @@ if (listOffSwitch.Count == 8) { //鍏寜閿潰鏉� - btnPic.UnSelectedImagePath = "Device/PanelFangyueEightButtonTable.png"; + btnPic.UnSelectedImagePath = "DeviceItem/PanelFangyueEightButtonTable.png"; this.InitEightButtonPanelIcon(frameBorder, listOffSwitch); } else if (listOffSwitch.Count == 4) { //鍥涙寜閿潰鏉� - btnPic.UnSelectedImagePath = "Device/PanelFangyueFourButtonTable.png"; + btnPic.UnSelectedImagePath = "DeviceItem/PanelFangyueFourButtonTable.png"; this.InitFourButtonPanelIcon(frameBorder, listOffSwitch); } else { //浜屾寜閿潰鏉� - btnPic.UnSelectedImagePath = "Device/PanelFangyueTwoButtonTable.png"; + btnPic.UnSelectedImagePath = "DeviceItem/PanelFangyueTwoButtonTable.png"; this.InitTwoButtonPanelIcon(frameBorder, listOffSwitch); } } -- Gitblit v1.8.0