From d9fd4c59bea0f21d4c8241920cef90440cf53f43 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期六, 28 八月 2021 17:20:45 +0800 Subject: [PATCH] 2021-8-28-05 --- HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FaceSettingResultPage.cs | 97 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 97 insertions(+), 0 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FaceSettingResultPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FaceSettingResultPage.cs new file mode 100644 index 0000000..c9645e4 --- /dev/null +++ b/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FaceSettingResultPage.cs @@ -0,0 +1,97 @@ +锘縰sing System; +using HDL_ON.UI.CSS; +using Shared; +namespace HDL_ON.UI +{ + public class FaceSettingResultPage : FrameLayout + { + FrameLayout bodyView; + + Action backAction; + public FaceSettingResultPage(Action action) + { + bodyView = this; + backAction = action; + } + + /// <summary> + /// + /// </summary> + /// <param name="isSuccess">鏄惁鎴愬姛</param> + public void LoadPage(bool isSuccess) + { + new TopViewDiv(bodyView, Language.StringByID(StringId.FacePassage)).LoadTopView(); + bodyView.BackgroundColor = CSS_Color.BackgroundColor; + + + var contentView = new FrameLayout() + { + Y = Application.GetRealHeight(64), + Height = Application.GetRealHeight(667 - 64), + }; + bodyView.AddChidren(contentView); + + + + var btnResultIcon = new Button() + { + Gravity = Gravity.CenterHorizontal, + Y = Application.GetRealHeight(99), + Width = Application.GetRealWidth(100), + Height = Application.GetRealWidth(100), + UnSelectedImagePath = "PersonalCenter/FacePassage/FailIcon.png", + SelectedImagePath = "PersonalCenter/FacePassage/TrueIcon.png", + IsSelected = isSuccess, + }; + contentView.AddChidren(btnResultIcon); + + Button btnResultText = new Button() + { + Y = Application.GetRealHeight(240), + Height = Application.GetRealHeight(40), + TextAlignment = TextAlignment.Center, + TextColor = CSS_Color.FirstLevelTitleColor, + TextSize = CSS_FontSize.SubheadingFontSize, + }; + contentView.AddChidren(btnResultText); + + if(isSuccess) + { + btnResultText.TextID = StringId.FaceInputSucceeded; + } + else + { + btnResultText.TextID = StringId.FaceInputFailed; + } + + var btnSetFaceId = new Button() + { + Y = Application.GetRealHeight(539), + Gravity = Gravity.CenterHorizontal, + Width = Application.GetRealWidth(220), + Height = Application.GetRealWidth(44), + Radius = (uint)Application.GetRealWidth(22), + BackgroundColor = CSS_Color.MainColor, + TextID = isSuccess ? StringId.Complete :StringId.Retry, + TextSize = CSS_FontSize.SubheadingFontSize, + TextColor = CSS_Color.MainBackgroundColor, + TextAlignment = TextAlignment.Center, + IsBold = true, + }; + contentView.AddChidren(btnSetFaceId); + + btnSetFaceId.MouseUpEventHandler = (sender, e) => { + if (isSuccess) + { + this.RemoveFromParent(); + } + else + { + backAction?.Invoke(); + this.RemoveFromParent(); + } + }; + + } + } +} \ No newline at end of file -- Gitblit v1.8.0