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 } } }