WJC
2019-11-07 2109463fab2eb1caed189e4f258e0e763c5cea7b
ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorCarbonMonoxideDirectionForm.cs
@@ -7,7 +7,7 @@
    /// <summary>
    /// 燃气传感器的添加步骤界面
    /// </summary>
    public class SensorCarbonMonoxideDirectionForm : EditorCommonForm
    public class SensorCarbonMonoxideDirectionForm : DirectionCommonForm
    {
        #region ■ 初始化_____________________________
@@ -28,9 +28,6 @@
        /// </summary>
        private void InitMiddleFrame()
        {
            //清空bodyFrame
            this.ClearBodyFrame();
            //图片
            var framePic = new FrameLayout();
            framePic.Width = Application.GetMinRealAverage(861);
@@ -59,25 +56,12 @@
            {
                textMsg = string.Format(textMsg, "5");
            }
            int index = textMsg.IndexOf("(");
            string textMsg1 = textMsg.Substring(0, index);
            string textMsg2 = textMsg.Substring(index, textMsg.Length - index);
            var btnSecond1 = new NormalViewControl(Application.GetMinRealAverage(120), Application.GetMinRealAverage(45), false);
            btnSecond1.X = Application.GetMinRealAverage(138);
            btnSecond1.Y = Application.GetMinRealAverage(177);
            btnSecond1.TextColor = UserCenterColor.Current.TextGrayColor3;
            btnSecond1.TextAlignment = TextAlignment.Center;
            btnSecond1.TextSize = 10;
            btnSecond1.Text = textMsg1;
            framePic.AddChidren(btnSecond1);
            var btnSecond2 = new NormalViewControl(Application.GetMinRealAverage(120), Application.GetMinRealAverage(45), false);
            btnSecond2.X = btnSecond1.X;
            btnSecond2.Y = btnSecond1.Bottom;
            var btnSecond2 = new NormalViewControl(Application.GetMinRealAverage(357), Application.GetMinRealAverage(45), false);
            btnSecond2.Y = Application.GetMinRealAverage(222);
            btnSecond2.TextColor = UserCenterColor.Current.TextGrayColor3;
            btnSecond2.TextSize = 10;
            btnSecond2.TextAlignment = TextAlignment.Center;
            btnSecond2.Text = textMsg2;
            btnSecond2.Text = textMsg;
            framePic.AddChidren(btnSecond2);
            //长按图示按键5秒以上,绿色快闪
@@ -99,37 +83,6 @@
            msg2.TextColor = UserCenterColor.Current.TextGrayColor3;
            msg2.TextAlignment = TextAlignment.Center;
            bodyFrameLayout.AddChidren(msg2);
            //查看帮助
            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