From bd46c57c77c276014db3192a4e2cc96e23c93202 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期五, 21 二月 2020 13:08:47 +0800 Subject: [PATCH] 先上传个版本吧 --- ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs | 58 +++++++++++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 47 insertions(+), 11 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs index 2296aba..7fb6fe1 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs @@ -43,6 +43,8 @@ /// </summary> public void ShowForm() { + this.ScrollEnabled = false; + //璁剧疆鏍囬淇℃伅 base.SetTitleText(Language.StringByID(R.MyInternationalizationString.DeviceManagement)); @@ -152,6 +154,8 @@ //鑾峰彇璁惧鍒楄〃 string gwID = HdlGatewayLogic.Current.GetGatewayId(GatewayResourse.NowSelectGateway); var listDevice = Common.LocalDevice.Current.GetDeviceByGatewayID(gwID); + var listSpecialOta = Common.LocalDevice.Current.GetSpecialOtaDevice(gwID); + listDevice.AddRange(listSpecialOta); this.dicRowInfo.Clear(); @@ -227,7 +231,7 @@ //妫�娴嬭澶囨槸鍚︽嫢鏈夊畾浣嶇殑鍔熻兘 var listdevice = Common.LocalDevice.Current.GetDevicesByMac(deviceMac); - if (Common.LocalDevice.Current.DeviceIsCanFixedPosition(listdevice[0]) == true) + if (listdevice.Count > 0 && Common.LocalDevice.Current.DeviceIsCanFixedPosition(listdevice[0]) == true) { //瀹氫綅 var btnPosition = new NormalViewControl(Application.GetRealWidth(184), rowMenu.Height, false); @@ -407,6 +411,37 @@ var form = new DeviceAirConditioner.IndoorUnitSettionForm(); form.AddForm((AC)device); } + //鐜闈㈡澘 + else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueEnvironment) + { + var form = new DeviceFunctionSettionForm(); + form.AddForm(device, true); + } + //鏂规偊闈㈡澘 + else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueTwo + || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFour + || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueEight) + { + //骞叉帴鐐� + if (device.Type == DeviceType.OnOffSwitch) + { + //鏂规偊闈㈡澘鐨勬寜閿厤缃� + var form = new DevicePanel.PanelFangyueButtonSettionForm(); + form.AddForm(device); + } + //缁х數鍣� + else if (device.Type == DeviceType.OnOffOutput) + { + //鏂规偊闈㈡澘鐨勫姛鑳介厤缃� + var form = new DevicePanel.PanelFangyueButtonSettionForm(); + form.AddForm(device); + } + else + { + var form = new DeviceFunctionSettionForm(); + form.AddForm(device, true); + } + } //闈㈡澘璁惧 else if (deviceEnumInfo.BeloneType == DeviceBeloneType.A鎸夐敭闈㈡澘) { @@ -439,12 +474,6 @@ var form = new DeviceFunctionSettionForm(); form.AddForm(device, true); } - } - //娓╂箍搴� - else if (device.Type == DeviceType.TemperatureSensor) - { - var form = new DeviceFunctionSettionForm(); - form.AddForm(device, true); } else { @@ -843,8 +872,14 @@ var localDevice = Common.LocalDevice.Current.GetDevicesByMac(deviceAddr); if (localDevice.Count == 0) { - //鍏ョ綉涔嬪悗锛屽張鎶婂畠鍒犱簡 - return; + //閽堝鍗曠函鍙湁涓�涓�200绔偣鐨勮澶� + var ota = Common.LocalDevice.Current.GetOTADevice(deviceAddr); + if (ota == null) + { + //鍏ョ綉涔嬪悗锛屽張鎶婂畠鍒犱簡 + return; + } + localDevice.Add(ota); } var rowNewInfo = new DeviceObjRowInfo(); rowNewInfo.DeviceMac = deviceAddr; @@ -904,8 +939,9 @@ if (this.nowActionDeviceMac != null) { var rowInfo = this.dicRowInfo[nowActionDeviceMac]; - //妫�娴嬭繖涓澶囨槸鍚﹁鍒犻櫎 - if (Common.LocalDevice.Current.GetDevicesByMac(nowActionDeviceMac).Count == 0) + //妫�娴嬭繖涓澶囨槸鍚﹁鍒犻櫎 2020.01.13鍙樻洿:杩藉姞Ota璁惧鐨勫垽鏂� + if (Common.LocalDevice.Current.GetDevicesByMac(nowActionDeviceMac).Count == 0 + && Common.LocalDevice.Current.GetOTADevice(nowActionDeviceMac) == null) { //绉婚櫎鎺т欢 rowInfo.dicDetailRow = null; -- Gitblit v1.8.0