From 136b9e2fc48249a5ff89874f1080ba94130e7a9e Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期二, 19 五月 2020 11:12:29 +0800 Subject: [PATCH] Merge branch 'dev-tzy' into dev-2020xm --- ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs | 66 ++++++++++++++------------------ 1 files changed, 29 insertions(+), 37 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs index 742b6f6..6e7edf2 100755 --- a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs @@ -83,9 +83,6 @@ public async void Read() { - - - CommonPage.Loading.Start(); if (!BoolExist()) { @@ -101,28 +98,32 @@ { continue; } - bool yes = false; - for (int a = 0; a < logic.Accounts.Count; a++) - { - //Option4鏄澶噈ac锛汷ption2鏄澶囩鍙o紱 - if (logic.Accounts[a]["Option4"].ToString() != Send.CurrentDoorLock.DeviceAddr && logic.Accounts[a]["Option2"].ToString() != Send.CurrentDoorLock.DeviceEpoint.ToString()) - { - //鏌ユ壘鏄惁鏄偅涓棬閿侊紱 - //濡傛灉涓嶆槸璇ラ棬閿佽仈鍔ㄤ簨浠朵笉鏄剧ず鍑烘潵; - yes = false; - break; - } - if (logic.Accounts[a]["Account"].ToString() == Config.Instance.Guid) - { - //鏌ユ壘鑷繁璐﹀彿涓嬬殑鍒涘缓鑱斿姩浜嬩欢锛� - yes = true; - break; - } - } - if (yes) - { - Common.Logic.LockLogicList.Add(listlogic[j]); - } + Common.Logic.LockLogicList.Add(logic); + //bool yes = false; + //for (int a = 0; a < logic.Accounts.Count; a++) + //{ + // //Option4鏄澶噈ac锛汷ption2鏄澶囩鍙o紱 + // if (logic.Accounts[a]["Option4"].ToString() != Send.CurrentDoorLock.DeviceAddr) + // { + // //鏌ユ壘鏄惁鏄偅涓棬閿侊紱 + // //濡傛灉涓嶆槸璇ラ棬閿佽仈鍔ㄤ簨浠朵笉鏄剧ず鍑烘潵; + // yes = false; + // } + // else + // { + // yes = true; + // } + // //if (logic.Accounts[a]["Account"].ToString() == Config.Instance.Guid) + // //{ + // // //鏌ユ壘鑷繁璐﹀彿涓嬬殑鍒涘缓鑱斿姩浜嬩欢锛� + // // yes = true; + // // break; + // //} + //} + //if (yes) + //{ + // Common.Logic.LockLogicList.Add(listlogic[j]); + //} } } } @@ -317,26 +318,17 @@ /// <returns></returns> private bool Exist(Common.Logic logic) { - bool yes = false; for (int j = 0; j < logic.Accounts.Count; j++) { //Option4鏄澶噈ac锛汷ption2鏄澶囩鍙o紱 - if (logic.Accounts[j]["Option4"].ToString() != Send.CurrentDoorLock.DeviceAddr && logic.Accounts[j]["Option2"].ToString() != Send.CurrentDoorLock.DeviceEpoint.ToString()) + if (logic.Accounts[j]["Option4"].ToString() == Send.CurrentDoorLock.DeviceAddr) { //鏌ユ壘鏄惁鏄偅涓棬閿侊紱 //濡傛灉涓嶆槸璇ラ棬閿佽仈鍔ㄤ簨浠朵笉鏄剧ず鍑烘潵; - yes = false; - break; + return true; } - if (logic.Accounts[j]["Account"].ToString() == Config.Instance.Guid) - { - //鏌ユ壘鑷繁璐﹀彿涓嬬殑鍒涘缓鑱斿姩浜嬩欢锛� - yes = true; - break; - } - } - return yes; + return false; } } } -- Gitblit v1.8.0