using System;
|
using System.Collections.Generic;
|
using System.Text;
|
using HDL_ON.UI.CSS;
|
using Shared;
|
|
namespace HDL_ON.UI
|
{
|
/// <summary>
|
/// 欢迎回家的界面
|
/// </summary>
|
public class WellcomToHomeForm
|
{
|
/// <summary>
|
/// 显示欢迎回家的弹窗界面
|
/// </summary>
|
public void ShowForm()
|
{
|
//整个界面的灰色背景
|
var frameBack = new Dialog();
|
|
//中间白色区域
|
var frameWite = new FrameLayout();
|
frameWite.Y = Application.GetRealHeight(223);
|
frameWite.Height = Application.GetRealHeight(245);
|
frameWite.Width = Application.GetRealWidth(288);
|
frameWite.BackgroundColor = CSS.CSS_Color.MainBackgroundColor;
|
frameWite.Radius = (uint)Application.GetRealWidth(12);
|
frameWite.Gravity = Gravity.CenterHorizontal;
|
frameBack.AddChidren(frameWite);
|
|
//Icon图标
|
var picIcon = new Button();
|
picIcon.Y = Application.GetRealHeight(152);
|
picIcon.Height = Application.GetRealWidth(160);
|
picIcon.Width = Application.GetRealWidth(160);
|
picIcon.Gravity = Gravity.CenterHorizontal;
|
picIcon.UnSelectedImagePath = "oRobot.png";
|
frameBack.AddChidren(picIcon);
|
|
//欢迎回家
|
var btnText = new Button();
|
btnText.Y = Application.GetRealHeight(98);
|
btnText.Height = Application.GetRealHeight(24);
|
btnText.TextSize = 16;
|
btnText.TextAlignment = TextAlignment.Center;
|
btnText.TextColor = CSS.CSS_Color.MainColor;
|
btnText.TextID = StringId.WellComBackHome;
|
frameWite.AddChidren(btnText);
|
|
//确认
|
var btnOk = new Button();
|
btnOk.Y = btnText.Bottom + Application.GetRealHeight(48);
|
btnOk.Height = Application.GetRealHeight(44);
|
btnOk.Width = Application.GetRealWidth(220);
|
btnOk.TextSize = 16;
|
btnOk.IsBold = true;
|
btnOk.TextAlignment = TextAlignment.Center;
|
btnOk.TextColor = CSS.CSS_Color.MainBackgroundColor;
|
btnOk.BackgroundColor = CSS.CSS_Color.MainColor;
|
btnOk.Gravity = Gravity.CenterHorizontal;
|
btnOk.Radius = (uint)Application.GetRealHeight(22);
|
btnOk.TextID = StringId.Confirm;
|
frameWite.AddChidren(btnOk);
|
|
btnOk.MouseUpEventHandler += (sender, e) =>
|
{
|
frameBack.Close();
|
};
|
}
|
}
|
}
|