From d5b9ff8bf8cc36f5b13c46b66682f5988d3a6f36 Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期五, 15 五月 2020 11:36:11 +0800 Subject: [PATCH] 2020-05-15-1 --- ZigbeeApp/Shared/Phone/Device/Logic/Method.cs | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 50 insertions(+), 7 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs index 3c2d150..e4fff88 100644 --- a/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs @@ -766,9 +766,50 @@ if (Config.Instance.Home.IsVirtually) { - Send.Zj(LogicView.IfString.Tag, Common.Logic.CurrentLogic); + if (Common.Logic.LogicList.Count == 0) + { + CurrentLogic.LogicId = 1; + Common.Logic.LogicList.Add(CurrentLogic); + } + + if (CurrentLogic.LogicId == 0) + { + bool d = false; + for (int i = 1; i < 50; i++) + { + + for (int j = 0; j < Common.Logic.LogicList.Count; j++) + { + if (i != Common.Logic.LogicList[j].LogicId) + { + CurrentLogic.LogicId = i; + Common.Logic.LogicList.Add(CurrentLogic); + d = true; + break; + } + } + if (d) + { + break; + } + } + + } + else + { + for (int j = 0; j < Common.Logic.LogicList.Count; j++) + { + if (CurrentLogic.LogicId == Common.Logic.LogicList[j].LogicId) + { + Common.Logic.LogicList.RemoveAt(j); + Common.Logic.LogicList.Insert(j,CurrentLogic); + break; + } + } + + } + //鑷姩鍖栭�昏緫鍒楄〃 - Common.Logic.LogicList.Add(CurrentLogic); } else { @@ -841,11 +882,13 @@ else if (LogicView.IfString._SoneLogic == if_logic) { //璺冲埌Sone闂ㄩ攣鑱斿姩浜嬩欢鍒楄〃鐣岄潰 - UserView.HomePage.Instance.RemoveViewByTag("SoneLogic");//绉婚櫎鎵�鏈夋爣璁癓ockListView鐣岄潰 - var soneLogicList = new SoneLogicList(); - UserView.HomePage.Instance.AddChidren(soneLogicList); - UserView.HomePage.Instance.PageIndex += 1; - soneLogicList.Show(); + //UserView.HomePage.Instance.RemoveViewByTag("SoneLogic");//绉婚櫎鎵�鏈夋爣璁癓ockListView鐣岄潰 + //var soneLogicList = new SoneLogicList(); + //UserView.HomePage.Instance.AddChidren(soneLogicList); + //UserView.HomePage.Instance.PageIndex += 1; + //soneLogicList.Show(); + + SoneLogicList.soneLogicList?.RefreshView(); } } -- Gitblit v1.8.0