From 7f233a10afa6882b4d9531185af60e8843bc1af2 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期一, 11 五月 2020 09:21:36 +0800 Subject: [PATCH] 20200511 --- HDL_ON/UI/UI0-Public/OperationSuccessPromptPage.cs | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 100 insertions(+), 5 deletions(-) diff --git a/HDL_ON/UI/UI0-Public/OperationSuccessPromptPage.cs b/HDL_ON/UI/UI0-Public/OperationSuccessPromptPage.cs index 7032841..586c4ee 100644 --- a/HDL_ON/UI/UI0-Public/OperationSuccessPromptPage.cs +++ b/HDL_ON/UI/UI0-Public/OperationSuccessPromptPage.cs @@ -9,20 +9,115 @@ /// </summary> public class OperationResultDisPalyPage : Dialog { - Dialog bodyView; + Dialog dialog; + FrameLayout bodyView; public OperationResultDisPalyPage() { - bodyView = this; + dialog = this; + bodyView = new FrameLayout(); } - public void LoadPage(bool result) + /// <summary> + /// 鎿嶄綔缁撴灉鏄剧ず椤甸潰 + /// </summary> + /// <param name="result">鎿嶄綔缁撴灉</param> + /// <param name="title">椤甸潰鏍囬</param> + /// <param name="tipTitle">鎻愮ず鏍囬</param> + /// <param name="tipMsg">鎻愮ず淇℃伅</param> + public void LoadPage(bool result,string title,string tipTitle,string tipMsg) { bodyView.BackgroundColor = CSS_Color.BackgroundColor; - string title = result ? Language.StringByID(StringId.SetSuccessfully) : Language.StringByID(StringId.SetSuccessfully); - new TopViewDiv(bodyView, MainPage.BaseView, title); + dialog.AddChidren(bodyView); + new TopViewDiv(dialog,bodyView, title).LoadTopView() ; + Button btnTipIcon = new Button() + { + Y = Application.GetRealHeight(96), + Gravity = Gravity.CenterHorizontal, + Width = Application.GetRealWidth(180), + Height = Application.GetRealWidth(180), + UnSelectedImagePath = result ? "Public/TipIcon_Successfully.png" : "Public/TipIcon_Failed.png", + }; + bodyView.AddChidren(btnTipIcon); + Button btnTipTitle = new Button() + { + Y = Application.GetRealHeight(288), + Height = Application.GetRealHeight(30), + TextColor = result ? CSS_Color.MainColor : CSS_Color.WarningColor, + Text = tipTitle, + TextAlignment = TextAlignment.Center, + TextSize = CSS_FontSize.SubheadingFontSize, + }; + bodyView.AddChidren(btnTipTitle); + + Button btnTipMsg = new Button() + { + Y = btnTipTitle.Bottom, + Height = Application.GetRealHeight(25), + TextAlignment = TextAlignment.Center, + TextColor = CSS_Color.PromptingColor1, + TextSize = CSS_FontSize.PromptFontSize_FirstLevel, + Text = tipMsg, + }; + bodyView.AddChidren(btnTipMsg); + + Button btnConfirm = new Button() + { + Y = Application.GetRealHeight(401), + Gravity = Gravity.CenterHorizontal, + Width = Application.GetRealWidth(220), + Height = Application.GetRealHeight(44), + Radius = (uint)Application.GetRealHeight(22), + BackgroundColor = CSS_Color.MainColor, + TextAlignment = TextAlignment.Center, + TextColor = CSS_Color.MainBackgroundColor, + TextID = StringId.Confirm + }; + bodyView.AddChidren(btnConfirm); + btnConfirm.MouseUpEventHandler = (sender, e) => { + this.Close(); + }; + + } + /// <summary> + /// 闄勫姞鎿嶄綔 + /// </summary> + public void AdditionalOperations(string msg,Action<bool> action) + { + Button btnCheckIcon = new Button() + { + X = Application.GetRealWidth(78), + Y = Application.GetRealHeight(350), + Width = Application.GetRealWidth(32), + Height = Application.GetRealWidth(32), + UnSelectedImagePath = "Public/ChooseIcon.png", + SelectedImagePath = "Public/ChooseOnIcon.png", + }; + bodyView.AddChidren(btnCheckIcon); + + Button btnMsg = new Button() + { + X = btnCheckIcon.Right, + Y = Application.GetRealHeight(350), + Width = Application.GetRealWidth(220), + Height = Application.GetRealHeight(32), + TextAlignment = TextAlignment.CenterLeft, + Text = msg, + TextColor = CSS_Color.FirstLevelTitleColor, + TextSize = CSS_FontSize.TextFontSize, + }; + bodyView.AddChidren(btnMsg); + + btnCheckIcon.MouseUpEventHandler = (sender, e) => { + btnCheckIcon.IsSelected = !btnCheckIcon.IsSelected; + action(btnCheckIcon.IsSelected); + }; + btnMsg.MouseUpEventHandler = (sender, e) =>{ + btnCheckIcon.IsSelected = !btnCheckIcon.IsSelected; + action(btnCheckIcon.IsSelected); + }; } } } -- Gitblit v1.8.0