From 8df24b0a3dfd5b6f39c5393ef24eab25b70ab858 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 11 九月 2020 13:18:33 +0800
Subject: [PATCH] 202009111

---
 HDL_ON/UI/UI0-Public/PublicAssmebly.cs |   38 +++++++++++++++++++++-----------------
 1 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/HDL_ON/UI/UI0-Public/PublicAssmebly.cs b/HDL_ON/UI/UI0-Public/PublicAssmebly.cs
index 00f7b44..0b0a36d 100644
--- a/HDL_ON/UI/UI0-Public/PublicAssmebly.cs
+++ b/HDL_ON/UI/UI0-Public/PublicAssmebly.cs
@@ -276,22 +276,12 @@
             };
             contentView.AddChidren(btnCancel);
 
-            //Button btnBottomLine = new Button()
-            //{
-            //    X = btnCancel.Right,
-            //    Y = btnLine.Bottom,
-            //    Height = Application.GetRealHeight(43),
-            //    Width = Application.GetRealWidth(1),
-            //    BackgroundColor = CSS_Color.DividingLineColor,
-            //};
-            //contentView.AddChidren(btnBottomLine);
-
             Button btnConfirm = new Button()
             {
                 X = btnCancel.Right,
                 Y = btnLine.Y,
                 Width = Application.GetRealWidth(135),
-                Height = Application.GetRealHeight(43 + 1),
+                Height = Application.GetRealHeight(45),
                 TextAlignment = TextAlignment.Center,
                 //TextColor = CSS_Color.TextualColor,
                 TextSize = CSS_FontSize.SubheadingFontSize,
@@ -334,20 +324,31 @@
         /// <param name="isWhite"></param>
         public void TipMsgAutoClose(string msg, bool isWhite, int closeTime = 1500)
         {
-            Dialog dialog = new Dialog()
+            Dialog dialog = new Dialog();
+
+            FrameLayout dialogBody = new FrameLayout();
+            dialog.AddChidren(dialogBody);
+            dialogBody.MouseUpEventHandler = (sender, e) =>
+            {
+                dialog.Close();
+                dialog = null;
+            };
+
+            FrameLayout frame = new FrameLayout()
             {
                 X = Application.GetRealWidth(89),
                 Y = Application.GetRealHeight(285),
                 Width = Application.GetRealWidth(198),
                 Height = Application.GetRealHeight(98),
-            };
-
-            FrameLayout frame = new FrameLayout()
-            {
                 BackgroundColor = isWhite ? 0xE6FFFFFF : CSS_Color.DialogTransparentColor1,
                 Radius = (uint)Application.GetRealWidth(12),
             };
             dialog.AddChidren(frame);
+            frame.MouseUpEventHandler = (sender, e) =>
+            {
+                dialog.Close();
+                dialog = null;
+            };
 
             Button btnTipIcon = new Button()
             {
@@ -377,7 +378,10 @@
                 Thread.Sleep(closeTime);
                 Application.RunOnMainThread(() =>
                 {
-                    dialog.Close();
+                    if(dialog!=null)
+                    {
+                        dialog.Close();
+                    }
                 });
             })
             { IsBackground = true }.Start();

--
Gitblit v1.8.0