HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2021-01-14 d78515ac4ac8cf4a1785d9df18058d6724f12b79
ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewayDirection2Form.cs
@@ -63,47 +63,91 @@
            //图片
            var framePic = new FrameLayout();
            framePic.Width = this.GetPictrueRealSize(852);
            framePic.Height = this.GetPictrueRealSize(478);
            framePic.Width = this.GetPictrueRealSize(848);
            framePic.Height = this.GetPictrueRealSize(475);
            framePic.Gravity = Gravity.CenterHorizontal;
            framePic.Y = Application.GetRealHeight(285);
            framePic.Y = Application.GetRealHeight(199);
            framePic.BackgroundImagePath = "Gateway/WirelessGatewaySearching.png";
            bodyFrameLayout.AddChidren(framePic);
            //手机去设置连接网关热点{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)
            {
                var btnMsg = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false);
                btnMsg.Text = msg;
                btnMsg.Y = yy;
                btnMsg.TextAlignment = TextAlignment.Center;
                btnMsg.TextColor = UserCenterColor.Current.TextGrayColor3;
                bodyFrameLayout.AddChidren(btnMsg);
                yy = btnMsg.Bottom;
            }
            //手机连接网关热点
            var btnTitle = new NormalViewControl(400, 60, true);
            btnTitle.TextID = R.MyInternationalizationString.uMobileConnectionGatewayHotspot;
            btnTitle.X = Application.GetRealWidth(75);
            btnTitle.Y = framePic.Bottom + Application.GetRealHeight(107);
            btnTitle.IsBold = true;
            btnTitle.TextSize = 14;
            bodyFrameLayout.AddChidren(btnTitle);
            //去设置
            var btnSettion = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(50), false);
            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) =>
            //1.网关热点的账号为hdlZigbeeGW-XXX,密码为hdl123456
            //2.具体账号和密码可查看网关标签
            //3.点击"{1}"完成手机连接网关热点
            //4.点击下一步
            string[] ArryMsg = Language.StringByID(R.MyInternationalizationString.uAddApWirelessGatewayMsg2).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
            int yy = btnTitle.Bottom + Application.GetRealHeight(23);
            for (int i = 0; i < ArryMsg.Length; i++)
            {
                HdlWifiLogic.Current.OpenAppWifiSettion();
                btnNext.Visible = true;
            };
            bodyFrameLayout.AddChidren(btnSettion);
            //底线
            int lineWidth = btnSettion.GetRealWidthByText();
            var btnLine1 = new NormalViewControl(lineWidth, ControlCommonResourse.BottomLineHeight, false);
            btnLine1.BackgroundColor = 0xff0075ff;
            btnLine1.Gravity = Gravity.CenterHorizontal;
            btnLine1.Y = btnSettion.Bottom - Application.GetRealHeight(8);
            bodyFrameLayout.AddChidren(btnLine1);
                if (i != 2)
                {
                    var btnMsg = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false);
                    btnMsg.Text = ArryMsg[i];
                    btnMsg.Y = yy;
                    btnMsg.X = btnTitle.X;
                    btnMsg.TextColor = UserCenterColor.Current.TextGrayColor1;
                    btnMsg.TextSize = 12;
                    bodyFrameLayout.AddChidren(btnMsg);
                    yy = btnMsg.Bottom;
                }
                else
                {
                    //3.点击"{1}"完成手机连接网关热点
                    var myArry = ArryMsg[i].Split(new string[] { "{1}" }, StringSplitOptions.RemoveEmptyEntries);
                    //3.点击
                    var btnMsg1 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false);
                    btnMsg1.Text = myArry[0];
                    btnMsg1.Y = yy;
                    btnMsg1.X = btnTitle.X;
                    btnMsg1.TextColor = UserCenterColor.Current.TextGrayColor1;
                    btnMsg1.TextSize = 12;
                    btnMsg1.Width = btnMsg1.GetRealWidthByText();
                    bodyFrameLayout.AddChidren(btnMsg1);
                    //去设置
                    var btnSettion = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false);
                    btnSettion.X = btnMsg1.Right;
                    btnSettion.Y = btnMsg1.Y;
                    btnSettion.TextSize = 12;
                    btnSettion.TextAlignment = TextAlignment.Center;
                    btnSettion.TextColor = 0xff0075ff;
                    btnSettion.Text = Language.StringByID(R.MyInternationalizationString.uGotoSettion);
                    btnSettion.Width = btnSettion.GetRealWidthByText();
                    bodyFrameLayout.AddChidren(btnSettion);
                    btnSettion.ButtonClickEvent += (sender, e) =>
                    {
                        HdlWifiLogic.Current.OpenAppWifiSettion();
                        btnNext.Visible = true;
                    };
                    //底线
                    var btnLine1 = new NormalViewControl(btnSettion.Width, ControlCommonResourse.BottomLineHeight, false);
                    btnLine1.BackgroundColor = 0xff0075ff;
                    btnLine1.X = btnSettion.X;
                    btnLine1.Y = btnSettion.Bottom - Application.GetRealHeight(8);
                    bodyFrameLayout.AddChidren(btnLine1);
                    //完成手机连接网关热点
                    var btnMsg2 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false);
                    btnMsg2.Text = myArry[1];
                    btnMsg2.Y = btnMsg1.Y;
                    btnMsg2.X = btnSettion.Right;
                    btnMsg2.TextColor = UserCenterColor.Current.TextGrayColor1;
                    btnMsg2.TextSize = 12;
                    btnMsg2.Width = btnMsg2.GetRealWidthByText();
                    bodyFrameLayout.AddChidren(btnMsg2);
                    yy = btnMsg1.Bottom;
                }
            }
            //查看帮助
            var btnHelp = this.AddHelpControl();