From a1b0ab7044100daaa7e0f1da2d2ca45e38098963 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期一, 29 三月 2021 09:13:25 +0800
Subject: [PATCH] 2021-3-29-2
---
HDL_ON/UI/UI0-Public/OperationSuccessPromptPage.cs | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 101 insertions(+), 5 deletions(-)
diff --git a/HDL_ON/UI/UI0-Public/OperationSuccessPromptPage.cs b/HDL_ON/UI/UI0-Public/OperationSuccessPromptPage.cs
index 7032841..f9d4f33 100644
--- a/HDL_ON/UI/UI0-Public/OperationSuccessPromptPage.cs
+++ b/HDL_ON/UI/UI0-Public/OperationSuccessPromptPage.cs
@@ -9,20 +9,116 @@
/// </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.GetRealWidth(44),
+ Radius = (uint)Application.GetRealWidth(22),
+ BackgroundColor = CSS_Color.MainColor,
+ TextAlignment = TextAlignment.Center,
+ TextColor = CSS_Color.MainBackgroundColor,
+ TextID = StringId.Confirm,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ };
+ 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.GetRealWidth(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