From b3e96fce4cc01113128ddf8e0a18fc19594a9e56 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 05 十二月 2019 18:38:30 +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