New file |
| | |
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using System.Text;
|
| | |
|
| | | namespace Shared.Phone.UserCenter.GatewayAdd
|
| | | {
|
| | | /// <summary>
|
| | | /// Mini网关的说明指示界面1
|
| | | /// </summary>
|
| | | public class MiniGatewayDirection1Form : EditorCommonForm
|
| | | {
|
| | | #region ■ 初始化_____________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 画面显示(底层会固定调用此方法,借以完成画面创建)
|
| | | /// </summary>
|
| | | public void ShowForm()
|
| | | {
|
| | | //设置头部信息
|
| | | base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddMiniGateway));
|
| | |
|
| | | //初始化中部信息
|
| | | this.InitMiddleFrame();
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 初始化中部信息
|
| | | /// </summary>
|
| | | private void InitMiddleFrame()
|
| | | {
|
| | | //清空bodyFrame
|
| | | this.ClearBodyFrame();
|
| | |
|
| | | //图片
|
| | | var framePic = new FrameLayout();
|
| | | framePic.Width = this.GetPictrueRealSize(395);
|
| | | framePic.Height = this.GetPictrueRealSize(327);
|
| | | framePic.Gravity = Gravity.CenterHorizontal;
|
| | | framePic.Y = Application.GetRealHeight(363);
|
| | | framePic.BackgroundImagePath = "Gateway/MiniGatewayDirection.png";
|
| | | bodyFrameLayout.AddChidren(framePic);
|
| | |
|
| | | //开关键
|
| | | var btnSwitch = new NormalViewControl(this.GetPictrueRealSize(400), this.GetPictrueRealSize(45), false);
|
| | | btnSwitch.X = framePic.X + this.GetPictrueRealSize(60);
|
| | | btnSwitch.TextColor = UserCenterColor.Current.TextGrayColor3;
|
| | | btnSwitch.TextSize = 10;
|
| | | btnSwitch.TextID = R.MyInternationalizationString.uSwitchButton;
|
| | | bodyFrameLayout.AddChidren(btnSwitch);
|
| | | btnSwitch.Y = framePic.Y - btnSwitch.Height;
|
| | |
|
| | | //插电后,长按网关开关键5秒{0}系统灯常亮60秒后则进入配网状态
|
| | | string[] ArryMsg = Language.StringByID(R.MyInternationalizationString.uAddMiniGatewayMsg1).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
|
| | | int yy = framePic.Bottom + Application.GetRealHeight(291);
|
| | | 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 btnHelp = this.AddHelpControl();
|
| | | btnHelp.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var form = new AddGatewayHelpForm();
|
| | | form.AddForm("Mini");
|
| | | };
|
| | |
|
| | | //下一步
|
| | | var btnNext = new BottomClickButton();
|
| | | btnNext.TextID = R.MyInternationalizationString.uNextway;
|
| | | bodyFrameLayout.AddChidren(btnNext);
|
| | | btnNext.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | this.CloseForm();
|
| | | var form = new MiniGatewayDirection2Form();
|
| | | form.AddForm();
|
| | | };
|
| | | }
|
| | |
|
| | | #endregion
|
| | | }
|
| | | }
|