using System;
using System.Collections.Generic;
using System.Text;
namespace Shared.Phone.UserCenter.GatewayAdd
{
///
/// Mini网关的说明指示界面1
///
public class MiniGatewayDirection1Form : EditorCommonForm
{
#region ■ 初始化_____________________________
///
/// 画面显示(底层会固定调用此方法,借以完成画面创建)
///
public void ShowForm()
{
//设置头部信息
base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddMiniGateway));
//初始化中部信息
this.InitMiddleFrame();
}
///
/// 初始化中部信息
///
private void InitMiddleFrame()
{
//清空bodyFrame
this.ClearBodyFrame();
//图片
var framePic = new FrameLayout();
framePic.Width = this.GetPictrueRealSize(395);
framePic.Height = this.GetPictrueRealSize(223);
framePic.Gravity = Gravity.CenterHorizontal;
framePic.Y = Application.GetRealHeight(325);
framePic.BackgroundImagePath = "Gateway/MiniGatewayDirection.png";
bodyFrameLayout.AddChidren(framePic);
//网关上电配网
var btnTitle = new NormalViewControl(300, 60, true);
btnTitle.TextID = R.MyInternationalizationString.uGatewayPowerDistributionNetwork;
btnTitle.X = Application.GetRealWidth(75);
btnTitle.Y = framePic.Bottom + Application.GetRealHeight(233);
btnTitle.IsBold = true;
btnTitle.TextSize = 14;
bodyFrameLayout.AddChidren(btnTitle);
//1.上电,系统启动(绿灯闪烁50秒){0}2.配网模式(蓝色常亮20秒){0}3.网关建立WI-FI热点成功(蓝灯5秒周期闪烁){0}4.点击下一步
string[] ArryMsg = Language.StringByID(R.MyInternationalizationString.uAddMiniGatewayMsg1).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.X = btnTitle.X;
btnMsg.TextColor = UserCenterColor.Current.TextGrayColor1;
btnMsg.TextSize = 12;
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
}
}