| | |
| | | //单击事件
|
| | | gatewayRow.frameTable.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | if (UserCenterResourse.HideOption.GotoGatewayProductInfoForm == 1)
|
| | | if (HdlUserCenterResourse.HideOption.GotoGatewayProductInfoForm == 1)
|
| | | {
|
| | | //强制跳转
|
| | | var form2 = new GatewayProductInfoForm();
|
| | |
| | | btnSwitch.TextColor = UserCenterColor.Current.White;
|
| | | btnSwitch.TextSize = 12;
|
| | | btnSwitch.TextID = R.MyInternationalizationString.uSwitch1;
|
| | | if (strWayId == GatewayResourse.AppOldSelectGatewayId)
|
| | | if (strWayId == HdlGatewayResourse.AppOldSelectGatewayId)
|
| | | {
|
| | | btnSwitch.TextID = R.MyInternationalizationString.uRefresh;
|
| | | }
|
| | |
| | | {
|
| | | //是否切换到{0}网关?
|
| | | string msg = string.Format(Language.StringByID(R.MyInternationalizationString.uConfirmWantToSwitchTheGateway), "[" + gatewayRow.btnName.Text + "]");
|
| | | if (strWayId == GatewayResourse.AppOldSelectGatewayId)
|
| | | if (strWayId == HdlGatewayResourse.AppOldSelectGatewayId)
|
| | | {
|
| | | //是否重新刷新{0}网关?
|
| | | msg = string.Format(Language.StringByID(R.MyInternationalizationString.uConfirmWantToRefreshTheGateway), "[" + gatewayRow.btnName.Text + "]");
|
| | |
| | |
|
| | | this.dicRowContr[strWayId] = gatewayRow;
|
| | | //设置一个选择网关的默认值
|
| | | if (string.IsNullOrEmpty(GatewayResourse.AppOldSelectGatewayId) == true)
|
| | | if (string.IsNullOrEmpty(HdlGatewayResourse.AppOldSelectGatewayId) == true)
|
| | | {
|
| | | HdlGatewayLogic.Current.SaveGatewayIdToLocation(strWayId);
|
| | | }
|
| | |
|
| | | //当前网关的角标
|
| | | if (strWayId == GatewayResourse.AppOldSelectGatewayId)
|
| | | if (strWayId == HdlGatewayResourse.AppOldSelectGatewayId)
|
| | | {
|
| | | var btnNow = new IconViewControl(52);
|
| | | btnNow.Y = Application.GetMinReal(23) + gatewayRow.frameTable.chidrenYaxis;
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | if (strWayId == GatewayResourse.AppOldSelectGatewayId)
|
| | | if (strWayId == HdlGatewayResourse.AppOldSelectGatewayId)
|
| | | {
|
| | | //如果解除绑定的网关是当前所选择的网关的话,则关闭设备管理界面
|
| | | this.closeDeviceManagForm = true;
|
| | |
| | |
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | if (UserCenterResourse.DicActionForm.ContainsKey("DeviceListMainForm") == false)
|
| | | if (HdlFormLogic.Current.IsFormOpen("DeviceListMainForm") == false)
|
| | | {
|
| | | //刷新主画面
|
| | | var form = new Device.DeviceListMainForm();
|
| | | this.AddFromAndRemoveNowForm(form);
|
| | | this.AddFormAndCloseNowForm(form);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | public override int FormActionAgainEvent()
|
| | | {
|
| | | //进到这个界面,理论上前回的网关id是有的,如果为空了,应该是当前的网关被解绑了
|
| | | if (GatewayResourse.AppOldSelectGatewayId == string.Empty)
|
| | | if (HdlGatewayResourse.AppOldSelectGatewayId == string.Empty)
|
| | | {
|
| | | //关闭设备列表
|
| | | this.closeDeviceManagForm = true;
|