From 21736b2944d5e88cd705a39ff87fd73d5a16e609 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期六, 09 五月 2020 11:06:35 +0800 Subject: [PATCH] 安川 --- ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs | 45 +++++++++++++++++++++++++-------------------- 1 files changed, 25 insertions(+), 20 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs index b16f33a..3ac8791 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); } @@ -138,6 +136,13 @@ //鍗曞嚮浜嬩欢 gatewayRow.frameTable.ButtonClickEvent += (sender, e) => { + if (UserCenterResourse.HideOption.GotoGatewayProductInfoForm == 1) + { + //寮哄埗璺宠浆 + var form2 = new GatewayProductInfoForm(); + form2.AddForm(gateway); + return; + } var form = new GatewayInfoEditorForm(); form.AddForm(gateway); }; @@ -174,13 +179,8 @@ }; //瀹氫綅 - var btnPosition = new NormalViewControl(Application.GetRealWidth(184), gatewayRow.Height, false); - btnPosition.BackgroundColor = 0xff4a4a4a; - btnPosition.TextAlignment = TextAlignment.Center; - btnPosition.TextColor = UserCenterColor.Current.White; - btnPosition.TextSize = 12; + var btnPosition = gatewayRow.AddEditorControl(false); btnPosition.TextID = R.MyInternationalizationString.uFixedPosition; - gatewayRow.AddRightView(btnPosition); btnPosition.ButtonClickEvent += (sender, e) => { //鍙戦�佸畾浣嶅懡浠� @@ -205,7 +205,10 @@ } this.ShowMassage(ShowMsgType.Confirm, msg, () => { - this.DeleteGateway(strWayId, gatewayRow); + HdlThreadLogic.Current.RunThread(() => + { + this.DeleteGateway(strWayId, gatewayRow); + }); }); }; @@ -222,7 +225,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 +241,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 +258,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 @@ -292,7 +297,7 @@ //鍏抽棴鐣岄潰 this.CloseForm(); //鍒锋柊涓荤敾闈�(涓嶉噸鏂拌幏鍙栬澶囩姸鎬�) - this.LoadFormMethodByName("DeviceListMainForm", "InitMiddleFrame", false); + this.LoadFormMethodByName("DeviceListMainForm", "InitMiddleFrame"); } }); } @@ -358,7 +363,7 @@ string gwid = HdlGatewayLogic.Current.GetGatewayId(gateWay); if (this.dicRowContr.ContainsKey(gwid) == true && this.dicRowContr[gwid] != null) { - this.dicRowContr[gwid].RefreshControl(gateWay); + this.dicRowContr[gwid].IsOnline = online; } }); } @@ -416,9 +421,9 @@ /// <summary> /// 鐢婚潰鍏抽棴 /// </summary> - public override void CloseForm() + public override void CloseFormBefore() { - base.CloseForm(); + base.CloseFormBefore(); if (this.closeDeviceManagForm == true) { -- Gitblit v1.8.0