| | |
| | |
|
| | | //图标
|
| | | var picGwImage = new FrameLayout();
|
| | | picGwImage.Width = Application.GetMinRealAverage(861);
|
| | | picGwImage.Height = Application.GetMinRealAverage(478);
|
| | | picGwImage.Y = Application.GetRealWidth(251);
|
| | | picGwImage.Width = this.GetPictrueRealSize(861);
|
| | | picGwImage.Height = this.GetPictrueRealSize(478);
|
| | | picGwImage.Y = Application.GetRealHeight(251);
|
| | | picGwImage.Gravity = Gravity.CenterHorizontal;
|
| | | picGwImage.BackgroundImagePath = "Gateway/WiredGatewaySearching.png";
|
| | | bodyFrameLayout.AddChidren(picGwImage);
|
| | |
| | |
|
| | | //图标
|
| | | var picGwImage = new FrameLayout();
|
| | | picGwImage.Width = Application.GetMinRealAverage(861);
|
| | | picGwImage.Height = Application.GetMinRealAverage(478);
|
| | | picGwImage.Width = this.GetPictrueRealSize(861);
|
| | | picGwImage.Height = this.GetPictrueRealSize(478);
|
| | | picGwImage.Y = Application.GetRealWidth(158);
|
| | | picGwImage.Gravity = Gravity.CenterHorizontal;
|
| | | picGwImage.BackgroundImagePath = "Gateway/WiredGatewaySearching.png";
|
| | |
| | | var btnFailIcon = new PicViewControl(66, 66);
|
| | | btnFailIcon.UnSelectedImagePath = "Item/FailIcon.png";
|
| | | btnFailIcon.Gravity = Gravity.CenterHorizontal;
|
| | | btnFailIcon.Y = Application.GetMinRealAverage(181);
|
| | | btnFailIcon.Y = this.GetPictrueRealSize(181);
|
| | | picGwImage.AddChidren(btnFailIcon);
|
| | | //搜索失败
|
| | | var btnFailView = new NormalViewControl(300, 60, true);
|
| | | btnFailView.TextAlignment = TextAlignment.Center;
|
| | | btnFailView.Y = Application.GetMinRealAverage(305);
|
| | | btnFailView.Y = this.GetPictrueRealSize(305);
|
| | | btnFailView.Gravity = Gravity.CenterHorizontal;
|
| | | btnFailView.TextColor = UserCenterColor.Current.TextGrayColor3;
|
| | | btnFailView.TextID = R.MyInternationalizationString.uSearchFail;
|
| | |
| | | btnMsg1.Y = picGwImage.Bottom + Application.GetRealHeight(112);
|
| | | btnMsg1.TextID = R.MyInternationalizationString.uSearchGatewayFailMsg1;
|
| | | bodyFrameLayout.AddChidren(btnMsg1);
|
| | | //1.长按ZB/RST键20秒,网关恢复出厂设置,指示灯全部熄灭后,重新入网。
|
| | | //1.短按HID/WCFG按键,系统指示灯快闪3秒,网关进入换绑模式,强制网关绑定到当前APP
|
| | | var btnMsg2 = new NormalViewControl(930, 100, true);
|
| | | btnMsg2.X = Application.GetRealWidth(75);
|
| | | btnMsg2.Y = btnMsg1.Bottom + Application.GetRealHeight(35);
|
| | |
| | | btnMsg2.TextColor = UserCenterColor.Current.TextGrayColor1;
|
| | | btnMsg2.IsMoreLines = true;
|
| | | bodyFrameLayout.AddChidren(btnMsg2);
|
| | | //2.点按HID/WCFG键,进入网关换绑模式,系统指示灯快闪5秒。
|
| | | //2.长按网关ZB/RST按键20秒以上,直到所有指示灯同时灭,即恢复出厂设置并重启
|
| | | var btnMsg3 = new NormalViewControl(930, 100, true);
|
| | | btnMsg3.X = Application.GetRealWidth(75);
|
| | | btnMsg3.Y = btnMsg2.Bottom + Application.GetRealHeight(12);
|
| | |
| | | bodyFrameLayout.AddChidren(btnMsg5);
|
| | |
|
| | | //重试
|
| | | var frameback = new FrameLayoutControl();
|
| | | var frameback = new FrameLayoutStatuControl();
|
| | | frameback.UseClickStatu = false;
|
| | | frameback.Y = Application.GetRealHeight(1259);
|
| | | frameback.Gravity = Gravity.CenterHorizontal;
|
| | |
| | | frameback.BackgroundImagePath = "Item/BottomButtonGround.png";
|
| | | bodyFrameLayout.AddChidren(frameback);
|
| | | var btnReDo = new NormalViewControl(300, 65, true);
|
| | | btnReDo.IsBold = true;
|
| | | btnReDo.TextColor = UserCenterColor.Current.White;
|
| | | btnReDo.TextSize = 16;
|
| | | btnReDo.Y = Application.GetRealHeight(49);
|
| | |
| | | private void InitConcetionAnimete(FrameLayout picGwImage, NormalViewControl btnMsg)
|
| | | {
|
| | | //首格的X轴
|
| | | int firstPoint = Application.GetMinRealAverage(288);
|
| | | int firstPoint = this.GetPictrueRealSize(288);
|
| | | //一格的宽度
|
| | | int width = Application.GetMinRealAverage(22);
|
| | | int width = this.GetPictrueRealSize(22);
|
| | | //间距大小
|
| | | int space = Application.GetMinRealAverage(12);
|
| | | int space = this.GetPictrueRealSize(12);
|
| | |
|
| | | //生成格子坐标
|
| | | var listPoint = new List<int>();
|
| | |
| | | var btnRound = new PicViewControl(width, width, false);
|
| | | btnRound.Radius = (uint)width / 2;
|
| | | btnRound.BackgroundColor = UserCenterColor.Current.ConcetionRoundColor;
|
| | | btnRound.Y = Application.GetMinRealAverage(202);
|
| | | btnRound.Y = this.GetPictrueRealSize(202);
|
| | | btnRound.X = listPoint[0];
|
| | | picGwImage.AddChidren(btnRound);
|
| | |
|
| | |
| | | {
|
| | | //需要重新绑定
|
| | | 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();
|
| | | }
|
| | |
|