using System;
using System.Collections.Generic;
using System.Text;
namespace Shared.Phone.UserCenter.GatewayManage
{
///
/// 网关添加成功的显示界面
///
public class GatewayAddSuccessForm : EditorCommonForm
{
#region ■ 变量声明___________________________
#endregion
#region ■ 初始化_____________________________
///
/// 画面显示(底层会固定调用此方法,借以完成画面创建)
///
public void ShowForm()
{
if (UserCenterResourse.DicActionForm.ContainsKey("WiredGatewayListForm") == true)
{
//设置头部信息 添加有线网关
base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddWiredGateway));
}
else
{
//设置头部信息 添加无线网关
base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddWirelessGateway));
}
//初始化中部信息
this.InitMiddleFrame();
}
///
/// 初始化中部信息
///
private void InitMiddleFrame()
{
//清空bodyFrame
this.ClearBodyFrame();
var btnPic = new PicViewControl(452, 377);
btnPic.UnSelectedImagePath = "Gateway/AddGatewaySuccess.png";
btnPic.Gravity = Gravity.CenterHorizontal;
btnPic.Y = Application.GetRealHeight(369);
bodyFrameLayout.AddChidren(btnPic);
//添加智能网关成功
var btnMsg = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(85), false);
btnMsg.IsBold = true;
btnMsg.Y = Application.GetRealHeight(732);
btnMsg.TextAlignment = TextAlignment.Center;
btnMsg.TextSize = 20;
btnMsg.TextID = R.MyInternationalizationString.uAddgatewaySuccess;
bodyFrameLayout.AddChidren(btnMsg);
//继续添加网关
var frameAdd = new FrameLayoutStatuControl();
frameAdd.UseClickStatu = false;
frameAdd.Y = Application.GetRealHeight(1224);
frameAdd.Gravity = Gravity.CenterHorizontal;
frameAdd.Width = Application.GetRealWidth(746);
frameAdd.Height = Application.GetRealHeight(184);
frameAdd.BackgroundImagePath = "Item/BottomButtonGround.png";
bodyFrameLayout.AddChidren(frameAdd);
var btnAdd = new NormalViewControl(300, 65, true);
btnAdd.IsBold = true;
btnAdd.TextColor = UserCenterColor.Current.White;
btnAdd.TextSize = 16;
btnAdd.Y = Application.GetRealHeight(49);
btnAdd.Gravity = Gravity.CenterHorizontal;
btnAdd.TextAlignment = TextAlignment.Center;
btnAdd.TextID = R.MyInternationalizationString.uContinuteToAddGateway;
frameAdd.AddChidren(btnAdd, ChidrenBindMode.BindEvent);
frameAdd.ButtonClickEvent += (sender, e) =>
{
//让它退到菜单选择界面
UserCenterLogic.CloseAllOpenForm("NewGateWayMenuSelectForm");
};
//返回主页
var btnGoback = new BottomClickButton(688);
btnGoback.TextID = R.MyInternationalizationString.uGobackToHomePage;
btnGoback.Y = Application.GetRealHeight(1460);
bodyFrameLayout.AddChidren(btnGoback);
btnGoback.ButtonClickEvent += (sender, e) =>
{
//让它退到主页
UserCenterLogic.CloseAllOpenForm();
};
}
#endregion
#region ■ 一般方法___________________________
#endregion
}
}