黄学彪
2020-12-17 9f326f4000847e6167d8166fa2f6a66f53cb3734
ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessUdpDirectionForm.cs
@@ -33,42 +33,42 @@
            //图片
            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(251);
            framePic.BackgroundImagePath = "Gateway/WirelessGatewaySearching.png";
            bodyFrameLayout.AddChidren(framePic);
            //跳转到移动设备
            var btnMsg1 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false);
            btnMsg1.Y = framePic.Bottom + Application.GetRealHeight(248);
            btnMsg1.TextID = R.MyInternationalizationString.uJumpToMobileDevice;
            btnMsg1.TextAlignment = TextAlignment.Center;
            btnMsg1.TextColor = UserCenterColor.Current.TextGrayColor3;
            bodyFrameLayout.AddChidren(btnMsg1);
            //WLAN设置连接家庭WiFi
            var btnMsg2 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false);
            btnMsg2.Y = btnMsg1.Bottom;
            btnMsg2.TextID = R.MyInternationalizationString.uWlanConnectHomeWifi;
            btnMsg2.TextAlignment = TextAlignment.Center;
            btnMsg2.TextColor = UserCenterColor.Current.TextGrayColor3;
            bodyFrameLayout.AddChidren(btnMsg2);
            //请先去设置手机连接到路由器{0}然后长按网关HID/WCFG按键大概20秒{0}直到系统指示灯快闪{0}网关进入UDP模式WIFI配网
            string[] strMsg = Language.StringByID(R.MyInternationalizationString.uAddUdpWirelessGatewayMsg2).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
            int YY = framePic.Bottom + Application.GetRealHeight(128);
            for (int i = 0; i < strMsg.Length; i++)
            {
                var btnMsg1 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false);
                btnMsg1.Y = YY;
                btnMsg1.Text = strMsg[i];
                btnMsg1.TextAlignment = TextAlignment.Center;
                btnMsg1.TextColor = UserCenterColor.Current.TextGrayColor3;
                bodyFrameLayout.AddChidren(btnMsg1);
                YY = btnMsg1.Bottom;
            }
            //去设置
            var btnSettion = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(50), false);
            btnSettion.Y = btnMsg2.Bottom + Application.GetRealHeight(12);
            btnSettion.Y = YY + Application.GetRealHeight(12);
            btnSettion.TextSize = 12;
            btnSettion.TextAlignment = TextAlignment.Center;
            btnSettion.TextColor = 0xff0075ff;
            btnSettion.Text = Language.StringByID(R.MyInternationalizationString.uGotoSettion);
            btnSettion.ButtonClickEvent += (sender, e) =>
            {
                HdlWifiLogic.Current.OpenAppWifiSettion();
            };
            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);
@@ -78,10 +78,9 @@
            var btnHelp = this.AddHelpControl();
            btnHelp.ButtonClickEvent += (sender, e) =>
            {
                var form = new DeviceDirection.DeviceDirectionHelpForm();
                form.AddForm("WirelessUdp");
                var form = new AddGatewayHelpForm();
                form.AddForm("Udp");
            };
            bodyFrameLayout.AddChidren(btnHelp);
            //下一步
            var btnNext = new BottomClickButton();
@@ -89,8 +88,8 @@
            bodyFrameLayout.AddChidren(btnNext);
            btnNext.ButtonClickEvent += (sender, e) =>
            {
                var form = new Device.DeviceSearchForm();
                form.AddForm(this.FormID);
                var form = new WirelessUdpSelectNetworkForm();
                this.AddFormAndCloseNowForm(form);
            };
        }