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/Category/CategoryMainForm.cs | 32 +++++++++++++++++++++++--------- 1 files changed, 23 insertions(+), 9 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs old mode 100755 new mode 100644 index c720d0b..55ae1c5 --- a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs +++ b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs @@ -526,6 +526,22 @@ { cardContr = new Controls.DevicePmSensorRowControl(); } + // 绌烘皵璐ㄩ噺浼犳劅鍣� + else if (device.Type == DeviceType.TemperatureSensor) + { + //鑾峰彇璁惧绫诲瀷 + var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device }); + //绌烘皵璐ㄩ噺浼犳劅鍣� + if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.AirQualitySensor) + { + cardContr = new Controls.DeviceAirQualitySensorRowControl(); + } + else + { + //娓╂箍搴� + cardContr = new Controls.DeviceTemperatureRowControl(); + } + } //褰╃伅(璋冨厜鍣�) else if (device.Type == DeviceType.DimmableLight) { @@ -535,11 +551,6 @@ else if (device.Type == DeviceType.IASZone) { cardContr = new Controls.DeviceSensorRowControl(); - } - //娓╂箍搴� - else if (device.Type == DeviceType.TemperatureSensor) - { - cardContr = new Controls.DeviceTemperatureRowControl(); } //闂ㄩ攣 else if (device.Type == DeviceType.DoorLock) @@ -552,7 +563,7 @@ cardContr = new Controls.DeviceColorTemperatureRowControl(); } //鏃犳硶璇嗗埆 - else + if (cardContr == null) { cardContr = new Controls.DeviceRowCommon(); //娌℃湁鐘舵�佸姛鑳� @@ -850,10 +861,13 @@ string mainKeys = LocalDevice.Current.GetDeviceMainKeys(report); //鏅捐。鏋朵笂鎶ラ渶瑕佺壒娈婂鐞嗭紝鍏朵粬涓婃姤鐨勫洖璺粺涓�杞负绔偣1 var tempList = LocalDevice.Current.GetDevicesByMac(report.DeviceAddr); - var tempDeviceEnum = LocalDevice.Current.GetMyDeviceEnumInfo(tempList); - if (tempDeviceEnum.ConcreteType == Common.DeviceConcreteType.Airer) + if (tempList.Count > 0) { - mainKeys = report.DeviceAddr + "_" + 1; + var tempDeviceEnum = LocalDevice.Current.GetMyDeviceEnumInfo(tempList); + if (tempDeviceEnum.ConcreteType == Common.DeviceConcreteType.Airer) + { + mainKeys = report.DeviceAddr + "_" + 1; + } } if (this.dicDeviceRowControl.ContainsKey(mainKeys) == true) { -- Gitblit v1.8.0