陈嘉乐
2021-01-06 2313f465c76d58d93d7cea5e1c3dfe5361853006
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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
           
        }
    }
}