using System;
|
using HDL_ON.UI.UI2.Intelligence.Automation.LogicView;
|
using Shared;
|
namespace HDL_ON.UI.UI2.Intelligence.Automation
|
{
|
public class MainView
|
{
|
//public MainView(FrameLayout layout)
|
//{
|
// automationPage = layout;
|
//}
|
//public static FrameLayout automationPage;
|
|
public static void MainShow(FrameLayout automationPage)
|
{
|
automationPage.RemoveAll();
|
VerticalScrolViewLayout vv = new VerticalScrolViewLayout();
|
automationPage.AddChidren(vv);
|
|
for (int i = 0; i < 2; i++)
|
{
|
Logic.LogicList.Add(new Logic { name = "123456" });
|
}
|
|
for (int i = 0; i < Logic.LogicList.Count; i++)
|
{
|
///上下间隔12像素
|
vv.AddChidren(new FrameLayout { Height = Application.GetRealHeight(12) });
|
LogicView.SingleLogicView logicView = new LogicView.SingleLogicView();
|
vv.AddChidren(logicView.FLayoutView());
|
logicView.btnLogicName.Text = i.ToString();
|
logicView.btnWeekText.Text = "每天";
|
|
}
|
|
if (Logic.LogicList.Count == 0)
|
{
|
Button btnTipNot = new Button()
|
{
|
Gravity = Gravity.CenterHorizontal,
|
Y = Application.GetRealHeight(120),
|
Width = Application.GetRealWidth(180),
|
Height = Application.GetRealWidth(180),
|
UnSelectedImagePath = "TipNot.png",
|
};
|
automationPage.AddChidren(btnTipNot);
|
Button btnTipNotText = new Button()
|
{
|
Y = btnTipNot.Bottom,
|
Height = Application.GetRealWidth(100),
|
TextID = StringId.TipNotOpen,
|
TextAlignment = TextAlignment.Center,
|
TextColor = CSS.CSS_Color.TextualColor,
|
TextSize = CSS.CSS_FontSize.PromptFontSize_FirstLevel,
|
};
|
automationPage.AddChidren(btnTipNotText);
|
}
|
}
|
}
|
}
|