using System;
|
using HDL_ON.UI.UI2.Intelligence.Automation.LogicView;
|
using Shared;
|
namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice.View
|
{
|
public class FailView
|
{
|
public void ShouError(Action<Dialog> action)
|
{
|
Dialog dialog = new Dialog();
|
#region 界面布局
|
dialog.BackgroundColor = CSS.CSS_Color.viewMiddle;
|
PirDevice.View.TopView topView = new View.TopView();
|
topView.topNameBtn.TextID = StringId.tianjiayaokongqi;
|
dialog.AddChidren(topView.FLayoutView());
|
topView.clickBackBtn.MouseUpEventHandler += (sender, e) => { dialog.Close(); };
|
|
FrameLayout fLayout = new FrameLayout
|
{
|
Y = Application.GetRealHeight(64),
|
BackgroundColor = CSS.CSS_Color.textWhiteColor,
|
Height = Application.GetRealHeight(667-64),
|
Width = Application.GetRealWidth(375),
|
};
|
dialog.AddChidren(fLayout);
|
|
//图标
|
Button iconBtn = new Button
|
{
|
Y = Application.GetRealHeight(106),
|
X = Application.GetRealWidth(98),
|
Width = Application.GetRealWidth(180),
|
Height = Application.GetRealWidth(180),
|
UnSelectedImagePath = "PirIcon/failed.png",
|
};
|
fLayout.AddChidren(iconBtn);
|
|
//添加失败
|
Button text1Btn = new Button
|
{
|
Width = Application.GetRealWidth(375 - 32),
|
Height = Application.GetRealHeight(22),
|
Y = Application.GetRealHeight(302),
|
X = Application.GetRealWidth(16),
|
TextID = StringId.tianjiashibai,
|
TextSize = TextSize.text16,
|
TextColor = CSS.CSS_Color.textRedColor,
|
TextAlignment = TextAlignment.Center,
|
};
|
fLayout.AddChidren(text1Btn);
|
//重试
|
View.SaveView saveView = new View.SaveView();
|
dialog.AddChidren(saveView.FLayoutView());
|
saveView.btnSave.TextID = StringId.chongshii;
|
saveView.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(24), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
|
dialog.Show();
|
saveView.btnClick.MouseUpEventHandler += (sender,e) => {
|
action(dialog);
|
};
|
#endregion
|
|
}
|
}
|
}
|