From a9d1161b1df96e7ddad566335989a1444e433ef5 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期二, 28 三月 2023 11:54:45 +0800
Subject: [PATCH] 2023年03月28日11:52:02

---
 HDL_ON/UI/UI0-Public/PublicAssmebly.cs |  130 +++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 124 insertions(+), 6 deletions(-)

diff --git a/HDL_ON/UI/UI0-Public/PublicAssmebly.cs b/HDL_ON/UI/UI0-Public/PublicAssmebly.cs
index 618425a..7c35a74 100644
--- a/HDL_ON/UI/UI0-Public/PublicAssmebly.cs
+++ b/HDL_ON/UI/UI0-Public/PublicAssmebly.cs
@@ -243,7 +243,7 @@
         /// <param name="titleId"></param>
         /// <param name="msgId"></param>
         /// <param name="callBackAction"></param>
-        public void TipOptionMsg(int titleId, string msg, Action callBackAction)
+        public void TipOptionMsg(int titleId, string msg, Action callBackAction,int extraHeight = 0)
         {
             Dialog dialog = new Dialog()
             {
@@ -253,8 +253,8 @@
             FrameLayout contentView = new FrameLayout()
             {
                 Gravity = Gravity.Center,
-                Width = Application.GetRealWidth(270),
-                Height = Application.GetRealHeight(140),
+                Width = Application.GetRealWidth(270 ),
+                Height = Application.GetRealHeight(140 + extraHeight),
                 BackgroundColor = CSS.CSS_Color.MainBackgroundColor,
                 BorderColor = 0x00000000,
                 BorderWidth = 0,
@@ -277,7 +277,7 @@
             Button btnMsg = new Button()
             {
                 Gravity = Gravity.CenterHorizontal,
-                Height = Application.GetRealHeight(25),
+                Height = Application.GetRealHeight(35 + extraHeight),
                 Y = btnTitle.Bottom,
                 Width = Application.GetRealHeight(200),
                 TextAlignment = TextAlignment.Center,
@@ -290,7 +290,7 @@
 
             Button btnLine = new Button()
             {
-                Y = Application.GetRealHeight(96),
+                Y = Application.GetRealHeight(96 + extraHeight),
                 Height = Application.GetRealHeight(1),
                 Width = Application.GetRealWidth(270 / 2),
                 BackgroundColor = CSS.CSS_Color.DividingLineColor,
@@ -351,6 +351,124 @@
             };
 
         }
+
+
+        /// <summary>
+        /// 鍔犺浇鎻愮ず寮圭獥
+        /// </summary>
+        /// <param name="titleId"></param>
+        /// <param name="msgId"></param>
+        /// <param name="callBackAction"></param>
+        public void TipOptionMsgNotTitle(string msg, Action callBackAction, int extraHeight = 0)
+        {
+            Dialog dialog = new Dialog()
+            {
+                BackgroundColor = CSS_Color.DialogTransparentColor1,
+            };
+
+            FrameLayout contentView = new FrameLayout()
+            {
+                Gravity = Gravity.Center,
+                Width = Application.GetRealWidth(270),
+                Height = Application.GetRealHeight(140 + extraHeight),
+                BackgroundColor = CSS.CSS_Color.MainBackgroundColor,
+                BorderColor = 0x00000000,
+                BorderWidth = 0,
+                Radius = (uint)Application.GetMinRealAverage(10),
+            };
+            dialog.AddChidren(contentView);
+
+            Button btnMsg = new Button()
+            {
+                Gravity = Gravity.CenterHorizontal,
+                Height = Application.GetRealHeight(40 + extraHeight),
+                Y = Application.GetRealHeight(40),
+                Width = Application.GetRealHeight(200),
+                TextAlignment = TextAlignment.Center,
+                TextColor = 0xFF222222,
+                TextSize = CSS_FontSize.TextFontSize,
+                Text = msg,
+                IsMoreLines = true,
+            };
+            contentView.AddChidren(btnMsg);
+
+            Button btnLine = new Button()
+            {
+                Y = Application.GetRealHeight(96 + extraHeight),
+                Height = Application.GetRealHeight(1),
+                Width = Application.GetRealWidth(270 / 2),
+                BackgroundColor = CSS.CSS_Color.DividingLineColor,
+            };
+            contentView.AddChidren(btnLine);
+
+            Button btnCancel = new Button()
+            {
+                Y = btnLine.Bottom,
+                Width = Application.GetRealWidth(135),
+                Height = Application.GetRealHeight(43),
+                TextAlignment = TextAlignment.Center,
+                TextColor = CSS_Color.TextualColor,
+                TextSize = CSS_FontSize.SubheadingFontSize,
+                //SelectedTextColor = CSS_Color.MainBackgroundColor,
+                //SelectedBackgroundColor = CSS_Color.MainColor,
+                TextID = StringId.Cancel,
+            };
+            contentView.AddChidren(btnCancel);
+
+
+            Button btnLine11 = new Button()
+            {
+                Y = btnLine.Bottom,
+                X = btnCancel.Right,
+                Width = 1,
+                Height = Application.GetRealHeight(43),
+                BackgroundColor = CSS.CSS_Color.DividingLineColor,
+
+            };
+            contentView.AddChidren(btnCancel);
+
+            Button btnConfirm = new Button()
+            {
+                X = btnLine11.Right,
+                Y = btnLine.Bottom,
+                Width = Application.GetRealWidth(135),
+                Height = Application.GetRealHeight(45),
+                TextAlignment = TextAlignment.Center,
+                //TextColor = CSS_Color.TextualColor,
+                TextSize = CSS_FontSize.SubheadingFontSize,
+                TextColor = CSS_Color.MainColor,
+                BackgroundColor = CSS_Color.MainBackgroundColor,
+                TextID = StringId.Confirm,
+            };
+            contentView.AddChidren(btnConfirm);
+            //渚嬶細鍙充笅鍦嗚 澶у皬涓�50
+            int mRectCornerID = HDLUtils.RectCornerBottomRight;
+            btnConfirm.SetCornerWithSameRadius((uint)Application.GetMinRealAverage(10), mRectCornerID);
+            dialog.Show();
+
+            //btnCancel.MouseDownEventHandler += (sender, e) =>
+            //{
+            //    btnCancel.IsSelected = true;
+            //};
+            btnCancel.MouseUpEventHandler += (sender, e) =>
+            {
+                //btnCancel.IsSelected = false;
+                dialog.Close();
+            };
+            //btnConfirm.MouseDownEventHandler += (sender, e) =>
+            //{
+            //    btnConfirm.IsSelected = true;
+            //};
+            btnConfirm.MouseUpEventHandler += (sender, e) =>
+            {
+                //btnConfirm.IsSelected = false;
+                callBackAction();
+                dialog.Close();
+            };
+
+        }
+
+
 
         /// <summary>
         /// 淇℃伅鎻愮ず绐楀彛锛岃嚜鍔ㄥ叧闂�
@@ -463,7 +581,7 @@
             Button btnMsg = new Button()
             {
                 Gravity = Gravity.CenterHorizontal,
-                Height = Application.GetRealHeight(25),
+                Height = Application.GetRealHeight(35),
                 Y = btnTitle.Bottom,
                 Width = Application.GetRealHeight(200),
                 TextAlignment = TextAlignment.Center,

--
Gitblit v1.8.0