New file |
| | |
| | | using System; |
| | | namespace Shared.Phone.UserCenter.GatewayAdd |
| | | { |
| | | /// <summary> |
| | | /// 添加有线网关的指示图画面 |
| | | /// </summary> |
| | | public class WiredGatewayDirectionForm : EditorCommonForm |
| | | { |
| | | /// <summary> |
| | | /// 画面显示(底层会固定调用此方法,借以完成画面创建) |
| | | /// </summary> |
| | | public void ShowForm() |
| | | { |
| | | //设置标题信息 |
| | | base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddWiredGateway)); |
| | | |
| | | //初始化中部控件 |
| | | this.InitMiddleFrame(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 初始化中部控件 |
| | | /// </summary> |
| | | private void InitMiddleFrame() |
| | | { |
| | | //清空bodyFrame |
| | | this.ClearBodyFrame(); |
| | | |
| | | //图标 |
| | | var btnimage = new PicViewControl(533, 884, true);
|
| | | btnimage.Y = Application.GetRealHeight(173);
|
| | | btnimage.Gravity = Gravity.CenterHorizontal;
|
| | | btnimage.UnSelectedImagePath = "Gateway/WiredGatewayInstruct.png"; |
| | | bodyFrameLayout.AddChidren(btnimage); |
| | | |
| | | //请确保网关与网线连接{0}系统灯每秒闪烁一次 |
| | | string[] strMsg = Language.StringByID(R.MyInternationalizationString.ConfirmLineConnectMsg).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries); |
| | | var btnMsg1 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false);
|
| | | btnMsg1.TextColor = UserCenterColor.Current.TextGrayColor3;
|
| | | btnMsg1.TextAlignment = TextAlignment.Center;
|
| | | btnMsg1.Text = strMsg[0];
|
| | | btnMsg1.Y = btnimage.Bottom + Application.GetRealHeight(101); |
| | | bodyFrameLayout.AddChidren(btnMsg1); |
| | | if (strMsg.Length > 1)
|
| | | {
|
| | | var btnMsg2= new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false);
|
| | | btnMsg2.TextColor = UserCenterColor.Current.TextGrayColor3;
|
| | | btnMsg2.TextAlignment = TextAlignment.Center;
|
| | | btnMsg2.Text = strMsg[1];
|
| | | btnMsg2.Y = btnMsg1.Bottom;
|
| | | bodyFrameLayout.AddChidren(btnMsg2);
|
| | | } |
| | | |
| | | //查看帮助
|
| | | var btnHelp = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(49), 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 DeviceDirection.DeviceDirectionHelpForm();
|
| | | form.AddForm("Gateway");
|
| | | };
|
| | | 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.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | var form = new WiredGatewaySearchForm(); |
| | | this.AddFromAndRemoveNowForm(form); |
| | | }; |
| | | } |
| | | } |
| | | } |