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."; } } } }