From ca233e3c6154859a17948d892fbc6bbf723b60a8 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期五, 29 五月 2020 15:47:30 +0800
Subject: [PATCH] 发布的1.0.20052901

---
 ZigbeeApp20200525/Shared/Phone/Device/Logic/SkipView.cs |   53 +++++++++++++++++++++++++++--------------------------
 1 files changed, 27 insertions(+), 26 deletions(-)

diff --git a/ZigbeeApp20200525/Shared/Phone/Device/Logic/SkipView.cs b/ZigbeeApp20200525/Shared/Phone/Device/Logic/SkipView.cs
old mode 100644
new mode 100755
index cb5f80f..697ae26
--- a/ZigbeeApp20200525/Shared/Phone/Device/Logic/SkipView.cs
+++ b/ZigbeeApp20200525/Shared/Phone/Device/Logic/SkipView.cs
@@ -8,19 +8,18 @@
 
 namespace Shared.Phone.Device.Logic
 {
-    public class SkipView : FrameLayout
+    public class SkipView:FrameLayout
     {
         /// <summary>
         /// 鍏跺畠鐣岄潰璺宠繘鏉ョ殑鍏ュ彛
         /// </summary>
-        public async static void SkipAddLogic(int intvalue, DoorLock doorLock = null, UserCenter.MemberInfoRes accountObj = null)
+        public async static void SkipAddLogic(int intvalue, DoorLock doorLock = null, UserCenter.MemberInfoRes accountObj = null) 
         {
             /// 0.姝e父鑷姩鍖�;1.闂ㄩ攣鑷姩鍖�;2.Sone闂ㄩ攣;
             switch (intvalue)
             {
                 case 0:
                     {
-
                         //new涓�涓柊閫昏緫瀵硅薄锛�
                         //鏂板姝e父鑷姩鍖栧叆鍙�
                         Common.Logic.CurrentLogic = new Common.Logic();
@@ -31,7 +30,6 @@
                         UserView.HomePage.Instance.AddChidren(addLogicPage);
                         UserView.HomePage.Instance.PageIndex += 1;
                         addLogicPage.Show();
-
                     }
                     break;
                 case 1:
@@ -66,7 +64,7 @@
 
         }
 
-
+       
         #region 鈼� 鑷姩鍖朹_________________________
         /// <summary>
         /// 鑷姩鍖栧姛鑳戒唬鐮佸叆鍙�
@@ -323,7 +321,7 @@
         /// <param name="refresview">Refresview.</param>
         private static async void Automationview(VerticalRefreshLayout refresview, bool no)
         {
-
+            
             refresview.RemoveAll();
             if (Common.Logic.LogicList.Count == 0 && no == false)
             {
@@ -412,7 +410,7 @@
                     //瀹炵幇android鏄剧ず閫昏緫鍒楄〃鐨勫渾瑙�;
                     fLayout.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft);
                     logicRowlayout.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft);
-
+                   
                 }
                 i++;
                 var logicnameBtn = new Button
@@ -764,37 +762,32 @@
         /// </summary>
         public static async System.Threading.Tasks.Task<int> Exist(int valueInt, ZigBee.Device.DoorLock doorLock)
         {
+
             int exist = 0;
-            var Idlist = await Send.GetLogicId(valueInt);
-            if (Idlist.Count != 0)
+            var IdList = await Send.GetLogicId(valueInt);
+            if (IdList.Count != 0)
             {
-                //榛樿鍙栫涓�涓�昏緫ID
-                var id = Idlist[0];
-                if (valueInt != 3)
+                for (int i = 0; i < IdList.Count; i++)
                 {
-                    exist = id;
-                }
-                else
-                {
-                    var logic = await Send.GetLogic(id, 3);
+                    var id = IdList[i];
+                    var logic = await Send.GetLogic(id, valueInt);
                     if (logic != null)
                     {
                         if (ExistLogic(logic, doorLock))
                         {
                             exist = id;
-                        }
-                        else
-                        {
-                            exist = 0;
+                            ///鎵惧埌閫�鍑�
+                            break;
                         }
                     }
+
                 }
             }
             return exist;
         }
 
         ///<summary>
-        ///鑾峰彇闂ㄩ攣閫昏緫淇℃伅
+        ///鑾峰彇闂ㄩ攣鏃舵晥鎬ч�昏緫淇℃伅
         /// 杩斿洖鍊硷細null涓嶅瓨鍦�;鍏跺畠鍊奸兘瀛樺湪;
         /// </summary>
         public static async System.Threading.Tasks.Task<Common.Logic> GetLogicIfon(ZigBee.Device.DoorLock doorLock)
@@ -818,14 +811,12 @@
         ///鍒犻櫎璇ラ棬閿佹墍鏈夋椂鏁堟�ц嚜鍔ㄥ寲
         /// 杩斿洖鍊硷細true鎴愬姛;false澶辫触;
         /// </summary>
-        public static async System.Threading.Tasks.Task<bool> GetLogicAll(ZigBee.Device.DoorLock doorLock)
+        public static async System.Threading.Tasks.Task<bool> DelAllLogic(ZigBee.Device.DoorLock doorLock)
         {
             bool _if = false;
             var Idlist = await Send.GetLogicId(3);
             if (Idlist.Count != 0)
             {
-                _if = true;
-
                 for (int i = 0; i < Idlist.Count; i++)
                 {
                     int id = Idlist[i];
@@ -836,7 +827,16 @@
                         {
                             //鏈潵鍙湁涓�鏉℃椂鏁堟�ц嚜鍔ㄥ寲锛�
                             //闃叉鐗规畩鎯呭喌,鎵惧埌灏卞垹闄ゆ帀;
+                            //var valueInt = await Send.DelLogic(id);
+                            //if (valueInt == 0)
+                            //{
+                            //    _if = true;
+                            //}
+                            //(鑰冭檻鎬ц兘榛樿鍒犻櫎鎴愬姛锛岀洿鎺ヨ繑鍥炴垚鍔熺粨鏋渢rue)
+                            _if = true;
                             Send.DelLogic(id);
+                           
+
                         }
                     }
                 }
@@ -852,7 +852,7 @@
         {
             for (int j = 0; j < logic.Accounts.Count; j++)
             {
-                //Option4鏄澶噈ac锛汷ption2鏄澶囩鍙o紱
+                //Option4鏄澶噈ac锛�
                 if (logic.Accounts[j]["Option4"].ToString() == doorLock.DeviceAddr)
                 {
                     //鏌ユ壘鏄惁鏄偅涓棬閿侊紱
@@ -866,3 +866,4 @@
 
     }
 }
+

--
Gitblit v1.8.0