From b304a3c78df10b6e9b867e677d3e4719f1d4a7aa Mon Sep 17 00:00:00 2001 From: WJC <wjc@hdlchina.com.cn> Date: 星期二, 24 三月 2020 09:12:15 +0800 Subject: [PATCH] 2020-03-23-3 --- ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueButtonSettionForm.cs | 58 ++++++++++++++++++++++++---------------------------------- 1 files changed, 24 insertions(+), 34 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueButtonSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueButtonSettionForm.cs index e653cca..a48f08e 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; @@ -166,15 +167,13 @@ rowBeloneArea.SelectRoomEvent += (roomKeys) => { //鍙樻洿鎴块棿 - Common.Room.CurrentRoom.ChangedRoom(nowSelectDevice, roomKeys); + HdlRoomLogic.Current.ChangedRoom(nowSelectDevice, roomKeys); }; //娣诲姞缁戝畾鐩爣琛� 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 @@ -351,25 +341,25 @@ bodyFrameLayout.AddChidren(frameBorder); var btnPic = new PicViewControl(frameBorder.Width, frameBorder.Height, false); - + frameBorder.AddChidren(btnPic); 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