| | |
| | | Y = Application.GetRealHeight(64), |
| | | Height = Application.GetRealHeight(600), |
| | | ScrollEnabled = false, |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | }; |
| | | bodyView.AddChidren(contentView); |
| | | |
| | |
| | | bodyView.AddChidren(waitPage); |
| | | waitPage.Start(""); |
| | | |
| | | #endregion |
| | | |
| | | contentView.AddChidren(new Button() |
| | | { |
| | | Height = Application.GetRealHeight(8), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | }); |
| | | |
| | | var view = new VerticalScrolViewLayout() |
| | | { |
| | | Height = Application.GetRealHeight(300), |
| | | }; |
| | | contentView.AddChidren(view); |
| | | |
| | | |
| | | btnFaceUnlockSwitchIcon.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | waitPage.Start(""); |
| | |
| | | { |
| | | //更新界面 |
| | | btnFaceUnlockSwitchIcon.IsSelected = changeState; |
| | | loadSubView(view, faceUnlockSetup); |
| | | }); |
| | | } |
| | | else |
| | |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | | #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, |
| | | }; |
| | | 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) => |
| | | { |
| | | var page = new VideoDoorlockFaceUnlockTriggerSettingPage(device, faceUnlockSetup); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | |
| | | }; |
| | | #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 |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | new System.Threading.Thread(() => { |
| | |
| | | //更新界面 |
| | | faceUnlockSetup = Newtonsoft.Json.JsonConvert.DeserializeObject<FaceUnlockSetupObj>(pack.Data.ToString()); |
| | | btnFaceUnlockSwitchIcon.IsSelected = faceUnlockSetup.enabled; |
| | | |
| | | btnTriggerModeStateText.TextID = faceUnlockSetup.mode == 0 ? StringId.AutomaticTriggering : StringId.ManualTriggering; |
| | | loadSubView(view, faceUnlockSetup); |
| | | }); |
| | | } |
| | | else |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | |
| | | } |
| | | |
| | | void loadSubView(VerticalScrolViewLayout view, FaceUnlockSetupObj faceUnlockSetup) |
| | | { |
| | | if (faceUnlockSetup.enabled) |
| | | { |
| | | #region 触发方式 TriggerMode |
| | | var triggerModeView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(50), |
| | | BackgroundColor = CSS.CSS_Color.MainBackgroundColor, |
| | | }; |
| | | view.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() |
| | | { |
| | | X = Application.GetRealWidth(100), |
| | | Width = Application.GetRealWidth(223), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | }; |
| | | triggerModeView.AddChidren(btnTriggerModeStateText); |
| | | btnTriggerModeStateText.TextID = faceUnlockSetup.mode == 0 ? StringId.AutomaticTriggering : StringId.ManualTriggering; |
| | | |
| | | 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) => |
| | | { |
| | | var page = new VideoDoorlockFaceUnlockTriggerSettingPage(device, faceUnlockSetup); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | |
| | | }; |
| | | #endregion |
| | | |
| | | view.AddChidren(new Button { Height = 1, BackgroundColor = CSS_Color.DividingLineColor }); |
| | | } |
| | | #region 人脸录入帮助 |
| | | var faceEntryHelpView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(50), |
| | | BackgroundColor = CSS.CSS_Color.MainBackgroundColor, |
| | | }; |
| | | view.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) => |
| | | { |
| | | var page = new VideoDoorlockFaceUnlockHelpPage(); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | #endregion |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <summary> |
| | | /// 开关 |
| | | /// </summary> |
| | | public bool enabled; |
| | | public bool enabled = false; |
| | | /// <summary> |
| | | /// 解锁方式 0-自动 1-手动 |
| | | /// </summary> |