From 3291885285dfd5d4f665c20676307878dc3163bc Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期五, 20 十二月 2019 16:28:53 +0800
Subject: [PATCH] 请合并最新代码(优化设备不支持的功能)

---
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs |   35 +++++++++++++++++++++++------------
 1 files changed, 23 insertions(+), 12 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs
index 08c517b..59956dd 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs
@@ -395,21 +395,32 @@
         /// </summary>
         /// <param name="strWayId"></param>
         /// <param name="row"></param>
-        private async void DeleteGateway(string strWayId)
+        private void DeleteGateway(string strWayId)
         {
-            //鍒犻櫎浜戠缃戝叧
-            bool result = await HdlGatewayLogic.Current.DeleteGateway(strWayId);
-            if (result == false)
+            HdlThreadLogic.Current.RunThread(async () =>
             {
-                return;
-            }
+                //鎵撳紑杩涘害鏉�
+                this.ShowProgressBar();
 
-            if (strWayId == GatewayResourse.AppOldSelectGatewayId)
-            {
-                HdlGatewayLogic.Current.SaveGatewayIdToLocation(string.Empty);
-            }
-            //鍏抽棴鑷韩
-            this.CloseForm();
+                //鍒犻櫎浜戠缃戝叧
+                bool result = await HdlGatewayLogic.Current.DeleteGateway(strWayId);
+                //鍏抽棴杩涘害鏉�
+                this.CloseProgressBar();
+                if (result == false)
+                {
+                    return;
+                }
+
+                if (strWayId == GatewayResourse.AppOldSelectGatewayId)
+                {
+                    HdlGatewayLogic.Current.SaveGatewayIdToLocation(string.Empty);
+                }
+                HdlThreadLogic.Current.RunMain(() =>
+                {
+                    //鍏抽棴鑷韩
+                    this.CloseForm();
+                });
+            });
         }
 
         #endregion

--
Gitblit v1.8.0