wxr
2023-03-21 608b97795c1419b0411b6320126c9681dd4126da
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
using System;
using Shared;
using HDL_ON.Entity;
using HDL_ON.UI.CSS;
 
namespace HDL_ON.UI
{
    public class AddCombineDimmingPage : FrameLayout
    {
        FrameLayout bodyView;
 
        public AddCombineDimmingPage()
        {
            bodyView = this;
        }
 
        public void LoadPage()
        {
            new TopViewDiv(bodyView, Language.StringByID(StringId.CombinedDimming)).LoadTopView();
 
            var contentView = new FrameLayout()
            {
                Y = Application.GetRealHeight(64),
                BackgroundColor = CSS_Color.MainBackgroundColor,
                Height = Application.GetRealHeight(550),
            };
            bodyView.AddChidren(contentView);
 
            #region 住宅名称
            FrameLayout residenceNameRow;
            residenceNameRow = new FrameLayout()
            {
                Y = Application.GetRealHeight(72),
                Height = Application.GetRealHeight(50),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            contentView.AddChidren(residenceNameRow);
            Button btnResidenceNameTitle = new Button()
            {
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(78),
                TextID = StringId.ResidenceName,
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextColor = CSS_Color.FirstLevelTitleColor,
            };
            residenceNameRow.AddChidren(btnResidenceNameTitle);
 
            var btnResidenceName = new Button()
            {
                X = Application.GetRealWidth(2) + btnResidenceNameTitle.Right,
                Width = Application.GetRealWidth(200),
                Text = DB_ResidenceData.Instance.CurrentRegion.homeName,
                TextSize = CSS_FontSize.TextFontSize,
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.TextualColor,
            };
            residenceNameRow.AddChidren(btnResidenceName);
 
            var btnEditResidenceNameIcon = new Button()
            {
                X = Application.GetRealWidth(333),
                Gravity = Gravity.CenterVertical,
                Width = Application.GetMinRealAverage(28),
                Height = Application.GetMinRealAverage(28),
                UnSelectedImagePath = "Public/Edit.png",
            };
            residenceNameRow.AddChidren(btnEditResidenceNameIcon);
 
            #endregion
            residenceNameRow.AddChidren(
                new Button()
                {
                    Gravity = Gravity.CenterHorizontal,
                    Y = Application.GetRealHeight(49),
                    Height = Application.GetRealHeight(1),
                    Width = Application.GetRealWidth(343),
                    BackgroundColor = CSS_Color.DividingLineColor,
                });
            #region 住宅地址
            var residenceAddressRow = new FrameLayout()
            {
                Y = residenceNameRow.Bottom,
                Height = Application.GetRealHeight(50),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            contentView.AddChidren(residenceAddressRow);
 
            var btnResidenceAddressTitle = new Button()
            {
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(78),
                TextID = StringId.ResidenceAddress,
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextColor = CSS_Color.FirstLevelTitleColor,
            };
            residenceAddressRow.AddChidren(btnResidenceAddressTitle);
 
            var btnLocationAddressIcon = new Button()
            {
                X = Application.GetRealWidth(333),
                Gravity = Gravity.CenterVertical,
                Width = Application.GetMinRealAverage(28),
                Height = Application.GetMinRealAverage(28),
                //UnSelectedImagePath = "Public/LocationAddressIcon.png",
                UnSelectedImagePath = "Public/Edit.png",
            };
            residenceAddressRow.AddChidren(btnLocationAddressIcon);
 
            var btnResidenceAddress = new Button()
            {
                X = Application.GetRealWidth(2) + btnResidenceNameTitle.Right,
                Width = Application.GetRealWidth(200),
                Text = DB_ResidenceData.Instance.CurrentRegion.homeAddress,
                TextSize = CSS_FontSize.TextFontSize,
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.TextualColor,
            };
            residenceAddressRow.AddChidren(btnResidenceAddress);
            #endregion
            contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) });
 
 
        }
    }
}