黄学彪
2020-12-17 9f326f4000847e6167d8166fa2f6a66f53cb3734
ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AirConditionerZbGatewayDirectionForm.cs
@@ -7,7 +7,7 @@
    /// <summary>
    /// 空调的添加步骤界面
    /// </summary>
    public class AirConditionerZbGatewayDirectionForm : EditorCommonForm
    public class AirConditionerZbGatewayDirectionForm : DirectionCommonForm
    {
        #region ■ 初始化_____________________________
@@ -28,28 +28,24 @@
        /// </summary>
        private void InitMiddleFrame()
        {
            //清空bodyFrame
            this.ClearBodyFrame();
            //图片
            var framePic = new FrameLayout();
            framePic.Width = Application.GetMinRealAverage(893);
            framePic.Height = Application.GetMinRealAverage(852);
            framePic.Width = this.GetPictrueRealSize(842);
            framePic.Height = this.GetPictrueRealSize(764);
            framePic.Gravity = Gravity.CenterHorizontal;
            framePic.Y = Application.GetRealHeight(75);
            framePic.Y = Application.GetRealHeight(78);
            bodyFrameLayout.AddChidren(framePic);
            var btnPic = new PicViewControl(framePic.Width, framePic.Height, false);
            btnPic.UnSelectedImagePath = "Instruct/AirConditionerZbGateway.png";
            framePic.AddChidren(btnPic);
            //绿色指示灯闪烁
            var btnGreanLinght = new NormalViewControl(Application.GetMinRealAverage(475), Application.GetMinRealAverage(45), false);
            btnGreanLinght.X = Application.GetMinRealAverage(415);
            btnGreanLinght.Y = Application.GetMinRealAverage(272);
            //DATA绿色指示灯闪烁
            var btnGreanLinght = new NormalViewControl(this.GetPictrueRealSize(512), this.GetPictrueRealSize(45), false);
            btnGreanLinght.Y = this.GetPictrueRealSize(352);
            btnGreanLinght.TextAlignment = TextAlignment.Center;
            btnGreanLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
            btnGreanLinght.TextSize = 10;
            btnGreanLinght.TextID = R.MyInternationalizationString.uGreanPilotLampLinght;
            btnGreanLinght.TextID = R.MyInternationalizationString.uDataGreanPilotLampLinght;
            framePic.AddChidren(btnGreanLinght);
            //长按5秒
@@ -58,17 +54,16 @@
            {
                textMsg = string.Format(textMsg, "5");
            }
            var btnSecond = new NormalViewControl(Application.GetMinRealAverage(360), Application.GetMinRealAverage(45), false);
            btnSecond.X = Application.GetMinRealAverage(573);
            btnSecond.Y = Application.GetMinRealAverage(718);
            var btnSecond = new NormalViewControl(this.GetPictrueRealSize(167), this.GetPictrueRealSize(45), false);
            btnSecond.Y = this.GetPictrueRealSize(629);
            btnSecond.TextColor = UserCenterColor.Current.TextGrayColor3;
            btnSecond.TextSize = 10;
            btnSecond.Text = textMsg;
            btnSecond.TextAlignment = TextAlignment.Center;
            framePic.AddChidren(btnSecond);
            //长按图示按键5秒以上,指示灯
            //变绿闪烁,进入配网状态
            //绿灯每5秒闪烁一次则入网成功
            //长按编程按键5秒,DATA绿色LED闪烁,
            //频率为亮0.5秒,灭0.5秒
            string[] msgArry = Language.StringByID(R.MyInternationalizationString.uAddAirConditionerZbGatewayMsg).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
            var msg1 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false);
@@ -86,46 +81,6 @@
            msg2.TextColor = UserCenterColor.Current.TextGrayColor3;
            msg2.TextAlignment = TextAlignment.Center;
            bodyFrameLayout.AddChidren(msg2);
            var msg3 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false);
            msg3.Y = msg2.Bottom;
            if (msgArry.Length > 2)
            {
                msg3.Text = msgArry[2];
            }
            msg3.TextColor = UserCenterColor.Current.TextGrayColor3;
            msg3.TextAlignment = TextAlignment.Center;
            bodyFrameLayout.AddChidren(msg3);
            //查看帮助
            var btnHelp = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(50), false);
            btnHelp.Y = Application.GetRealHeight(1388);
            btnHelp.TextSize = 12;
            btnHelp.TextAlignment = TextAlignment.Center;
            btnHelp.TextColor = UserCenterColor.Current.TextOrangeColor;
            btnHelp.Text = Language.StringByID(R.MyInternationalizationString.uSearchHelp);
            btnHelp.ButtonClickEvent += (sender, e) =>
            {
                var form = new DeviceDirectionHelpForm();
                form.AddForm(string.Empty);
            };
            bodyFrameLayout.AddChidren(btnHelp);
            //底线
            int lineWidth = btnHelp.GetRealWidthByText(12);
            var btnLine = new NormalViewControl(lineWidth, ControlCommonResourse.BottomLineHeight, false);
            btnLine.BackgroundColor = UserCenterColor.Current.TextOrangeColor;
            btnLine.Gravity = Gravity.CenterHorizontal;
            btnLine.Y = btnHelp.Bottom - Application.GetRealHeight(8);
            bodyFrameLayout.AddChidren(btnLine);
            //下一步
            var btnNext = new BottomClickButton();
            btnNext.TextID = R.MyInternationalizationString.uNextway;
            bodyFrameLayout.AddChidren(btnNext);
            btnNext.ButtonClickEvent += (sender, e) =>
            {
                var form = new Device.DeviceSearchForm();
                form.AddForm(this.FormID);
            };
        }
        #endregion