陈嘉乐
2021-03-01 a469a96ee8c38f7d98366dcd633e3a15f92fec65
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
using System;
using HDL_ON.UI.UI2.Intelligence.Automation.LogicView;
using Shared;
namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice
{
    public class Matching : FrameLayout
    {
        public Matching()
        {
        }
        public void Show()
        {
            #region 界面布局
            this.BackgroundColor = CSS.CSS_Color.viewMiddle;
            PirDevice.View.TopView topView = new View.TopView();
            topView.topNameBtn.TextID = StringId.pipeiyaokongqi;
            this.AddChidren(topView.FLayoutView());
            topView.clickBackBtn.MouseUpEventHandler += (sender, e) => { this.RemoveFromParent(); };
 
            FrameLayout fLayout = new FrameLayout
            {
                Y = topView.frameLayout.Bottom,
                Height = Application.GetRealHeight(667 - 64),
                Width = Application.GetRealWidth(375),
            };
            this.AddChidren(fLayout);
            //请点击以下按钮
            Button text1Btn = new Button
            {
                Y = Application.GetRealHeight(60),
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(375 - 32),
                Height = Application.GetRealHeight(20),
                TextID = StringId.dianjianniu,
                TextSize = TextSize.text14,
                TextColor = CSS.CSS_Color.textColor,
                TextAlignment = TextAlignment.Center,
 
            };
            fLayout.AddChidren(text1Btn);
 
            //确认设备是否有响应
            Button text2Btn = new Button
            {
                Y = Application.GetRealHeight(60 + 24),
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(375 - 32),
                Height = Application.GetRealHeight(20),
                TextID = StringId.shifouyouxiangying,
                TextSize = TextSize.text14,
                TextColor = CSS.CSS_Color.textColor,
                TextAlignment = TextAlignment.Center,
            };
            fLayout.AddChidren(text2Btn);
            //左
            var leftIconBtn = new Button
            {
                Y = Application.GetRealHeight(203),
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(36),
                Height = Application.GetRealWidth(36),
                UnSelectedImagePath = "PirIcon/left.png",
            };
            fLayout.AddChidren(leftIconBtn);
            //右
            var rightIconBtn = new Button
            {
                Y = Application.GetRealHeight(203),
                X = Application.GetRealWidth(323),
                Width = Application.GetRealWidth(36),
                Height = Application.GetRealWidth(36),
                UnSelectedImagePath = "PirIcon/right.png",
            };
            fLayout.AddChidren(rightIconBtn);
            //测试功能
            var testBtn = new Button
            {
                Y = Application.GetRealHeight(199),
                X = Application.GetRealWidth(136),
                Width = Application.GetRealWidth(104),
                Height = Application.GetRealHeight(44),
                Text = "电源",
                TextSize = TextSize.text16,
                TextColor = CSS.CSS_Color.textColor,
                TextAlignment = TextAlignment.Center,
                Radius = (uint)Application.GetRealHeight(18),
                BorderWidth = 1,
                BorderColor = CSS.CSS_Color.textCancelColor,
            };
            fLayout.AddChidren(testBtn);
 
            // 5/10
            Button sumBtn = new Button
            {
                Y = Application.GetRealHeight(267),
                X = Application.GetRealWidth(170),
                Width = Application.GetRealWidth(36),
                Height = Application.GetRealHeight(17),
                Text = "(" + "1" + "/20)",
                TextSize = TextSize.text12,
                TextColor = CSS.CSS_Color.textCancelColor,
            };
            fLayout.AddChidren(sumBtn);
 
            //控制失败
            var failedBtn = new Button
            {
                Y = Application.GetRealHeight(521),
                X = Application.GetRealWidth(52),
                Width = Application.GetRealWidth(124),
                Height = Application.GetRealHeight(44),
                TextID = StringId.kongzhishibai,
                TextSize = TextSize.text16,
                TextColor = CSS.CSS_Color.textConfirmColor,
                TextAlignment = TextAlignment.Center,
                Radius = (uint)Application.GetRealHeight(44),
                BorderWidth = 1,
                BorderColor = CSS.CSS_Color.textConfirmColor,
            };
            fLayout.AddChidren(failedBtn);
            //控制成功
            var succeedBtn = new Button
            {
                Y = Application.GetRealHeight(521),
                X = Application.GetRealWidth(196),
                Width = Application.GetRealWidth(124),
                Height = Application.GetRealHeight(44),
                TextID = StringId.kongzhichenggong,
                TextSize = TextSize.text16,
                TextColor = CSS.CSS_Color.textWhiteColor,
                TextAlignment = TextAlignment.Center,
                Radius = (uint)Application.GetRealHeight(44),
                //BorderWidth = 1,
                //BorderColor = CSS.CSS_Color.textConfirmColor,
                BackgroundColor = CSS.CSS_Color.textConfirmColor,
            };
            fLayout.AddChidren(succeedBtn);
            #endregion
            #region 点击事件
            int value = 1;
            leftIconBtn.MouseUpEventHandler += (sender, e) =>
            {
            };
            rightIconBtn.MouseUpEventHandler += (sender, e) =>
            {
 
            };
            #endregion
        }
    }
}