| | |
| | | //调整列表控件的高度
|
| | | this.listview.AdjustRealHeight(Application.GetRealHeight(23));
|
| | |
|
| | | //设置接受在线状态推送
|
| | | this.AddGatewayOnlinePush();
|
| | | //开启网关在线监测的线程
|
| | | this.StartGatewayOnlieCheckThread(listway);
|
| | | }
|
| | |
| | | }
|
| | | this.ShowMassage(ShowMsgType.Confirm, msg, () =>
|
| | | {
|
| | | this.DeleteGateway(strWayId, gatewayRow);
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | this.DeleteGateway(strWayId, gatewayRow);
|
| | | });
|
| | | });
|
| | | };
|
| | |
|
| | |
| | | }
|
| | |
|
| | | //当前网关的角标
|
| | | 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
|
| | |
| | | /// <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;
|
| | |
| | | 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
|
| | |
| | | /// <summary>
|
| | | /// 画面关闭
|
| | | /// </summary>
|
| | | public override void CloseForm()
|
| | | public override void CloseFormBefore()
|
| | | {
|
| | | base.CloseForm();
|
| | | base.CloseFormBefore();
|
| | |
|
| | | if (this.closeDeviceManagForm == true)
|
| | | {
|