xm
2021-12-01 6d73bf6e816570291865674bef8bce8972e4de3f
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
using System;
using HDL_ON.UI.UI2.Intelligence.Automation.LogicView;
using Shared;
 
namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice.View
{
    public class ControlView
    {
        /// <summary>
        /// 父控件
        /// </summary>
        public RowLayout funControlRow = new RowLayout
        {
            Width = Application.GetRealWidth(375 - 16 * 2),
            Height = Application.GetRealHeight(50),
            LineColor = CSS.CSS_Color.textWhiteColor,
            SubViewWidth = Application.GetRealWidth(68),
        };
        /// <summary>
        /// 遥控器名称
        /// </summary>
        public Button nameBtn = new Button
        {
            X = Application.GetRealWidth(16),
            Width = Application.GetRealWidth(150),
            Height = Application.GetRealHeight(20),
            //Text = control.name,
            TextAlignment = TextAlignment.CenterLeft,
            TextSize = TextSize.text14,
            TextColor = CSS.CSS_Color.textColor,
            Gravity = Gravity.CenterVertical,
        };
 
        /// <summary>
        /// 遥控器区域
        /// </summary>
        public Button areaBtn = new Button
        {
            X = Application.GetRealWidth(311 + 16 - (40 + 100)),
            Width = Application.GetRealWidth(100),
            Height = Application.GetRealHeight(17),
            //Text = Intelligence.Automation.LogicMethod.GetGetRoomName(control),
            TextAlignment = TextAlignment.CenterRight,
            TextSize = TextSize.text12,
            TextColor = CSS.CSS_Color.textCancelColor,
            Gravity = Gravity.CenterVertical,
        };
 
        /// <summary>
        /// 下一级图标
        /// </summary>
        public Button nextIconBtn = new Button
        {
            X = Application.GetRealWidth(295 + 16),
            Width = Application.GetRealWidth(16),
            Height = Application.GetRealWidth(16),
            UnSelectedImagePath = "PirIcon/next.png",
            Gravity = Gravity.CenterVertical,
        };
 
 
        /// <summary>
        /// 删除
        /// </summary>
        public Button delBtn = new Button
        {
            Width = Application.GetRealWidth(50),
            Height = Application.GetRealHeight(22),
            TextID = StringId.Del,
            TextAlignment = TextAlignment.Center,
            TextSize = TextSize.text16,
            TextColor = CSS.CSS_Color.textWhiteColor,
            IsBold = true,
            BackgroundColor = CSS.CSS_Color.textRedColor,
            //Tag = control,
        };
 
        /// <summary>
        /// 线
        /// </summary>
        public Button line1Btn = new Button
        {
            Y = Application.GetRealHeight(50 - 2),
            X = Application.GetRealWidth(16),
            Width = Application.GetRealWidth(311),
            Height = 1,
            BackgroundColor = CSS.CSS_Color.viewLine,
        };
        /// <summary>
        /// 点击事件
        /// </summary>
        public Button clickBtn = new Button
        {
            Width = Application.GetRealWidth(375 - 16 * 2),
            Height = Application.GetRealHeight(50),
        };
        /// <summary>
        /// view方法
        /// </summary>
        /// <param name="frame"></param>
        public void Show(FrameLayout frame, int i)
        {
            funControlRow.Y = Application.GetRealHeight(92 + (50 * i));
            frame.AddChidren(funControlRow);
            funControlRow.AddChidren(nameBtn);
            funControlRow.AddChidren(areaBtn);
            funControlRow.AddChidren(nextIconBtn);
            funControlRow.AddRightView(delBtn);
            funControlRow.AddChidren(line1Btn);
            funControlRow.AddChidren(clickBtn);
        }
    }
}