HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2020-03-11 06802250b4b9041d39d568c1dbe77684075006b2
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
using System;
using Shared.Common;
 
namespace Shared.Phone.Device.Logic
{
    public class SelectedDeviceView
    {
 
        public FrameLayout selecetdFrameLayout = new FrameLayout
        {
            Height = Application.GetRealHeight(130),
            BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
        };
 
        /// <summary>
        /// 显示图标
        /// </summary>
        public Button iconBtn = new Button
        {
            Width = Application.GetRealWidth(81),
            Height = Application.GetRealHeight(81),
            X = Application.GetRealWidth(104),
            Y = Application.GetRealHeight(25),
            // UnSelectedImagePath = "ZigeeLogic/time.png",
 
        };
        ///
        public RowLayout stateRow = new RowLayout
        {
            Width = Application.GetRealWidth(800),
            Height = Application.GetRealHeight(130),
            X = Application.GetRealWidth(222),
            LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
        };
        /// <summary>
        /// 显示名字(除设备类型外)
        /// </summary>
        public Button ordinaryBtn = new Button
        {
            Width = Application.GetRealWidth(400),
            TextAlignment = TextAlignment.CenterLeft,
            Gravity = Gravity.CenterVertical,
            TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
            TextSize = 14,
            Visible = false,
        };
        /// <summary>
        /// 设备的名字
        /// </summary>
        public Button deviceNameBtn = new Button
        {
            Y = Application.GetRealHeight(20),
            Height = Application.GetRealHeight(50),
            Width = Application.GetRealWidth(400),
            TextAlignment = TextAlignment.CenterLeft,
            TextColor = ZigbeeColor.Current.LogicTextBlackColor,
            TextSize = 14,
            Visible = false,
        };
 
        /// <summary>
        /// 区域(房间)名称Button
        /// </summary>
        public Button regionNameBtn = new Button
        {
            Y = Application.GetRealHeight(10 + 70),
            Width = Application.GetRealWidth(400),
            TextAlignment = TextAlignment.CenterLeft,
            Height = Application.GetRealHeight(50),
            Text = "",//Language.StringByID(MyInternationalizationString.customroom),
            TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
            Visible=false,
        };
        /// <summary>
        /// 显示设备条件状态控件
        /// </summary>
        public Button selecetddevicestateBtn = new Button
        {
            Width = Application.GetRealWidth(400),
            Height = Application.GetRealHeight(130),
            Gravity = Gravity.CenterVertical,
            TextAlignment = TextAlignment.CenterRight,
            X = Application.GetRealWidth(400),
            TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
            TextSize = 14,
        };
       
 
 
        /// <summary>
        /// 编辑
        /// </summary>
        public Button edit = new Button
        {
            BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor1,
            Text = Language.StringByID(R.MyInternationalizationString.edit),
            TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
        };
        /// <summary>
        /// 删除
        /// </summary>
        public Button del = new Button
        {
            BackgroundColor = ZigbeeColor.Current.LogicDelBlackColor1,
            Text = Language.StringByID(R.MyInternationalizationString.del),
        };
        public void Show(VerticalScrolViewLayout middle)
        {
            middle.AddChidren(selecetdFrameLayout);
            selecetdFrameLayout.AddChidren(iconBtn);
            selecetdFrameLayout.AddChidren(stateRow);
            stateRow.AddRightView(edit);
            stateRow.AddRightView(del);
            stateRow.AddChidren(deviceNameBtn);
            stateRow.AddChidren(regionNameBtn);
            stateRow.AddChidren(ordinaryBtn);
            stateRow.AddChidren(selecetddevicestateBtn);
 
        }
    }
}