From 163777d8a2cb7cfa469f54a7042528870ebc10a3 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 09 十二月 2019 17:46:20 +0800
Subject: [PATCH] 一个新版本

---
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs |   37 ++++++++++++++++++++++++-------------
 1 files changed, 24 insertions(+), 13 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs
index bc006ad..59956dd 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs
@@ -366,7 +366,7 @@
                 this.CloseForm();
 
                 //鍏抽棴鎸囧畾鐣岄潰(缃戝叧鎼滅储)
-                this.CloseFormByFormName("WiredGatewayListForm");
+                this.CloseFormByFormName("GatewaySearchListForm");
                 this.CloseFormByFormName("NewGateWayMenuSelectForm");
 
                 //鍏抽棴鎸囧畾鐣岄潰(缃戝叧缂栬緫)
@@ -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