using Shared.SimpleControl.Phone;
|
using System;
|
|
namespace Shared.SimpleControl.Pad
|
{
|
/// <summary>
|
/// 后面配置界面的标题栏
|
/// </summary>
|
public static class SystemTop
|
{
|
/// <summary>
|
/// 主视图
|
/// </summary>
|
public static readonly FrameLayout FrameLayoutMain = new FrameLayout () {
|
Y = Application.GetRealHeight (20),
|
Height = Application.GetRealHeight (130)
|
};
|
|
/// <summary>
|
/// 初始化当前视图
|
/// </summary>
|
public static void Init()
|
{
|
if (null != FrameLayoutMain.Parent) {
|
return;
|
}
|
SystemHomePage.FrameLayoutMain.AddChidren (FrameLayoutMain);
|
initTopFrameLaout ();
|
}
|
|
/// <summary>
|
/// 初始所有的视图
|
/// </summary>
|
private static void initTopFrameLaout()
|
{
|
Button LogoButton = new Button () {
|
Width = Application.GetRealWidth (154),
|
Height = Application.GetRealHeight (90),
|
X = Application.GetRealWidth (486),
|
UnSelectedImagePath = MainPage.LogoString,
|
};
|
|
//常安logo弹出删除文件界面
|
LogoButton.MouseLongEventHandler += (sender, e) => {
|
Alert alert = new Alert (Language.StringByID (R.MyInternationalizationString.Tip), Language.StringByID (R.MyInternationalizationString.TipDeleteAllFiles), Language.StringByID (R.MyInternationalizationString.Cancel), Language.StringByID (R.MyInternationalizationString.Confrim));
|
alert.ResultEventHandler += (object sender2, bool e2) => {
|
if (e2) {
|
IO.FileUtils.DeleteAllFile ();
|
SystemMiddleTop.selected (SystemMiddleTop.gateWay);
|
SystemMiddle.ShowGateWayFrameLayout ();
|
SystemMiddle.InitBottomButtonForReadGateWay ();
|
}
|
};
|
alert.Show ();
|
};
|
FrameLayoutMain.AddChidren (LogoButton);
|
|
Button NameButton = new Button () {
|
Width = Application.GetRealWidth (400),
|
Height = Application.GetMinReal (60),
|
Text = MainPage.SoftPadTitle,
|
TextColor = SkinStyle.Current.TextColor1,
|
Gravity = Gravity.Center,
|
TextAlignment = TextAlignment.Center,
|
TextSize = 24,
|
};
|
FrameLayoutMain.AddChidren (NameButton);
|
|
Button ItemButton = new Button () {
|
Width = Application.GetRealWidth (105),
|
Height = Application.GetRealHeight (80),
|
UnSelectedImagePath = "Item/Item.png",
|
SelectedImagePath = "Item/Item.png",
|
Y = Application.GetRealHeight (40),
|
};
|
ItemButton.X = FrameLayoutMain.Width - ItemButton.Width - Application.GetRealWidth(50);
|
ItemButton.MouseUpEventHandler += (sender, e) => {
|
SystemHomePage.FrameLayoutMain.Visible = false;
|
UserHomePage.FrameLayoutMain.Visible=true;
|
UserMiddle.DeviceMode ();
|
};
|
FrameLayoutMain.AddChidren (ItemButton);
|
}
|
}
|
}
|