| | |
| | | CommonPage.Loading.Start(); |
| | | if (Common.Logic.LockLogicList.Count == 0) |
| | | { |
| | | var Idlist = await Device.Logic.Send.GetLogicId(); |
| | | var Idlist = await Send.GetLogicId(1); |
| | | if (Idlist.Count != 0) |
| | | { |
| | | var listlogic = await Device.Logic.Send.ReadList(Idlist.Count); |
| | | for (int i = 0; i < Idlist.Count; i++) |
| | | { |
| | | var LogicId = Idlist[i]; |
| | | var listlogic = await Send.ReadList(Idlist.Count,1); |
| | | //foreach可能集合已被修改,枚举操作可能不会执行,可能出现崩溃(建议for)。 |
| | | for (int j = 0; j < listlogic.Count; j++) |
| | | { |
| | | var logic = listlogic[j]; |
| | | if (logic.LogicId == LogicId) |
| | | if (logic.LogicType == 0) |
| | | { |
| | | Common.Logic.LockLogicList.Add(logic); |
| | | continue; |
| | | } |
| | | bool yes = false; |
| | | for (int a = 0; a < logic.Accounts.Count; a++) |
| | | { |
| | | if (logic.Accounts[a]["Account"].ToString() == Config.Instance.Guid) |
| | | { |
| | | //查找自己账号下的创建联动事件; |
| | | yes = true; |
| | | break; |
| | | } |
| | | } |
| | | if (yes) |
| | | { |
| | | Common.Logic.LockLogicList.Add(listlogic[j]); |
| | | } |
| | | } |
| | | } |