| | |
| | | if (goNext) { |
| | | //先重置 |
| | | goNext = false; |
| | | //网关版本符合要求,判断是否绑定网关成功,绑定成功了才能进行下一步 |
| | | //网关版本符合要求,继续判断是否绑定网关成功,绑定成功了才能进行下一步跳转设备搜索页面 |
| | | goNext = CheckIfBindGatewaySuccess (common); |
| | | } |
| | | |
| | |
| | | inThisView = false; |
| | | if (inView != null) { |
| | | Utlis.WriteLine ("inView != null"); |
| | | //跳转设备搜索页面 |
| | | var deviceListView = new GuideSettingGateway (common); |
| | | (inView.Parent as PageLayout).AddChidren (deviceListView); |
| | | deviceListView.ShowPage (); |
| | |
| | | { |
| | | try { |
| | | if (UserConfig.Instance.CheckHomeGatewaysNotEmpty ()) { |
| | | //之前绑定过网关,并且和当前搜索到到网关一致 |
| | | if (UserConfig.Instance.HomeGateway.mac.ToUpper () == gatewayBase.MAC.Replace (".", "").ToUpper ()) { |
| | | //之前绑定过网关,并且和当前搜索到到网关一致,子网号设备号都要一致 |
| | | if (UserConfig.Instance.HomeGateway.mac.ToUpper () == gatewayBase.MAC.Replace (".", "").ToUpper () |
| | | && UserConfig.Instance.HomeGateway.subnetId == gatewayBase.SubnetID |
| | | && UserConfig.Instance.HomeGateway.deviceId == gatewayBase.DeviceID |
| | | ) { |
| | | return true; |
| | | } |
| | | } |
| | |
| | | //重新绑定 |
| | | var bindGatewayObj = new BindGatewayObj () { |
| | | homeId = UserConfig.Instance.CurrentRegion.Id, |
| | | subnetId = gatewayBase.sceneID, |
| | | subnetId = gatewayBase.SubnetID, |
| | | deviceId = gatewayBase.DeviceID, |
| | | gatewayType = GatewayType.BUSUDPGATEWAY.ToString (), |
| | | mac = gatewayMAC |
| | |
| | | IMessageCommon.Current.ShowErrorInfoAlter (revertObj.Code); |
| | | } |
| | | } catch { |
| | | |
| | | Utlis.WriteLine ("绑定网关失败"); |
| | | } |
| | | return false; |
| | | } |