From 6b047520f4bcf7f9e0d264ec4fc3faf96e1cddb4 Mon Sep 17 00:00:00 2001 From: Sunny Date: Wed, 8 May 2024 14:33:43 +0800 Subject: [PATCH] =?UTF-8?q?*=20UIFormHelper:=20=E9=BB=98=E8=AE=A4=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E7=9A=84ShowMask=E9=83=BD=E8=AE=BE=E7=BD=AE=E4=B8=BAf?= =?UTF-8?q?alse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SunnyUI/Forms/UIFormHelper.cs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/SunnyUI/Forms/UIFormHelper.cs b/SunnyUI/Forms/UIFormHelper.cs index c9d2c56b..50c43373 100644 --- a/SunnyUI/Forms/UIFormHelper.cs +++ b/SunnyUI/Forms/UIFormHelper.cs @@ -28,6 +28,7 @@ * 2024-04-22: V3.6.5 输入弹窗前增加Show前缀 * 2024-04-27: V3.6.5 提示框增加延时关闭 * 2024-04-28: V3.6.5 信息提示窗体跟随程序所在的屏幕 + * 2024-05-08: V3.6.6 默认弹窗的ShowMask都设置为false ******************************************************************************/ using System; @@ -85,37 +86,37 @@ namespace Sunny.UI public static class UIMessageBox { - public static void Show(string text, bool showMask = true, int delay = 0) + public static void Show(string text, bool showMask = false, int delay = 0) { Show(text, UILocalize.InfoTitle, UIStyle.Blue, UIMessageBoxButtons.OK, showMask, true, delay); } - public static void ShowInfo(string text, bool showMask = true, int delay = 0) + public static void ShowInfo(string text, bool showMask = false, int delay = 0) { Show(text, UILocalize.InfoTitle, UIStyle.Gray, UIMessageBoxButtons.OK, showMask, true, delay); } - public static void ShowSuccess(string text, bool showMask = true, int delay = 0) + public static void ShowSuccess(string text, bool showMask = false, int delay = 0) { Show(text, UILocalize.SuccessTitle, UIStyle.Green, UIMessageBoxButtons.OK, showMask, true, delay); } - public static void ShowWarning(string text, bool showMask = true, int delay = 0) + public static void ShowWarning(string text, bool showMask = false, int delay = 0) { Show(text, UILocalize.WarningTitle, UIStyle.Orange, UIMessageBoxButtons.OK, showMask, true, delay); } - public static void ShowError(string text, bool showMask = true, int delay = 0) + public static void ShowError(string text, bool showMask = false, int delay = 0) { Show(text, UILocalize.ErrorTitle, UIStyle.Red, UIMessageBoxButtons.OK, showMask, true, delay); } - public static bool ShowAsk(string text, bool showMask = true, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Ok) + public static bool ShowAsk(string text, bool showMask = false, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Ok) { return ShowMessageDialog(text, UILocalize.AskTitle, true, UIStyle.Blue, showMask, true, defaultButton); } - public static bool Show(string text, string caption, UIStyle style = UIStyle.Blue, UIMessageBoxButtons buttons = UIMessageBoxButtons.OK, bool showMask = true, bool topMost = true, int delay = 0) + public static bool Show(string text, string caption, UIStyle style = UIStyle.Blue, UIMessageBoxButtons buttons = UIMessageBoxButtons.OK, bool showMask = false, bool topMost = true, int delay = 0) { return ShowMessageDialog(text, caption, buttons == UIMessageBoxButtons.OKCancel, style, showMask, topMost, UIMessageDialogButtons.Ok, delay); } @@ -132,7 +133,7 @@ namespace Sunny.UI /// 默认按钮 /// 消息停留时长(ms)。默认1秒 /// 结果 - public static bool ShowMessageDialog(string message, string title, bool showCancelButton, UIStyle style, bool showMask = true, bool topMost = true, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Ok, int delay = 0) + public static bool ShowMessageDialog(string message, string title, bool showCancelButton, UIStyle style, bool showMask = false, bool topMost = true, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Ok, int delay = 0) { Point pt = SystemEx.GetCursorPos(); Rectangle screen = Screen.GetBounds(pt);