黄学彪
2019-11-25 160785587667cc0d927f85e44c139ec9dde13a9e
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)
            {