陈嘉乐
2021-01-08 cf8848457367b5eec0ff7610222dc81757a62bac
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
using System;
using Shared;
namespace HDL_ON.UI.UI2.Intelligence.Automation
{
    public class OutdoorEnvironment : FrameLayout
    {
        public OutdoorEnvironment()
        {
            Tag = "Logic";
        }
        public void Show()
        {
            #region  界面布局
            LogicView.TopView topView = new LogicView.TopView();
            this.AddChidren(topView.FLayoutView());
            topView.clickBackBtn.MouseUpEventHandler += (e, sen) =>
            {
                RemoveFromParent();
            };
            topView.topNameBtn.TextID = StringId.shiwaihuanjingbianhua;
 
            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);
 
            //温度高于
            LogicView.SelectTypeView temperaturehigherView = new LogicView.SelectTypeView();
            temperaturehigherView.btnIcon.Visible = false;
            temperaturehigherView.btnText.X = Application.GetRealWidth(16);
            temperaturehigherView.btnLine.X = Application.GetRealWidth(16);
            temperaturehigherView.btnLine.Width = Application.GetRealWidth(375 - 16 - 16);
            temperaturehigherView.btnText.TextID = StringId.wendugaoyu;
            viewLayout.AddChidren(temperaturehigherView.FLayoutView());
            //温度低于
            LogicView.SelectTypeView temperatureunderView = new LogicView.SelectTypeView();
            temperatureunderView.frameLayout.Y = temperaturehigherView.frameLayout.Bottom;
            temperatureunderView.btnIcon.Visible = false;
            temperatureunderView.btnText.X = Application.GetRealWidth(16);
            temperatureunderView.btnLine.X = Application.GetRealWidth(16);
            temperatureunderView.btnLine.Width = Application.GetRealWidth(375 - 16 - 16);
            temperatureunderView.btnText.TextID = StringId.wendudiyu;
            viewLayout.AddChidren(temperatureunderView.FLayoutView());
 
            //湿度高于
            LogicView.SelectTypeView humidityhigherView = new LogicView.SelectTypeView();
            humidityhigherView.frameLayout.Y = temperatureunderView.frameLayout.Bottom+Application.GetRealHeight(8);
            humidityhigherView.btnIcon.Visible = false;
            humidityhigherView.btnText.X = Application.GetRealWidth(16);
            humidityhigherView.btnLine.X = Application.GetRealWidth(16);
            humidityhigherView.btnLine.Width = Application.GetRealWidth(375 - 16 - 16);
            humidityhigherView.btnText.TextID = StringId.shidugaoyu;
            viewLayout.AddChidren(humidityhigherView.FLayoutView());
            //湿度低于
            LogicView.SelectTypeView humidityunderView = new LogicView.SelectTypeView();
            humidityunderView.frameLayout.Y = humidityhigherView.frameLayout.Bottom;
            humidityunderView.btnIcon.Visible = false;
            humidityunderView.btnText.X = Application.GetRealWidth(16);
            humidityunderView.btnLine.X = Application.GetRealWidth(16);
            humidityunderView.btnLine.Width = Application.GetRealWidth(375 - 16 - 16);
            humidityunderView.btnText.TextID = StringId.shidudiyu;
            viewLayout.AddChidren(humidityunderView.FLayoutView());
 
            //PM2.5高于
            LogicView.SelectTypeView pmhigherView = new LogicView.SelectTypeView();
            pmhigherView.frameLayout.Y = humidityunderView.frameLayout.Bottom + Application.GetRealHeight(8);
            pmhigherView.btnIcon.Visible = false;
            pmhigherView.btnText.X = Application.GetRealWidth(16);
            pmhigherView.btnLine.X = Application.GetRealWidth(16);
            pmhigherView.btnLine.Width = Application.GetRealWidth(375 - 16 - 16);
            pmhigherView.btnText.TextID = StringId.pmgaoyu;
            viewLayout.AddChidren(pmhigherView.FLayoutView());
            //PM2.5低于
            LogicView.SelectTypeView pmunderView = new LogicView.SelectTypeView();
            pmunderView.frameLayout.Y = pmhigherView.frameLayout.Bottom;
            pmunderView.btnIcon.Visible = false;
            pmunderView.btnText.X = Application.GetRealWidth(16);
            pmunderView.btnLine.X = Application.GetRealWidth(16);
            pmunderView.btnLine.Width = Application.GetRealWidth(375 - 16 - 16);
            pmunderView.btnText.TextID = StringId.pmdiyu;
            viewLayout.AddChidren(pmunderView.FLayoutView());
 
            #endregion
 
            #region  所有点击事件
            //温度高于
            temperaturehigherView.btnClick.MouseUpEventHandler += (sen, e) =>
            {
                
 
            };
            //温度低于
            temperatureunderView.btnClick.MouseUpEventHandler += (sen, e) =>
            {
              
            };
 
            //湿度高于
            humidityhigherView.btnClick.MouseUpEventHandler += (sen, e) =>
            {
               
 
            };
            //湿度低于
            humidityunderView.btnClick.MouseUpEventHandler += (sen, e) =>
            {
               
            };
 
            //PM2.5高于
            pmhigherView.btnClick.MouseUpEventHandler += (sen, e) =>
            {
               
 
            };
            //PM2.5低于
            pmunderView.btnClick.MouseUpEventHandler += (sen, e) =>
            {
               
            };
 
            #endregion
        }
    }
}