| | |
| | | //清空bodyFrame
|
| | | this.ClearBodyFrame();
|
| | |
|
| | | //下一步
|
| | | var btnNext = new BottomClickButton();
|
| | | btnNext.TextID = R.MyInternationalizationString.uNextway;
|
| | | bodyFrameLayout.AddChidren(btnNext);
|
| | | btnNext.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //如果不是热点模式
|
| | | if (HdlWifiLogic.Current.IsGatewayHotspot == false)
|
| | | {
|
| | | //选择hdlZigbeeGW-xxxx网络
|
| | | this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uPleaseSelectGatewayXXNet));
|
| | | return;
|
| | | }
|
| | | var errorMsg = HdlWifiLogic.Current.StartApTcpConnection();
|
| | | if (errorMsg != null)
|
| | | {
|
| | | //拥有错误
|
| | | this.ShowMassage(ShowMsgType.Error, errorMsg);
|
| | | return;
|
| | | }
|
| | | var form = new WirelessApSelectNetworkForm();
|
| | | this.AddFormAndCloseNowForm(form);
|
| | | };
|
| | | //如果不是网关热点
|
| | | if (HdlWifiLogic.Current.IsGatewayHotspot == false)
|
| | | {
|
| | | btnNext.Visible = false;
|
| | | }
|
| | |
|
| | | //图片
|
| | | var framePic = new FrameLayout();
|
| | | framePic.Width = Application.GetMinRealAverage(852);
|
| | | framePic.Height = Application.GetMinRealAverage(478);
|
| | | framePic.Width = this.GetPictrueRealSize(852);
|
| | | framePic.Height = this.GetPictrueRealSize(478);
|
| | | framePic.Gravity = Gravity.CenterHorizontal;
|
| | | framePic.Y = Application.GetRealHeight(285);
|
| | | framePic.BackgroundImagePath = "Gateway/WirelessGatewaySearching.png";
|
| | | bodyFrameLayout.AddChidren(framePic);
|
| | |
|
| | | //跳转到移动设备WLAN设置
|
| | | //选择hdlZigbeeGW-xxxx网络
|
| | | //手机去设置连接网关热点{0}即hdlZigbeeGW-xxxx,密码hdl123456{0}可查看网关背面标签查看热点名字和密码
|
| | | string[] ArryMsg = Language.StringByID(R.MyInternationalizationString.uAddApWirelessGatewayMsg2).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
|
| | | int yy = framePic.Bottom + Application.GetRealHeight(213);
|
| | | foreach (var msg in ArryMsg)
|
| | |
| | | btnSettion.Text = Language.StringByID(R.MyInternationalizationString.uGotoSettion);
|
| | | btnSettion.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | HdlWifiLogic.Current.OpenAppWifiSettion();
|
| | | btnNext.Visible = true;
|
| | | };
|
| | | bodyFrameLayout.AddChidren(btnSettion);
|
| | | //底线
|
| | | int lineWidth = btnSettion.GetRealWidthByText(12);
|
| | | var btnLine1 = new NormalViewControl(lineWidth, ControlCommonResourse.BottomLineHeight, false);
|
| | | int lineWidth = btnSettion.GetRealWidthByText();
|
| | | var btnLine1 = new NormalViewControl(lineWidth, HdlControlResourse.BottomLineHeight, false);
|
| | | btnLine1.BackgroundColor = 0xff0075ff;
|
| | | btnLine1.Gravity = Gravity.CenterHorizontal;
|
| | | btnLine1.Y = btnSettion.Bottom - Application.GetRealHeight(8);
|
| | |
| | | var btnHelp = this.AddHelpControl();
|
| | | btnHelp.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var form = new DeviceDirection.DeviceDirectionHelpForm();
|
| | | form.AddForm("WirelessUdp");
|
| | | };
|
| | |
|
| | | //下一步
|
| | | var btnNext = new BottomClickButton();
|
| | | btnNext.TextID = R.MyInternationalizationString.uNextway;
|
| | | bodyFrameLayout.AddChidren(btnNext);
|
| | | btnNext.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var form = new WirelessApSelectNetworkForm();
|
| | | this.AddFromAndRemoveNowForm(form);
|
| | | var form = new AddGatewayHelpForm();
|
| | | form.AddForm("Ap");
|
| | | };
|
| | | }
|
| | |
|