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 |   38 ++++++++++++++++++++++++++++++++------
 1 files changed, 32 insertions(+), 6 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
old mode 100755
new mode 100644
index a3b8f47..55ae1c5
--- a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
@@ -496,6 +496,11 @@
                     {
                         cardContr = new Controls.DeviceCurtainRowControl();
                     }
+                    //鏅捐。鏋� Airer
+                    if (device.Type == DeviceType.Airer)
+                    {
+                        cardContr = new Controls.DeviceAirerRowControl();
+                    }
                     //缁х數鍣�
                     else if (device.Type == DeviceType.OnOffOutput)
                     {
@@ -521,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)
                     {
@@ -530,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)
@@ -547,7 +563,7 @@
                         cardContr = new Controls.DeviceColorTemperatureRowControl();
                     }
                     //鏃犳硶璇嗗埆
-                    else
+                    if (cardContr == null)
                     {
                         cardContr = new Controls.DeviceRowCommon();
                         //娌℃湁鐘舵�佸姛鑳�
@@ -843,6 +859,16 @@
                 {
                     //澶勭悊涓�鑸澶囩殑涓婃姤鏁版嵁
                     string mainKeys = LocalDevice.Current.GetDeviceMainKeys(report);
+                    //鏅捐。鏋朵笂鎶ラ渶瑕佺壒娈婂鐞嗭紝鍏朵粬涓婃姤鐨勫洖璺粺涓�杞负绔偣1
+                    var tempList = LocalDevice.Current.GetDevicesByMac(report.DeviceAddr);
+                    if (tempList.Count > 0)
+                    {
+                        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