wxr
2024-06-06 f54a487bb42ac49bf81bd7b5eea311fc79231bc6
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
using System;
using HDL_ON.UI.CSS;
using Shared;
namespace HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock
{
    public class VideoDoorlockBatteryManagementPage : FrameLayout
    {
        FrameLayout bodyView;
 
 
        public VideoDoorlockBatteryManagementPage()
        {
            bodyView = this;
 
        }
 
        public void LoadPage()
        {
            new TopViewDiv(bodyView, Language.StringByID(StringId.BatteryManagement)).LoadTopView();
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
 
 
            var view1 = new FrameLayout()
            {
                Y = Application.GetRealHeight(64),
                Height = Application.GetRealHeight(276),
                BackgroundColor = CSS_Color.MainBackgroundColor,
                BackgroundImagePath = "FunctionIcon/DoorLock/VideoDoorlockBatteryManagementBg.png"//VideoDoorlockBatteryManagementBg
            };
            bodyView.AddChidren(view1);
 
 
            var btnTitle1 = new Button()
            {
                Width = Application.GetRealWidth(200),
                X = Application.GetRealWidth(16),
                Y = Application.GetRealHeight(16),
                IsMoreLines = true,
                TextAlignment = TextAlignment.TopLeft,
                TextSize = CSS_FontSize.HeadlineFontSize,
                TextColor = CSS_Color.FirstLevelTitleColor,
                Text = "门锁电源",
            };
            view1.AddChidren(btnTitle1);
 
            var btnMsg1 = new Button()
            {
                X = Application.GetRealWidth(16),
                Y = Application.GetRealHeight(57),
                Width = Application.GetRealWidth(213),
                Height = Application.GetRealHeight(200),
                TextAlignment = TextAlignment.TopLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.TextFontSize,
                IsMoreLines = true,
                Text = "打开室内面板电池盖,取出锂电池进行充电。\r\n请使用 5V2A 适配器对锂电池进行充电。"
            };
            view1.AddChidren(btnMsg1);
 
            var view2 = new FrameLayout()
            {
                Y = Application.GetRealHeight(8) + view1.Bottom,
                BackgroundColor = CSS_Color.MainBackgroundColor,
                Height = Application.GetRealHeight(170)
            };
            bodyView.AddChidren(view2);
 
            var btnTitle2 = new Button()
            {
                Width = Application.GetRealWidth(200),
                X = Application.GetRealWidth(16),
                Y = Application.GetRealHeight(16),
                IsMoreLines = true,
                TextAlignment = TextAlignment.TopLeft,
                TextSize = CSS_FontSize.HeadlineFontSize,
                TextColor = CSS_Color.FirstLevelTitleColor,
                Text = "低电量说明",
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            view2.AddChidren(btnTitle2);
 
            var btnMsg2 = new Button()
            {
                X = Application.GetRealWidth(16),
                Y = Application.GetRealHeight(57),
                Width = Application.GetRealWidth(213),
                Height = Application.GetRealHeight(110),
                TextAlignment = TextAlignment.TopLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.TextFontSize,
                IsMoreLines = true,
                Text = "设备电量低时将自动关闭检测唤醒功能,人脸识别开锁为手动触发。\r\n 当电量低于极限值时,为保证应急开锁,设备将自动离线并仅支持开锁功能。"
            };
            view2.AddChidren(btnMsg2);
 
            if (Language.CurrentLanguage != "Chinese")
            {
                btnTitle1.Text = "Door lock power supply";
                btnMsg1.Text = "Open the indoor panel battery cover and remove the lithium battery for charging.\r\n" +
                    "Please use a 5V2A adapter to charge the lithium battery.";
                btnTitle2.Text = "Low battery description";
                btnMsg2.Text = "When the device's battery is low, the detection and wake-up function will be automatically turned off, and the facial recognition unlock will be manually triggered.\r\n" +
                    "When the battery level drops below the limit value, to ensure emergency unlocking, the device will automatically go offline and only support unlocking function.";
            }
 
        }
 
    }
}