From 4dce704aaf8587cf3f91cf88f2208315a03c4cbb Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期三, 08 四月 2020 13:54:58 +0800
Subject: [PATCH] 先上传一个版本

---
 ZigbeeApp/Shared/Common/Device.cs |   37 +++++++++++++++++++++++++++++++++++++
 1 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/ZigbeeApp/Shared/Common/Device.cs b/ZigbeeApp/Shared/Common/Device.cs
index aeef774..85f3d03 100755
--- a/ZigbeeApp/Shared/Common/Device.cs
+++ b/ZigbeeApp/Shared/Common/Device.cs
@@ -689,6 +689,22 @@
         /// <returns></returns>
         public bool DeviceIsCanFixedPosition(CommonDevice device)
         {
+            if (device.Type == DeviceType.DoorLock)
+            {
+                //闂ㄩ攣娌℃湁瀹氫綅鍔熻兘
+                return false;
+            }
+            if (device.Type == DeviceType.IASZone)
+            {
+                var myTypeInfo = this.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
+                if (myTypeInfo.ConcreteType == DeviceConcreteType.Sensor_Pir)
+                {
+                    //浼犳劅鍣ㄩ櫎浜哖ir閮芥病鏈夊畾浣嶅姛鑳�
+                    return true;
+                }
+                return false;
+            }
+
             foreach (var data in device.InClusterList)
             {
                 //鎷ユ湁on/off鍔熻兘鐨勶紝鎵嶆敮鎸佹祴璇�
@@ -2372,6 +2388,22 @@
                     mainDevice.IconPath = "Device/Light.png";
                 }
             }
+            //濡傛灉鏄笁璺户鐢靛櫒鐨勫洖璺殑璇�,榛樿涓虹伅鍏�
+            else if (mainDevice.Type == DeviceType.OnOffOutput)
+            {
+                var myType = this.GetHdlMyDeviceEnumInfo(mainDevice);
+                if (myType != null && myType.ConcreteType == DeviceConcreteType.Relay_ThreeLoad)
+                {
+                    if (mainDevice.DfunctionType == DeviceFunctionType.A鏈畾涔�)
+                    {
+                        mainDevice.DfunctionType = DeviceFunctionType.A鐏厜;
+                    }
+                    if (mainDevice.IsCustomizeImage == false)
+                    {
+                        mainDevice.IconPath = "Device/Light.png";
+                    }
+                }
+            }
             //濡傛灉鏄┖姘斿紑鍏崇殑璇�
             else if (mainDevice.Type == DeviceType.AirSwitch)
             {
@@ -2379,6 +2411,10 @@
                 if (mainDevice.DfunctionType == DeviceFunctionType.A鏈畾涔�)
                 {
                     mainDevice.DfunctionType = DeviceFunctionType.A寮�鍏�;
+                }
+                if (mainDevice.IsCustomizeImage == false)
+                {
+                    mainDevice.IconPath = "Device/Switch.png";
                 }
             }
             //濡傛灉鏄僵鐏殑璇�
@@ -2555,6 +2591,7 @@
             this.dicPictrueShard["ButtonPanel_SimpleThree"] = "ButtonPanel_Three";//绠�绾�3鎸夐敭闈㈡澘 娌跨敤 3鎸夐敭鐨勫浘鏍�
             this.dicPictrueShard["ButtonPanel_SimpleTwo"] = "ButtonPanel_Two";//绠�绾�2鎸夐敭闈㈡澘 娌跨敤 2鎸夐敭鐨勫浘鏍�
             this.dicPictrueShard["IntelligentLocks_Sone"] = "IntelligentLocks_H06C";//S-one鐨勯棬閿佸浘鐗囨部鐢℉06C鐨勫浘鏍�
+            this.dicPictrueShard["Relay_FangyueFreshAirModul"] = "Relay_ThreeLoad";//鏂规偊鏂伴灏忔ā鍧楀浘鐗囨部鐢�3璺户鐢靛櫒鐨勫浘鏍�
 
         }
 

--
Gitblit v1.8.0