| | |
| | | {
|
| | | //需要重新绑定
|
| | | this.dicZbGatewayDiv[listId[i]] = 2;
|
| | | //获取到了新网关
|
| | | this.newGatewayGetting = true;
|
| | | }
|
| | |
|
| | | if (mode == GatewayBindMode.First)
|
| | |
| | | public override void CloseFormBefore()
|
| | | {
|
| | | ZigBee.Common.Application.IsSearchingGateway = false;
|
| | | //断开没有执行绑定的网关的mqtt
|
| | | var list = new List<ZbGateway>();
|
| | | for (int i = 0; i < ZbGateway.GateWayList.Count; i++)
|
| | | {
|
| | | if (HdlGatewayLogic.Current.IsGatewayExist(ZbGateway.GateWayList[i]) == false)
|
| | | {
|
| | | list.Add(ZbGateway.GateWayList[i]);
|
| | | }
|
| | | }
|
| | | if (list.Count > 0)
|
| | | {
|
| | | foreach (var way in list)
|
| | | {
|
| | | ZbGateway.GateWayList.RemoveAll((obj) => HdlGatewayLogic.Current.GetGatewayId(obj) == HdlGatewayLogic.Current.GetGatewayId(way));
|
| | | way.DisConnectLocalMqttClient("Search");
|
| | | }
|
| | | }
|
| | | if (UserCenterResourse.listActionFormId.Contains("UserMainForm") == false)
|
| | | {
|
| | | //刷新主页
|
| | | UserView.UserPage.Instance.Fresh();
|
| | | }
|
| | |
|
| | | base.CloseFormBefore();
|
| | | }
|