using System;
|
using Shared;
|
using System.Collections.Generic;
|
namespace HDL_ON.UI.UI2.Intelligence.Automation
|
{
|
public class SpeciaTime:FrameLayout
|
{
|
|
public SpeciaTime()
|
{
|
Tag = "Logic";
|
}
|
|
public void Show(bool edit=false, int index=-1)
|
{
|
#region 界面布局
|
LogicView.TopView topView = new LogicView.TopView();
|
this.AddChidren(topView.FLayoutView());
|
topView.clickBackBtn.MouseUpEventHandler += (e, sen) =>
|
{
|
RemoveFromParent();
|
};
|
topView.topNameBtn.TextID = StringId.selectionCondition;
|
|
FrameLayout viewLayout = new FrameLayout
|
{
|
Y = Application.GetRealHeight(64),
|
Width = Application.GetRealWidth(LogicView.TextSize.view375),
|
Height = Application.GetRealHeight(LogicView.TextSize.view667 - 64),
|
BackgroundColor = CSS.CSS_Color.viewMiddle,
|
};
|
this.AddChidren(viewLayout);
|
|
var list = new List<string> {
|
Language.StringByID(StringId.sunrise)+Language.StringByID(StringId.h),
|
Language.StringByID(StringId.sunset)+Language.StringByID(StringId.h),
|
Language.StringByID(StringId.at)+Language.StringByID(StringId.h),
|
};
|
|
for (int i = 0; i < list.Count; i++)
|
{
|
LogicView.SelectTypeView timeView = new LogicView.SelectTypeView();
|
timeView.frameLayout.Y = Application.GetRealHeight(i * 50);
|
timeView.btnIcon.Visible = false;
|
timeView.btnText.X = Application.GetRealWidth(16);
|
timeView.btnLine.X = Application.GetRealWidth(16);
|
timeView.btnLine.Width = Application.GetRealWidth(375 - 16 - 16);
|
timeView.btnText.Text= list[i];
|
timeView.btnClick.Tag= list[i];
|
|
viewLayout.AddChidren(timeView.FLayoutView());
|
|
timeView.btnClick.MouseUpEventHandler += (sen, e) =>
|
{
|
|
Time3 time3 = new Time3();
|
MainPage.BasePageView.AddChidren(time3);
|
time3.Show(timeView.btnClick.Tag.ToString(),edit,index);
|
MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
|
};
|
}
|
#endregion
|
|
}
|
}
|
}
|