From 463cf39019aa54e6c1226be4620766a035a0c490 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期二, 14 四月 2020 13:31:07 +0800 Subject: [PATCH] 上传个东西 --- ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetForm.cs | 64 +++++++++++++++++++++---------- 1 files changed, 43 insertions(+), 21 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetForm.cs index 91d1c6f..64b9ea0 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetForm.cs @@ -83,7 +83,7 @@ { if (listDataRoom.Count > 0) { - //鍒濆鍖栨埧闂村拰璁惧鍒楄〃 + //鍒濆鍖栨埧闂村拰璁惧鍒楄〃 this.InitRoomAndDeviceRow(listDataRoom); } else @@ -201,46 +201,63 @@ DeviceSimpleSelectControl oldSelectContr = null; var listDevice = this.dicShowDevice[roomId]; + //鑾峰彇璁惧绫诲瀷鐨� + var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(listDevice); //妫�鏌ョ鍚堢殑璁惧 List<CommonDevice> listSupportDevice = new List<CommonDevice> { }; foreach (var dev in listDevice) { + //鏂伴闈㈡澘鐨勬柊椋庤澶囷紝鍒欎笉鏄剧ず + if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir) + { + continue; + } if (dev.Type == DeviceType.FreshAir) { listSupportDevice.Add(dev); } } + DeviceSimpleSelectControl oldDeviceSimpleSelectControl = null; + int curIndex = 0; for (int i = 0; i < listSupportDevice.Count; i++) { string mainKey = Common.LocalDevice.Current.GetDeviceMainKeys(listSupportDevice[i]); - var contr = new DeviceSimpleSelectControl(listDevice[i], false, this.listView.rowSpace / 2); + var contr = new DeviceSimpleSelectControl(listSupportDevice[i], false, this.listView.rowSpace / 2); listView.AddChidren(contr); contr.InitControl(); - if (i != listDevice.Count - 1) + if (i != listSupportDevice.Count - 1) { //搴曠嚎 contr.AddBottomLine(); } + contr.ButtonClickEvent += (sender, e) => { - contr.IsSelected = !contr.IsSelected; - //閫夋嫨浜嗗埆鐨勮澶� - if (contr.IsSelected == true) + if (contr.IsSelected) { - if (oldSelectContr != null) - { - oldSelectContr.IsSelected = false; - } - oldSelectContr = contr; - this.bindTargetKey = mainKey; + return; } - //鍙栨秷閫夋嫨 - else - { - oldSelectContr = null; - this.bindTargetKey = string.Empty; - } + contr.IsSelected = true; + oldSelectContr = contr; + this.bindTargetKey = mainKey; + //contr.IsSelected = !contr.IsSelected; + ////閫夋嫨浜嗗埆鐨勮澶� + //if (contr.IsSelected == true) + //{ + // if (oldSelectContr != null) + // { + // oldSelectContr.IsSelected = false; + // } + // oldSelectContr = contr; + // this.bindTargetKey = mainKey; + //} + ////鍙栨秷閫夋嫨 + //else + //{ + // oldSelectContr = null; + // this.bindTargetKey = string.Empty; + //} }; if (this.bindTargetKey == mainKey) { @@ -285,10 +302,15 @@ var device = Common.LocalDevice.Current.GetDevice(deviceKeys); if (device != null) { - canShow = true; - //鏀堕泦鍙互鏄剧ず鐨勮澶� - this.dicShowDevice[room.Id].Add(device); + if (device.Type == DeviceType.FreshAir) + { + //canShow = true;//聽聽杩欎釜鐣岄潰涓嶆樉绀烘埧闂� + //鏀堕泦鍙互鏄剧ず鐨勮澶� + this.dicShowDevice[room.Id].Add(device); + } } + + } return canShow; } -- Gitblit v1.8.0