wxr
2023-07-12 7bea8bc6d399e9097e3565c2eed48ee6145d6b2f
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
using System;
using HDL_ON.UI.CSS;
using Shared;
namespace HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock
{
    public class UnlockSettingFacePage : FrameLayout
    {
        FrameLayout bodyView;
        bool faceUnlockSwitch;
 
 
        public UnlockSettingFacePage()
        {
            bodyView = this;
        }
 
        public void LoadPage()
        {
            new TopViewDiv(bodyView, Language.StringByID(StringId.FaceUnlockSetting)).LoadTopView();
 
 
            var contentView = new VerticalScrolViewLayout()
            {
                Y = Application.GetRealHeight(64),
                Height = Application.GetRealHeight(600),
                ScrollEnabled = false,
            };
            bodyView.AddChidren(contentView);
 
         
            #region 人脸开锁
            var faceUnlockView = new FrameLayout()
            {
                Height = Application.GetRealHeight(74),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            contentView.AddChidren(faceUnlockView);
 
            var btnFaceUnlockText = new Button()
            {
                X = Application.GetRealWidth(16),
                Y = Application.GetRealHeight(7),
                Height = Application.GetRealHeight(37),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextID = StringId.FaceUnlock,
            };
            faceUnlockView.AddChidren(btnFaceUnlockText);
 
            var btnFaceUnlockTipText = new Button()
            {
                X = Application.GetRealWidth(16),
                Y = btnFaceUnlockText.Bottom,
                Width = Application.GetRealWidth(339),
                Height = Application.GetRealHeight(37),
                TextAlignment = TextAlignment.TopLeft,
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                IsMoreLines = true,
                TextID = StringId.FaceUnlockTip
            };
            faceUnlockView.AddChidren(btnFaceUnlockTipText);
 
            var btnFaceUnlockSwitchIcon = new Button()
            {
                X = Application.GetRealWidth(322),
                Y = Application.GetRealHeight(8),
                Width = Application.GetMinRealAverage(36),
                Height = Application.GetMinRealAverage(36),
                UnSelectedImagePath = "Public/Switch_2.png",
                SelectedImagePath = "Public/SwitchOn_2.png",
                IsSelected = faceUnlockSwitch,
            };
            faceUnlockView.AddChidren(btnFaceUnlockSwitchIcon);
            #endregion
 
            contentView.AddChidren(new Button()
            {
                Height = Application.GetRealHeight(8),
                BackgroundColor = CSS_Color.BackgroundColor,
            });
 
 
            #region 触发方式 TriggerMode
            var triggerModeView = new FrameLayout()
            {
                Height = Application.GetRealHeight(50),
                BackgroundColor = CSS.CSS_Color.MainBackgroundColor,
            };
            contentView.AddChidren(triggerModeView);
 
            var btnTriggerModeRight = new Button()
            {
                X = Application.GetRealWidth(339),
                Gravity = Gravity.CenterVertical,
                Width = Application.GetMinRealAverage(16),
                Height = Application.GetMinRealAverage(16),
                UnSelectedImagePath = "Public/Right.png",
            };
            triggerModeView.AddChidren(btnTriggerModeRight);
 
            var btnTriggerModeStateText = new Button()
            {
                Width = Application.GetRealWidth(223),
                TextAlignment = TextAlignment.CenterRight,
                TextSize = CSS_FontSize.TextFontSize,
                TextColor = CSS_Color.PromptingColor1,
                TextID = StringId.ManualTriggering,
            };
            triggerModeView.AddChidren(btnTriggerModeStateText);
 
            var btnTriggerModeText = new Button()
            {
                X = Application.GetRealWidth(16),
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextAlignment = TextAlignment.CenterLeft,
                TextID = StringId.TriggerMode,
            };
            triggerModeView.AddChidren(btnTriggerModeText);
 
            btnTriggerModeText.MouseUpEventHandler = (sender, e) =>
            {
 
            };
            #endregion
 
            contentView.AddChidren(new Button()
            {
                Height = 1,
                BackgroundColor = CSS_Color.PromptingColor1,
                Gravity = Gravity.CenterHorizontal,
            });
 
 
            #region 人脸录入帮助 
            var faceEntryHelpView = new FrameLayout()
            {
                Height = Application.GetRealHeight(50),
                BackgroundColor = CSS.CSS_Color.MainBackgroundColor,
            };
            contentView.AddChidren(faceEntryHelpView);
 
            var btnFaceEntryHelpRight = new Button()
            {
                X = Application.GetRealWidth(339),
                Gravity = Gravity.CenterVertical,
                Width = Application.GetMinRealAverage(16),
                Height = Application.GetMinRealAverage(16),
                UnSelectedImagePath = "Public/Right.png",
            };
            faceEntryHelpView.AddChidren(btnFaceEntryHelpRight);
 
     
            var btnFaceEntryHelpText = new Button()
            {
                X = Application.GetRealWidth(16),
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextAlignment = TextAlignment.CenterLeft,
                TextID = StringId.FaceEntryHelp,
            };
            faceEntryHelpView.AddChidren(btnFaceEntryHelpText);
 
            btnFaceEntryHelpText.MouseUpEventHandler = (sender, e) => {
 
            };
            #endregion
 
 
 
        }
 
    }
}