From 5428935270159bfc42c2934ed7fb1091554fc9a4 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 09 七月 2020 17:12:42 +0800
Subject: [PATCH] 修改了 sokect

---
 ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs |   65 ++++++++++++++++++--------------
 1 files changed, 36 insertions(+), 29 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs b/ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs
index 1c7f1b2..793d7c0 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs
@@ -64,6 +64,8 @@
 
         }
         #region 鈼� 鑷姩鍖朹_________________________
+
+       static bool If_once = true;
         /// <summary>
         /// 鑷姩鍖栧姛鑳戒唬鐮佸叆鍙�
         /// </summary>
@@ -241,6 +243,7 @@
                 if (!Config.Instance.Home.IsVirtually)
                 {//铏氭嫙鐨勪笉鑾峰彇缃戝叧閫昏緫鍒楄〃
                     //閲嶆柊鍒锋柊logic鍒楄〃
+                    If_once = true;
                     Common.Logic.LogicList.Clear();
                     Read(logicScrolView, no);
                 }
@@ -271,35 +274,39 @@
             {
                 if (!Config.Instance.Home.IsVirtually)//铏氭嫙鐨勪笉鑾峰彇缃戝叧閫昏緫鍒楄〃
                 {
-                    if (Common.Logic.LogicList.Count == 0)
-                    {
-                        var Idlist1 = await Send.GetLogicId(0);//
-                        var Idlist2 = await Send.GetLogicId(2);//闂ㄩ攣甯稿紑妯″紡
-                        if (Idlist1.Count != 0)
-                        {
-                            var listlogic1 = await Send.ReadList(Idlist1.Count, 0);
-                            for (int j = 0; j < listlogic1.Count; j++)
-                            {
-                                var logic = listlogic1[j];
-                                if (logic.LogicType != 0)
-                                {
-                                    continue;
-                                }
-                                Common.Logic.LogicList.Add(logic);
-                            }
-                        }
-                        if (Idlist2.Count != 0)
-                        {
-                            var listlogic2 = await Send.ReadList(Idlist2.Count, 2);
-                            for (int j = 0; j < listlogic2.Count; j++)
-                            {
-                                var logic = listlogic2[j];
-                                if (logic.LogicType != 2)
-                                {
-                                    continue;
-                                }
-                                Common.Logic.LogicList.Add(logic);
-                            }
+                    if (If_once)
+                    {
+                        If_once = false;
+                        if (Common.Logic.LogicList.Count == 0)
+                        {
+                            var Idlist1 = await Send.GetLogicId(0);//
+                            var Idlist2 = await Send.GetLogicId(2);//闂ㄩ攣甯稿紑妯″紡
+                            if (Idlist1.Count != 0)
+                            {
+                                var listlogic1 = await Send.ReadList(Idlist1.Count, 0);
+                                for (int j = 0; j < listlogic1.Count; j++)
+                                {
+                                    var logic = listlogic1[j];
+                                    if (logic.LogicType != 0)
+                                    {
+                                        continue;
+                                    }
+                                    Common.Logic.LogicList.Add(logic);
+                                }
+                            }
+                            if (Idlist2.Count != 0)
+                            {
+                                var listlogic2 = await Send.ReadList(Idlist2.Count, 2);
+                                for (int j = 0; j < listlogic2.Count; j++)
+                                {
+                                    var logic = listlogic2[j];
+                                    if (logic.LogicType != 2)
+                                    {
+                                        continue;
+                                    }
+                                    Common.Logic.LogicList.Add(logic);
+                                }
+                            }
                         }
                     }
                 }

--
Gitblit v1.8.0