* UIFormHelper: 提问弹窗增加默认是确认或者取消按钮的选择
This commit is contained in:
parent
ba4014f780
commit
e554b222da
@ -1971,7 +1971,7 @@ namespace Sunny.UI
|
|||||||
/// <param name="msg">信息</param>
|
/// <param name="msg">信息</param>
|
||||||
/// <param name="showMask">显示遮罩层</param>
|
/// <param name="showMask">显示遮罩层</param>
|
||||||
/// <returns>结果</returns>
|
/// <returns>结果</returns>
|
||||||
public bool ShowAskDialog(string msg, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Ok, bool showMask = false)
|
public bool ShowAskDialog(string msg, bool showMask = false, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Ok)
|
||||||
{
|
{
|
||||||
return UIMessageDialog.ShowMessageDialog(msg, UILocalize.AskTitle, true, UIStyle.Blue, showMask, true, defaultButton);
|
return UIMessageDialog.ShowMessageDialog(msg, UILocalize.AskTitle, true, UIStyle.Blue, showMask, true, defaultButton);
|
||||||
}
|
}
|
||||||
@ -2032,7 +2032,7 @@ namespace Sunny.UI
|
|||||||
/// <param name="style">主题</param>
|
/// <param name="style">主题</param>
|
||||||
/// <param name="showMask">显示遮罩层</param>
|
/// <param name="showMask">显示遮罩层</param>
|
||||||
/// <returns>结果</returns>
|
/// <returns>结果</returns>
|
||||||
public bool ShowAskDialog(string title, string msg, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Ok, UIStyle style = UIStyle.Blue, bool showMask = false)
|
public bool ShowAskDialog(string title, string msg, UIStyle style = UIStyle.Blue, bool showMask = false, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Ok)
|
||||||
{
|
{
|
||||||
return UIMessageDialog.ShowMessageDialog(msg, title, true, style, showMask, true, defaultButton);
|
return UIMessageDialog.ShowMessageDialog(msg, title, true, style, showMask, true, defaultButton);
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
* 2021-12-13: V3.0.9 增加全屏遮罩,Form的ShowDialogWithMask()扩展方法
|
* 2021-12-13: V3.0.9 增加全屏遮罩,Form的ShowDialogWithMask()扩展方法
|
||||||
* 2022-07-17: V3.2.1 解决ShowNotifier打开多个,全部关闭时出错的问题
|
* 2022-07-17: V3.2.1 解决ShowNotifier打开多个,全部关闭时出错的问题
|
||||||
* 2023-07-27: V3.4.1 默认提示弹窗TopMost为true
|
* 2023-07-27: V3.4.1 默认提示弹窗TopMost为true
|
||||||
* 2023-07-27: V3.4.1 提问弹窗增加可选择默认是确认或者取消按钮的选择
|
* 2023-07-27: V3.4.1 提问弹窗增加默认是确认或者取消按钮的选择
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
@ -178,9 +178,9 @@ namespace Sunny.UI
|
|||||||
/// <param name="msg">信息</param>
|
/// <param name="msg">信息</param>
|
||||||
/// <param name="style"></param>
|
/// <param name="style"></param>
|
||||||
/// <returns>结果</returns>
|
/// <returns>结果</returns>
|
||||||
public static bool ShowAskDialog(this Form form, string msg, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Ok, UIStyle style = UIStyle.Blue)
|
public static bool ShowAskDialog(this Form form, string msg, UIStyle style = UIStyle.Blue, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Ok)
|
||||||
{
|
{
|
||||||
return form.ShowAskDialog(UILocalize.AskTitle, msg, defaultButton, style);
|
return form.ShowAskDialog(UILocalize.AskTitle, msg, style, defaultButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -191,7 +191,7 @@ namespace Sunny.UI
|
|||||||
/// <param name="msg">信息</param>
|
/// <param name="msg">信息</param>
|
||||||
/// <param name="style"></param>
|
/// <param name="style"></param>
|
||||||
/// <returns>结果</returns>
|
/// <returns>结果</returns>
|
||||||
public static bool ShowAskDialog(this Form form, string title, string msg, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Ok, UIStyle style = UIStyle.Blue)
|
public static bool ShowAskDialog(this Form form, string title, string msg, UIStyle style = UIStyle.Blue, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Ok)
|
||||||
{
|
{
|
||||||
return form.ShowMessageDialog(msg, title, true, style);
|
return form.ShowMessageDialog(msg, title, true, style);
|
||||||
}
|
}
|
||||||
|
@ -183,13 +183,12 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
private void UIMessageForm_Shown(object sender, EventArgs e)
|
private void UIMessageForm_Shown(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (!ShowCancel || DefaultButton == UIMessageDialogButtons.Ok)
|
if (ShowCancel)
|
||||||
{
|
{
|
||||||
btnOK.Focus();
|
if (DefaultButton == UIMessageDialogButtons.Ok)
|
||||||
}
|
btnOK.Focus();
|
||||||
else
|
else
|
||||||
{
|
btnCancel.Focus();
|
||||||
btnCancel.Focus();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1233,7 +1233,7 @@ namespace Sunny.UI
|
|||||||
/// <param name="msg">信息</param>
|
/// <param name="msg">信息</param>
|
||||||
/// <param name="showMask">显示遮罩层</param>
|
/// <param name="showMask">显示遮罩层</param>
|
||||||
/// <returns>结果</returns>
|
/// <returns>结果</returns>
|
||||||
public bool ShowAskDialog(string msg, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Ok, bool showMask = false)
|
public bool ShowAskDialog(string msg, bool showMask = false, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Ok)
|
||||||
{
|
{
|
||||||
return UIMessageDialog.ShowMessageDialog(msg, UILocalize.AskTitle, true, UIStyle.Blue, showMask, true, defaultButton);
|
return UIMessageDialog.ShowMessageDialog(msg, UILocalize.AskTitle, true, UIStyle.Blue, showMask, true, defaultButton);
|
||||||
}
|
}
|
||||||
@ -1294,7 +1294,7 @@ namespace Sunny.UI
|
|||||||
/// <param name="style">主题</param>
|
/// <param name="style">主题</param>
|
||||||
/// <param name="showMask">显示遮罩层</param>
|
/// <param name="showMask">显示遮罩层</param>
|
||||||
/// <returns>结果</returns>
|
/// <returns>结果</returns>
|
||||||
public bool ShowAskDialog(string title, string msg, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Ok, UIStyle style = UIStyle.Blue, bool showMask = false)
|
public bool ShowAskDialog(string title, string msg, UIStyle style = UIStyle.Blue, bool showMask = false, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Ok)
|
||||||
{
|
{
|
||||||
return UIMessageDialog.ShowMessageDialog(msg, title, true, style, showMask, true, defaultButton);
|
return UIMessageDialog.ShowMessageDialog(msg, title, true, style, showMask, true, defaultButton);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user