From 160785587667cc0d927f85e44c139ec9dde13a9e Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 25 十一月 2019 14:30:13 +0800
Subject: [PATCH] 原来的 IOS 工程舍弃(注:没有合并其他组员的代码)

---
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs |   41 ++++++++++++++++++++++-------------------
 1 files changed, 22 insertions(+), 19 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs
index b16f33a..15f6ba8 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs
@@ -102,8 +102,6 @@
             //璋冩暣鍒楄〃鎺т欢鐨勯珮搴�
             this.listview.AdjustRealHeight(Application.GetRealHeight(23));
 
-            //璁剧疆鎺ュ彈鍦ㄧ嚎鐘舵�佹帹閫�
-            this.AddGatewayOnlinePush();
             //寮�鍚綉鍏冲湪绾跨洃娴嬬殑绾跨▼
             this.StartGatewayOnlieCheckThread(listway);
         }
@@ -205,7 +203,10 @@
                 }
                 this.ShowMassage(ShowMsgType.Confirm, msg, () =>
                 {
-                    this.DeleteGateway(strWayId, gatewayRow);
+                    HdlThreadLogic.Current.RunThread(() =>
+                    {
+                        this.DeleteGateway(strWayId, gatewayRow);
+                    });
                 });
             };
 
@@ -217,14 +218,14 @@
             }
 
             //褰撳墠缃戝叧鐨勮鏍�
-            if (strWayId == GatewayResourse.AppOldSelectGatewayId)
-            {
-                var btnNow = new IconViewControl(52);
-                btnNow.Y = Application.GetMinReal(23) + gatewayRow.frameTable.chidrenYaxis;
-                btnNow.UnSelectedImagePath = "Item/NowAcctionTip.png";
-                btnNow.X = gatewayRow.btnName.X + gatewayRow.btnName.GetRealWidthByText(15);
-                gatewayRow.frameTable.AddChidren(btnNow, ChidrenBindMode.BindEventOnly);
-            }
+            //if (strWayId == GatewayResourse.AppOldSelectGatewayId)
+            //{
+            //    var btnNow = new IconViewControl(52);
+            //    btnNow.Y = Application.GetMinReal(23) + gatewayRow.frameTable.chidrenYaxis;
+            //    btnNow.UnSelectedImagePath = "Item/NowAcctionTip.png";
+            //    btnNow.X = gatewayRow.btnName.X + gatewayRow.btnName.GetRealWidthByText(15);
+            //    gatewayRow.frameTable.AddChidren(btnNow, ChidrenBindMode.BindEventOnly);
+            //}
         }
 
         #endregion
@@ -238,8 +239,12 @@
         /// <param name="row"></param>
         private async void DeleteGateway(string strWayId, GatewayRowControl row)
         {
+            //鎵撳紑杩涘害鏉�
+            this.ShowProgressBar();
             //鍒犻櫎浜戠缃戝叧
             bool result = await HdlGatewayLogic.Current.DeleteGateway(strWayId);
+            //鍏抽棴杩涘害鏉�
+            this.CloseProgressBar();
             if (result == false)
             {
                 return;
@@ -251,13 +256,11 @@
                 this.closeDeviceManagForm = true;
                 HdlGatewayLogic.Current.SaveGatewayIdToLocation(string.Empty);
             }
-
-            //绉婚櫎
-            if (this.dicRowContr.ContainsKey(strWayId) == true)
+            HdlThreadLogic.Current.RunMain(() =>
             {
-                this.dicRowContr.Remove(strWayId);
-            }
-            row?.RemoveFromParent();
+                //鍒濆鍖栦腑閮ㄦ帶浠�
+                this.InitMiddleFrame();
+            });
         }
 
         #endregion
@@ -416,9 +419,9 @@
         /// <summary>
         /// 鐢婚潰鍏抽棴
         /// </summary>
-        public override void CloseForm()
+        public override void CloseFormBefore()
         {
-            base.CloseForm();
+            base.CloseFormBefore();
 
             if (this.closeDeviceManagForm == true)
             {

--
Gitblit v1.8.0