From c7f2e3791f931d18c6ab3b1b215e57a1101e0389 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期四, 27 八月 2020 15:01:27 +0800
Subject: [PATCH] 2020-08-27-1

---
 ZigbeeApp/Home.Ios/AppDelegate.cs                                 |    2 
 ZigbeeApp/Shared/Phone/Device/Logic/Send.cs                       |   42 ++++-----
 ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs               |    8 --
 ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs                 |   40 +++++-----
 ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/AddCondition.cs |   41 ++++-----
 ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml                            |   27 +++---
 ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml            |    2 
 ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide                      |    0 
 ZigbeeApp/Shared/Phone/Device/Logic/Method.cs                     |   24 ++++++
 ZigbeeApp/Shared/Phone/Device/Logic/LogicDveiceStatus.cs          |   15 ---
 ZigbeeApp/Shared/Phone/Device/Logic/CurrentDeviceState.cs         |   23 -----
 11 files changed, 97 insertions(+), 127 deletions(-)

diff --git a/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml b/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml
index d68aa0e..d998a23 100644
--- a/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml
+++ b/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml
@@ -1,31 +1,28 @@
 锘�<Properties StartupConfiguration="{28EDE1FF-20EF-476B-8AF8-24A3EEB69F45}|Default">
   <MonoDevelop.Ide.ItemProperties.GateWay.Droid AndroidDesignerPreferredTheme="MyTheme1" AndroidDesignerPreferredDevice="Nexus 4" PreferredExecutionTarget="Android.5c86e4357d63" />
   <MonoDevelop.Ide.ItemProperties.ShardLib PreferredExecutionTarget="Android.Android_Accelerated_Oreo" />
-  <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Phone/Device/Logic/AddLogicPage.cs">
+  <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Phone/Device/Logic/SkipView.cs">
     <Files>
-      <File FileName="Shared/Phone/Device/Logic/Send.cs" Line="1206" Column="57" />
-      <File FileName="GateWay.Droid/Application.cs" Line="190" Column="53" />
-      <File FileName="Shared/Phone/Device/Logic/LogicCommunalPage.cs" Line="159" Column="46" />
-      <File FileName="Shared/Common/CommonPage.cs" Line="40" Column="44" />
-      <File FileName="Shared/Phone/Device/Logic/LogicDveiceStatus.cs" Line="1" Column="1" />
-      <File FileName="Shared/Phone/Device/Logic/AddLogicPage.cs" Line="1" Column="1" />
+      <File FileName="Shared/Phone/Device/Logic/Send.cs" Line="1" Column="1" />
+      <File FileName="Shared/Phone/Device/Logic/SkipView.cs" Line="462" Column="1" />
+      <File FileName="Shared/Phone/ZigBee/Common/Application.cs" Line="302" Column="1" />
     </Files>
     <Pads>
       <Pad Id="ProjectPad">
         <State name="__root__">
           <Node name="GateWay" expanded="True">
-            <Node name="GateWay.Droid" expanded="True">
-              <Node name="Properties" expanded="True" />
-            </Node>
             <Node name="Shared" expanded="True">
               <Node name="Common" expanded="True" />
               <Node name="Phone" expanded="True">
                 <Node name="Device" expanded="True">
                   <Node name="Logic" expanded="True">
-                    <Node name="AddLogicPage.cs" selected="True" />
+                    <Node name="DoorLockLogic" expanded="True" />
+                    <Node name="SkipView.cs" selected="True" />
                   </Node>
                 </Node>
-                <Node name="UserView" expanded="True" />
+                <Node name="ZigBee" expanded="True">
+                  <Node name="Common" expanded="True" />
+                </Node>
               </Node>
             </Node>
           </Node>
@@ -35,9 +32,11 @@
   </MonoDevelop.Ide.Workbench>
   <MonoDevelop.Ide.ItemProperties.Home.IOS automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.D4411691-F5B8-40F4-97C1-964F33115DBC" />
   <MonoDevelop.Ide.DebuggingService.PinnedWatches />
-  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhoneSimulator" />
+  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" />
   <MonoDevelop.Ide.DebuggingService.Breakpoints>
-    <BreakpointStore />
+    <BreakpointStore>
+      <Breakpoint file="/Users/hdl/Desktop/wjc/HomeApp/ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs" relfile="Shared/Phone/Device/Logic/SkipView.cs" line="462" column="1" />
+    </BreakpointStore>
   </MonoDevelop.Ide.DebuggingService.Breakpoints>
   <MultiItemStartupConfigurations />
 </Properties>
\ No newline at end of file
diff --git a/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide b/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide
index c339db0..9bd259c 100644
--- a/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide
+++ b/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml b/ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml
index 5b0d71d..66af92a 100644
--- a/ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml
+++ b/ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml
@@ -161,6 +161,6 @@
 		<!--  </>鍊兼潵鑷紑鍙戣�呭钩鍙板彇寰楃殑AppKey-->
 		<!-- 鏋佸厜鎺ㄩ�佺粨鏉� -->
 		<!-- 璁剧疆楂樺痉鍦板浘key -->
-		<meta-data android:name="com.amap.api.v2.apikey" android:value="1f753413955012c9594c5df69eaa0aff" />
+		<meta-data android:name="com.amap.api.v2.apikey" android:value="f78f951092602db3962811e736758559" />
 	</application>
 </manifest>
\ No newline at end of file
diff --git a/ZigbeeApp/Home.Ios/AppDelegate.cs b/ZigbeeApp/Home.Ios/AppDelegate.cs
index 964d407..f389cd1 100644
--- a/ZigbeeApp/Home.Ios/AppDelegate.cs
+++ b/ZigbeeApp/Home.Ios/AppDelegate.cs
@@ -96,7 +96,7 @@
                 }
             }
             AppCenter.Start("0ca801a2-742b-42fb-ba10-7ba4391371aa", typeof(Analytics), typeof(Crashes));
-            GDMapKit.setGDApiKey("866fae25f336bc8d9a79b1d19267fffb");//楂樺痉鍦板浘key
+            GDMapKit.setGDApiKey("3889cdfa4ef10c0d43348ffa2c1017c8");//楂樺痉鍦板浘key
             return true;
         }
 
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs
index 4deb7fc..063679a 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs
@@ -479,14 +479,6 @@
                     accounts.Add("Longitude", longitudeH.ToString());
                     accounts.Add("Radius", mRadius.ToString());
 
-                    if (Send.It_Exist == "0")
-                    {
-                        //濡傛灉娌℃湁寮�鍚疓PS鏈嶅姟,鎵撳紑鏈嶅姟骞朵笖淇濆瓨鐘舵�佸湪鏈湴锛�
-                        //娌℃湁鎵撳紑GPS鏈嶅姟,鍦扮悊鏉′欢鐢ㄤ笉浜嗭紱
-                        Application.StartGPSLocationService();
-                        Send.SaveLocalFile("GPS_File", "1");
-                    }
-
                     LogicIfon.Addaccounts(accounts);
                     LogicIfon.AddLocationconditions(LocationConditionsInfo);
 
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/CurrentDeviceState.cs b/ZigbeeApp/Shared/Phone/Device/Logic/CurrentDeviceState.cs
index 9412a75..11d924f 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/CurrentDeviceState.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/CurrentDeviceState.cs
@@ -108,17 +108,6 @@
 
                         }
                     }
-                    //foreach (var deviceinfo in Common.Logic.CurrentLogic.Conditions)
-                    //{
-                    //    if (deviceinfo["Type"] == "1")
-                    //    {
-                    //        if (common.DeviceAddr == deviceinfo["MacAddr"] && common.DeviceEpoint.ToString() == deviceinfo["Epoint"])
-                    //        {
-                    //            devices = deviceinfo;
-                    //            break;
-                    //        }
-                    //    }
-                    //}
                 }
                 else
                 {
@@ -131,17 +120,7 @@
                             TaskList = deviceinfo["TaskList"] as List<Dictionary<string, string>>;
                         }
                     }
-                    //foreach (var deviceinfo in Common.Logic.CurrentLogic.Actions)
-                    //{
-                    //    if (deviceinfo["LinkType"].ToString() == "0")
-                    //    {
-                    //        if (deviceinfo["DeviceAddr"].ToString() == common.DeviceAddr && deviceinfo["Epoint"].ToString() == common.DeviceEpoint.ToString())
-                    //        {
-                    //            TaskList = deviceinfo["TaskList"] as List<Dictionary<string, string>>;
-                    //            break;
-                    //        }
-                    //    }
-                    //}
+                  
                 }
             }
             #endregion
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/AddCondition.cs b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/AddCondition.cs
old mode 100755
new mode 100644
index 2812dda..de0eaa2
--- a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/AddCondition.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/AddCondition.cs
@@ -129,24 +129,7 @@
         /// <param name="user">瑙﹀彂婧愬垪琛�</param>
         public void SelectedUserID(Send.MembershipIfon user)
         {
-
-            //鍏冪礌瓒呭嚭9涓氨鐢ㄤ笂涓嬫粦鍔ㄦ帶浠�;
-            VerticalScrolViewLayout vV = null;
             int count = user.UserIdMode.Count;
-            if (count > 9)
-            {
-                ///鍏冪礌瓒呭嚭9涓�;
-                count = 6;
-                //鍏冪礌瓒呭嚭9涓氨鐢ㄤ笂涓嬫粦鍔ㄦ帶浠�;
-                vV = new VerticalScrolViewLayout
-                {
-                    Y = Application.GetRealHeight(140 + 20),
-                    Height = Application.GetRealHeight(160 * count),
-                };
-                //娓呴櫎涔嬪墠鐨勬帶浠�;
-                vV.RemoveAll();
-            }
-
             #region  -------鍙栨秷   瀹屾垚
             var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicTranslucentColor };
             this.AddChidren(flMain);
@@ -161,13 +144,28 @@
             flMain.MouseUpEventHandler += clickcancel;
             completeView.Btncancel.MouseUpEventHandler += clickcancel;
             #endregion
-
+            //鍏冪礌瓒呭嚭9涓氨鐢ㄤ笂涓嬫粦鍔ㄦ帶浠�;
+            VerticalScrolViewLayout vV = null;
+            if (count > 9)
+            {
+                ///鍏冪礌瓒呭嚭9涓�;
+                count = 6;
+                //鍏冪礌瓒呭嚭9涓氨鐢ㄤ笂涓嬫粦鍔ㄦ帶浠�;
+                vV = new VerticalScrolViewLayout
+                {
+                    Y = Application.GetRealHeight(140 + 20),
+                    Height = Application.GetRealHeight(160 * count),
+                };
+                //鍏冪礌瓒呭嚭9涓氨鐢ㄤ笂涓嬫粦鍔ㄦ帶浠�;
+                completeView.Show(count).AddChidren(vV);
+                //娓呴櫎涔嬪墠鐨勬帶浠�;
+                vV.RemoveAll();
+            }
             ///瀹氫袱涓彉閲忚褰曚箣鍓嶇殑鍙�硷紱
             string userId = "";
             string openMode = "";
             string accountName = "";
             string SelectedDeviceStatuscondition = "";
-
             for (int i = 0; i < user.UserIdMode.Count; i++)
             {
                 var userifon = user.UserIdMode[i];
@@ -175,8 +173,7 @@
                 mFunView lockView = new mFunView();
                 if (user.UserIdMode.Count > 9)
                 {
-                    //鍏冪礌瓒呭嚭9涓氨鐢ㄤ笂涓嬫粦鍔ㄦ帶浠�;
-                    completeView.Show(count).AddChidren(vV);
+                   
                     vV.AddChidren(lockView.Show());
                 }
                 else
@@ -245,8 +242,6 @@
                 }
 
             }
-
-
             completeView.Btncomplete.MouseUpEventHandler += (sender, e) =>
             {
                 var lockConditionsInfo = new Dictionary<string, string>();
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicDveiceStatus.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicDveiceStatus.cs
index 3f0ea28..8c66934 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicDveiceStatus.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicDveiceStatus.cs
@@ -538,21 +538,6 @@
                         {
                             Common.Logic.CurrentLogic.Conditions.Remove(conditions);
                             selecteddevice.selecetdFrameLayout.RemoveFromParent();
-
-                            var exist = Common.Logic.CurrentLogic.Conditions.Find((obj) => obj["Type"] == "7");
-                            if (exist == null)
-                            {
-                                //濡傛灉鎵句笉鍒板湴鐞嗕綅缃綔涓烘潯浠剁殑璇�,鍏抽棴GPS鏈嶅姟(鍑忓皯鑰楃數)
-                                if (Send.It_Exist == "1")
-                                {
-                                    Application.StopGPSLocationService();
-                                    Send.SaveLocalFile("GPS_File", "0");
-                                }
-                            }
-                            //var logicCommunalPage = new LogicCommunalPage();
-                            //UserView.HomePage.Instance.AddChidren(logicCommunalPage);
-                            //UserView.HomePage.Instance.PageIndex += 1;
-                            //logicCommunalPage.Show(() => { });
                         };
 
                     };
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs b/ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs
old mode 100755
new mode 100644
index 13c0e0d..2c5b5c3
--- a/ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs
@@ -142,24 +142,9 @@
         /// <param name="user"></param>
         public void User(Send.MembershipIfon user)
         {
-          
-            //鍏冪礌瓒呭嚭9涓氨鐢ㄤ笂涓嬫粦鍔ㄦ帶浠�;
-            VerticalScrolViewLayout vV = null;
-            int count = user.UserIdMode.Count;
-            if (count > 9)
-            {
-                ///鍏冪礌瓒呭嚭9涓�;
-                count = 6;
-                //鍏冪礌瓒呭嚭9涓氨鐢ㄤ笂涓嬫粦鍔ㄦ帶浠�;
-                vV = new VerticalScrolViewLayout
-                {
-                    Y = Application.GetRealHeight(140 + 20),
-                    Height = Application.GetRealHeight(160 * count),
-                };
-                //娓呴櫎涔嬪墠鐨勬帶浠�;
-                vV.RemoveAll();
-            }
 
+
+            int count = user.UserIdMode.Count;
             #region  -------鍙栨秷   瀹屾垚
             var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicTranslucentColor };
             this.AddChidren(flMain);
@@ -173,7 +158,23 @@
             };
             flMain.MouseUpEventHandler += clickcancel;
             completeView.Btncancel.MouseUpEventHandler += clickcancel;
-
+            //鍏冪礌瓒呭嚭9涓氨鐢ㄤ笂涓嬫粦鍔ㄦ帶浠�;
+            VerticalScrolViewLayout vV = null;
+            if (count > 9)
+            {
+                ///鍏冪礌瓒呭嚭9涓�;
+                count = 6;
+                //鍏冪礌瓒呭嚭9涓氨鐢ㄤ笂涓嬫粦鍔ㄦ帶浠�;
+                vV = new VerticalScrolViewLayout
+                {
+                    Y = Application.GetRealHeight(140 + 20),
+                    Height = Application.GetRealHeight(160 * count),
+                };
+                //鍏冪礌瓒呭嚭9涓氨鐢ㄤ笂涓嬫粦鍔ㄦ帶浠�;
+                completeView.Show(count).AddChidren(vV);
+                //娓呴櫎涔嬪墠鐨勬帶浠�;
+                vV.RemoveAll();
+            }
             #endregion
             ///瀹氫袱涓彉閲忚褰曚箣鍓嶇殑鍙�硷紱
             string userId = "";
@@ -187,8 +188,7 @@
                 mFunView lockView = new mFunView();
                 if (user.UserIdMode.Count > 9)
                 {
-                    //鍏冪礌瓒呭嚭9涓氨鐢ㄤ笂涓嬫粦鍔ㄦ帶浠�;
-                    completeView.Show(count).AddChidren(vV);
+                  
                     vV.AddChidren(lockView.Show());
                 }
                 else
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs
index 81bac76..560bd30 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs
@@ -901,6 +901,30 @@
             UserView.HomePage.Instance.RemoveViewByTag("Logic");//绉婚櫎鎵�鏈夋爣璁癓ogic鐣岄潰
             if (LogicView.IfString._Logic == if_logic)
             {
+                //鏌ヨ閫昏緫鏄惁娣诲姞鍦扮悊浣嶇疆浣滀负鏉′欢
+                var exist = Common.Logic.CurrentLogic.Conditions.Find((obj) => obj["Type"] == "7");
+                if (exist==null)
+                {
+                    //濡傛灉鎵句笉鍒板湴鐞嗕綅缃綔涓烘潯浠剁殑璇�,鍏抽棴GPS鏈嶅姟(鍑忓皯鑰楃數)
+                    if (Send.It_Exist == "1")
+                    {
+                        //鍏抽棴GPS鏈嶅姟
+                        Application.StopGPSLocationService();
+                        //淇濆瓨GPS鏈嶅姟鍏抽棴鐘舵��
+                        Send.SaveLocalFile("GPS_File", "0");
+                    }
+                }
+                else
+                {
+                    if (Send.It_Exist == "0")
+                    {
+                    
+                        //寮�鍚疓PS鏈嶅姟
+                        Application.StartGPSLocationService();
+                        //淇濆瓨GPS鏈嶅姟寮�鍚姸鎬�
+                        Send.SaveLocalFile("GPS_File", "1");
+                    }
+                }
                 //鍙埛鏂板垎绫�-鑷姩鍖栦笂涓嬫粦鍔╲iew锛�
                 Phone.Category.CategoryMainForm.instance?.RefreshBodyView();
                 // Category.Category.instance?.RefreshBodyView();
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
index 8907c8b..14495cf 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
@@ -23,7 +23,9 @@
             return await System.Threading.Tasks.Task.Run(async () =>
             {
                 List<int> logicIdList = new List<int>();
-                
+
+                bool if_theme = false;
+                int if_number = -1;
                 Action<string, string> action = (topic, data) =>
                 {
                     var gatewayID = topic.Split('/')[0];
@@ -35,19 +37,19 @@
                     
                     if (topic == $"{gatewayID}/Logic/GetLogicList_Respon")
                     {
-
-                        var list = jObjectdata["Data"]["LogicList"];
-                        if (list == null)
+                        if_theme = true;
+                        var list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Dictionary<string, string>>>(jObjectdata["Data"]["LogicList"].ToString());
+                        if_number = list.Count;
+                        if (list.Count == 0)
                         {
                             return;
                         }
                         foreach (var listIfon in list)
                         {
-                            var logicId = int.Parse(listIfon["LogicId"].ToString());
+                            var logicId = int.Parse(listIfon["LogicId"]);
                             logicIdList.Add(logicId);
                            
                         }
-
                     }
                 };
                 var mainGateWay = ZbGateway.MainGateWay;
@@ -73,9 +75,13 @@
                 while ((DateTime.Now - dateTime).TotalMilliseconds < 3 * 1000)
                 {
                     await System.Threading.Tasks.Task.Delay(100);
-                    if (logicIdList.Count != 0)
+                    if (if_theme)
                     {
-                        break;
+                        if (if_number == 0 || if_number == logicIdList.Count)
+                        {
+                            break;//鍥炲娌℃湁鏁版嵁绔嬪埢杩斿洖
+                        }
+
                     }
                 }
                 ZbGateway.MainGateWay.GwResDataAction -= action;
@@ -104,7 +110,6 @@
 
                     if (topic == $"{gatewayID}/Logic/GetLogicInfo_Respon")
                     {
-
                         logic = new Common.Logic();
                         var Logicifon = jObjectdata["Data"];
                         logic.LogicId = int.Parse(Logicifon["LogicId"]?.ToString());
@@ -249,7 +254,6 @@
                     {
                         try
                         {
-                            Logicifon = new Common.Logic();
                             Logicifon = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.Logic>(jObjectdata["Data"].ToString());
                         }
                         catch (Exception ex)
@@ -652,8 +656,7 @@
             return await System.Threading.Tasks.Task.Run(async () =>
             {
 
-                var listLogic = new List<Common.Logic>();
-                // bool @bool = false;
+                var listLogic = new List<Common.Logic>();
                 Action<string, string> action = (topic, data) =>
                 {
                     var gatewayID = topic.Split('/')[0];
@@ -665,7 +668,6 @@
 
                     if (topic == $"{gatewayID}/Logic/GetAllLogicListInfo_Respon")
                     {
-
                         var logic = new Common.Logic();
                         var Logicifon = jObjectdata["Data"];
                         logic.LogicId = int.Parse(Logicifon["LogicId"].ToString());
@@ -724,10 +726,7 @@
                         }
 
                     }
-                    //if (topic == $"{gatewayID}/Logic/AllLogicNum_Respon")
-                    //{
-                    //    @bool = true;
-                    //}
+                  
                 };
                 var mainGateWay = ZbGateway.MainGateWay;
                 if (mainGateWay == null)
@@ -752,10 +751,6 @@
                     {
                         break;
                     }
-                    //if (@bool)
-                    //{
-                    //    break;
-                    //}
                 }
                 ZbGateway.MainGateWay.GwResDataAction -= action;
                 return listLogic;
@@ -805,7 +800,7 @@
                 while ((DateTime.Now - dateTime).TotalMilliseconds < 3 * 1000)
                 {
                     await System.Threading.Tasks.Task.Delay(100);
-                    if (sceneui != null)
+                    if (sceneui != null && sceneui.Id > 0)
                     {
                         break;
                     }
@@ -1332,8 +1327,9 @@
         {
             get
             {
+                string value = ReadLocalFile("GPS_File");
                 //璇诲彇鏈湴GPS鏈嶅姟鐘舵��
-                if (ReadLocalFile("GPS_File") == "0")
+                if (value == "0"||string.IsNullOrEmpty(value))
                 {
                     return "0";
                 }

--
Gitblit v1.8.0