| | |
| | |
|
| | | //图片
|
| | | var framePic = new FrameLayout();
|
| | | framePic.Width = this.GetPictrueRealSize(392);
|
| | | framePic.Height = this.GetPictrueRealSize(259);
|
| | | framePic.Width = this.GetPictrueRealSize(386);
|
| | | framePic.Height = this.GetPictrueRealSize(255);
|
| | | framePic.Gravity = Gravity.CenterHorizontal;
|
| | | framePic.Y = Application.GetRealHeight(426);
|
| | | framePic.Y = Application.GetRealHeight(228);
|
| | | framePic.BackgroundImagePath = "Gateway/WirelessApDirection.png";
|
| | | bodyFrameLayout.AddChidren(framePic);
|
| | |
|
| | | //请先长按HID/WCFG按键大概5秒{0}直到系统指示灯常亮{0}网关进入AP模式热点
|
| | | string[] ArryMsg = Language.StringByID(R.MyInternationalizationString.uAddApWirelessGatewayMsg1).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
|
| | | int yy = framePic.Bottom + Application.GetRealHeight(291);
|
| | | //网关上电配网
|
| | | var btnTitle = new NormalViewControl(300, 60, true);
|
| | | btnTitle.TextID = R.MyInternationalizationString.uGatewayPowerDistributionNetwork;
|
| | | btnTitle.X = Application.GetRealWidth(75);
|
| | | btnTitle.Y = framePic.Bottom + Application.GetRealHeight(213);
|
| | | btnTitle.IsBold = true;
|
| | | btnTitle.TextSize = 14;
|
| | | bodyFrameLayout.AddChidren(btnTitle);
|
| | |
|
| | | //1.上电,系统启动(系统指示灯SYS 7秒后亮起,持续50秒常亮)
|
| | | //2.网关连接局域网(SYS 3秒周期闪烁,灯光偏暗,持续20秒)
|
| | | //3.网关建立WI-FI热点(SYS 5秒周期闪烁,灯光变亮)
|
| | | //4.网关建立热点成功
|
| | | //5.点击下一步
|
| | | string[] ArryMsg = Language.StringByID(R.MyInternationalizationString.uAddWirelessApGatewayMsg1).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
|
| | | int YY = btnTitle.Bottom + Application.GetRealHeight(23);
|
| | | 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 btnMsg1 = new NormalViewControl(942, 60, true);
|
| | | btnMsg1.TextColor = UserCenterColor.Current.TextGrayColor1;
|
| | | btnMsg1.TextSize = 12;
|
| | | btnMsg1.Text = msg;
|
| | | btnMsg1.Y = YY;
|
| | | btnMsg1.X = Application.GetRealWidth(75);
|
| | | btnMsg1.IsMoreLines = true;
|
| | | btnMsg1.Height = Application.GetRealHeight(60) * this.GetRowCountByTextLength(btnMsg1, 942);
|
| | | bodyFrameLayout.AddChidren(btnMsg1);
|
| | |
|
| | | YY = btnMsg1.Bottom;
|
| | | }
|
| | |
|
| | | //查看帮助
|
| | |
| | | };
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 根据文本长度,获取行数
|
| | | /// </summary>
|
| | | /// <param name="btnContr"></param>
|
| | | /// <param name="i_width"></param>
|
| | | /// <returns></returns>
|
| | | private int GetRowCountByTextLength(NormalViewControl btnContr, int i_width)
|
| | | {
|
| | | int realWidth = btnContr.GetRealWidthByText();
|
| | | int myWidth = Application.GetRealWidth(i_width);
|
| | |
|
| | | int row = realWidth / myWidth;
|
| | | int value = realWidth % myWidth;
|
| | | if (value > 8)
|
| | | {
|
| | | row++;
|
| | | }
|
| | | return row;
|
| | | }
|
| | |
|
| | | #endregion
|
| | | }
|
| | | }
|