HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2020-12-31 fe3b2466c68b5db70d38e78039703add3b8b1dfe
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
using System;
using System.Collections.Generic;
using Shared.Common;
using Shared.R;
using ZigBee.Device;
namespace Shared.Phone.Device.Logic
{
    public class TopView
    {
        #region 最上面那块控件
        /// <summary>
        /// 最上面块View
        /// </summary>
        public RowLayout topRowLayout = new RowLayout
        {
            BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor,
            Height = Application.GetRealHeight(184),
            LineColor = ZigbeeColor.Current.LogicRowLayoutTopLineColor,
        };
        /// <summary>
        /// 标题Btn
        /// </summary>
        public Button toptitleNameBtn = new Button
        {
            TextSize = 17,
            TextColor = ZigbeeColor.Current.LogicTextBlackColor,
            TextAlignment = TextAlignment.CenterLeft,
            X = Application.GetRealWidth(176),
            Width = Application.GetRealWidth(600),
            Height = Application.GetRealHeight(69),
            Y = Application.GetRealHeight(92),
            IsBold = true
        };
       
        /// <summary>
        /// 后退Btn
        /// </summary>
        public Button backBtn = new Button
        {
            Width = Application.GetRealWidth(30),
            Height = Application.GetRealWidth(51),
            X = Application.GetRealWidth(81),
            Y = Application.GetRealHeight(98),
            //Gravity = Gravity.CenterVertical;
            UnSelectedImagePath = "ZigeeLogic/back.png",
        };
        /// <summary>
        /// 增加热键大小Btn
        /// </summary>
        public Button clickBtn = new Button
        {
            Width = Application.GetRealWidth(81 + 51),
            Height = Application.GetRealHeight(58 + 40),
            Y = Application.GetRealHeight(98 - 40),
        };
 
 
 
        /// <summary>
        /// 显示层楼Btn
        /// </summary>
        public Button foolrnameBtn = new Button
        {
            TextColor = ZigbeeColor.Current.LogicTextBlackColor,
            TextAlignment = TextAlignment.CenterRight,
            X = Application.GetRealWidth(1080 - 400 - 120),
            Width = Application.GetRealWidth(400),
            Height = Application.GetRealHeight(69),
            Y = Application.GetRealHeight(92),
            Text = Config.Instance.Home.GetCurrentFloorName,
        };
        /// <summary>
        /// 下拉图标Btn
        /// </summary>
        public Button dropdownBtn = new Button
        {
            TextColor = ZigbeeColor.Current.LogicTextBlackColor,
            TextAlignment = TextAlignment.CenterRight,
            Width = Application.GetRealWidth(72),
            Height = Application.GetRealWidth(72),
            Y = Application.GetRealHeight(92),
            X = Application.GetRealWidth(1080 - 120),
            UnSelectedImagePath = "ZigeeLogic/drop-down.png",
        };
        /// <summary>
        /// 增加热键大小Btn
        /// </summary>
        public Button foolrclickBtn = new Button
        {
            Width = Application.GetRealWidth(400 + 120),
            Height = Application.GetRealHeight(72),
            Y = Application.GetRealHeight(92),
            X = Application.GetRealWidth(1080 - 400 - 120),
        };
        /// <summary>
        /// 最上面的那块方法
        /// </summary>
        /// <param name="yes"></param>
        /// <returns></returns>
        public RowLayout TopRowView(bool yes = false)
        {
            topRowLayout.AddChidren(toptitleNameBtn);
            topRowLayout.AddChidren(backBtn);
            topRowLayout.AddChidren(clickBtn);
            if (yes)
            {
                topRowLayout.AddChidren(foolrnameBtn);
                topRowLayout.AddChidren(dropdownBtn);
                topRowLayout.AddChidren(foolrclickBtn);
            }
            return topRowLayout;
        }
        #endregion
    }
}