From 580a4715eeb88e13128e65963834b159768444cf Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期三, 08 一月 2020 10:19:39 +0800
Subject: [PATCH] 2019.1.8
---
ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs | 27 +++++++++++++++------------
1 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs
index b16f33a..ffbdd5d 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);
+ });
});
};
@@ -222,7 +223,7 @@
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);
+ btnNow.X = gatewayRow.btnName.X + gatewayRow.btnName.GetRealWidthByText();
gatewayRow.frameTable.AddChidren(btnNow, ChidrenBindMode.BindEventOnly);
}
}
@@ -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