From 94e4e5b9fd3da964c44b7b14227d6fe2bbb426d7 Mon Sep 17 00:00:00 2001
From: WJC <wjc@hdlchina.com.cn>
Date: 星期四, 02 四月 2020 13:56:39 +0800
Subject: [PATCH] 2020-04-02-2

---
 ZigbeeApp/Shared/Phone/Device/Logic/Method.cs |   25 ++++++++++++++++++-------
 1 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs
index 2a048de..ee8afb3 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs
@@ -341,7 +341,7 @@
                         deviceTypeList.Add(DeviceType.Thermostat);
                         deviceTypeList.Add(DeviceType.AirSwitch);
                         ///闂ㄩ攣鐗规畩
-                        deviceTypeList.Add(DeviceType.DoorLock);
+                       // deviceTypeList.Add(DeviceType.DoorLock);
                     }
                     break;
                 case "condition_mould":
@@ -363,7 +363,7 @@
                         deviceTypeList.Add(DeviceType.Thermostat);
                         deviceTypeList.Add(DeviceType.AirSwitch);
                         ///闂ㄩ攣鐗规畩
-                        deviceTypeList.Add(DeviceType.DoorLock);
+                      // deviceTypeList.Add(DeviceType.DoorLock);
                     }
                     break;
 
@@ -757,7 +757,17 @@
                 {
                     succeed = true;
                     CurrentLogic.LogicId = logicifon.LogicId;
-                    Common.Logic.LogicList.Add(CurrentLogic);
+                    if (LogicView.IfString._LockLogic == if_logic)
+                    {
+                        //闂ㄩ攣鑱斿姩浜嬩欢閫昏緫鍒楄〃
+                        Common.Logic.LockLogicList.Add(CurrentLogic);
+                    }
+                    else
+                    {
+                        //鑷姩鍖栭�昏緫鍒楄〃
+                        Common.Logic.LogicList.Add(CurrentLogic);
+
+                    }
                     if (tag)
                     {
                         Send.Zj(tag, CurrentLogic);
@@ -786,10 +796,9 @@
 
             if (LogicView.IfString._Logic == if_logic)
             {
+                UserView.HomePage.Instance.RemoveViewByTag("Logic");
                 if (CurrentLogic.LogicType == 0)
                 {
-                   
-                    UserView.HomePage.Instance.RemoveViewByTag("Logic");
                     //鍙埛鏂板垎绫讳笂涓嬫粦鍔╲iew锛�
                     Phone.Category.CategoryMainForm.instance?.RefreshBodyView();
                     // Category.Category.instance?.RefreshBodyView();
@@ -804,7 +813,8 @@
             }
             else if (LogicView.IfString._LockLogic == if_logic)
             {
-                UserView.HomePage.Instance.RemoveViewByTag("Logic");
+                UserView.HomePage.Instance.RemoveViewByTag("Logic");//绉婚櫎鎵�鏈夋爣璁癓ogic鐣岄潰
+                UserView.HomePage.Instance.RemoveViewByTag("LockListView");//绉婚櫎鎵�鏈夋爣璁癓ockListView鐣岄潰
                 var doorLockLogicList = new DoorLockLogic.LockLogicList();
                 UserView.HomePage.Instance.AddChidren(doorLockLogicList);
                 UserView.HomePage.Instance.PageIndex += 1;
@@ -825,6 +835,7 @@
             deviceTarget.Show(str1, str2);
         }
 
-       
+        
+
     }
 }

--
Gitblit v1.8.0