From 66a9965c44ecc32a6696abca876ab9d1cd091584 Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期五, 28 二月 2020 15:25:13 +0800 Subject: [PATCH] 2020.2.28 --- ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs | 35 ++++++++++++++++++++++++----------- 1 files changed, 24 insertions(+), 11 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs index 05a06bb..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); + }); }); }; @@ -214,6 +215,16 @@ if (string.IsNullOrEmpty(GatewayResourse.AppOldSelectGatewayId) == true) { HdlGatewayLogic.Current.SaveGatewayIdToLocation(strWayId); + } + + //褰撳墠缃戝叧鐨勮鏍� + 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(); + gatewayRow.frameTable.AddChidren(btnNow, ChidrenBindMode.BindEventOnly); } } @@ -228,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; @@ -241,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 @@ -406,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