wei
2021-08-20 41995c4cd30ca1c5a814ea0af6f70d3b86368137
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
152
153
154
155
156
using System;
using HDL_ON.UI.CSS;
using Shared;
 
namespace HDL_ON.UI
{
    public class FacePassagePage : FrameLayout
    {
        FrameLayout bodyView;
        /// <summary>
        /// 面容id
        /// </summary>
        string faceid = "";
 
        public FacePassagePage()
        {
            bodyView = this;
        }
 
        public void LoadPage()
        {
            new TopViewDiv(bodyView, Language.StringByID(StringId.FacePassage)).LoadTopView();
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
 
 
            var contentView = new FrameLayout()
            {
                Y = Application.GetRealHeight(64),
                Height = Application.GetRealHeight(667-64),
            };
            bodyView.AddChidren(contentView);
 
            var topView = new FrameLayout()
            {
                Height = Application.GetRealHeight(189),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            contentView.AddChidren(topView);
 
            var btnFaceIcon = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Y = Application.GetRealHeight(20),
                Width = Application.GetRealWidth(102),
                Height = Application.GetRealWidth(102),
                UnSelectedImagePath = "PersonalCenter/FacePassage/FaceIcon.png",
            };
            topView.AddChidren(btnFaceIcon);
 
            var btnText1 = new Button()
            {
                X = Application.GetRealWidth(16),
                Y = Application.GetRealWidth(54),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextID = StringId.ApplyFaceIdTo,
                IsBold = true,
            };
            topView.AddChidren(btnText1);
 
            topView.AddChidren(new Button() { Height = 1,BackgroundColor = CSS_Color.DividingLineColor,Y = Application.GetRealHeight(188) ,X = Application.GetRealWidth(16),Width = Application.GetRealWidth(359)});
 
            #region 社区门禁通行
            var communityRow = new FrameLayout()
            {
                Y = topView.Bottom,
                Height = Application.GetRealHeight(50),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            contentView.AddChidren(communityRow);
 
            var btnCommunityTitle = new Button()
            {
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(300),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.TextFontSize,
                TextID = StringId.CommunityAccessControl,
            };
            communityRow.AddChidren(btnCommunityTitle);
 
 
            var btnCommunityAccessControlIcon = new Button()
            {
                X = Application.GetRealWidth(314),
                Gravity = Gravity.CenterVertical,
                Width = Application.GetMinRealAverage(48),
                Height = Application.GetMinRealAverage(36),
                UnSelectedImagePath = "Public/Switch.png",
                SelectedImagePath = "Public/SwitchOn.png",
            };
            communityRow.AddChidren(btnCommunityAccessControlIcon);
 
 
 
            #endregion
 
 
            var btnTip = new Button()
            {
                Y = Application.GetRealHeight(270),
                Height = Application.GetRealHeight(48),
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.MainColor,
                TextSize = CSS_FontSize.TextFontSize,
                TextID = StringId.AboutFaceIdAndPrivacy
            };
            contentView.AddChidren(btnTip);
 
 
            var btnSetFaceId = new Button()
            {
                Y = Application.GetRealHeight(539),
                Gravity = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(220),
                Height = Application.GetRealWidth(44),
                Radius = (uint)Application.GetRealWidth(22),
                BackgroundColor = CSS_Color.MainColor,
                TextID = StringId.SetFace,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextColor = CSS_Color.MainBackgroundColor,
                TextAlignment = TextAlignment.Center,
                IsBold = true,
            };
            contentView.AddChidren(btnSetFaceId);
 
            if (string.IsNullOrEmpty(faceid))
            {
            }
            else
            {
                btnSetFaceId.TextID = StringId.ResetFace;
 
                var btnEraseData = new Button()
                {
                    Y = Application.GetRealHeight(481),
                    Gravity = Gravity.CenterHorizontal,
                    Width = Application.GetRealWidth(220),
                    Height = Application.GetRealWidth(44),
                    Radius = (uint)Application.GetRealWidth(22),
                    BackgroundColor = CSS_Color.WarningColor,
                    TextID = StringId.EraseData,
                    TextSize = CSS_FontSize.SubheadingFontSize,
                    TextColor = CSS_Color.MainBackgroundColor,
                    TextAlignment = TextAlignment.Center,
                    IsBold = true,
                };
                contentView.AddChidren(btnEraseData);
            }
 
 
        }
    }
}