diff --git a/Bin/SunnyUI.dll b/Bin/SunnyUI.dll
index ad892f18..aa359bd9 100644
Binary files a/Bin/SunnyUI.dll and b/Bin/SunnyUI.dll differ
diff --git a/SunnyUI/Controls/UICheckBox.cs b/SunnyUI/Controls/UICheckBox.cs
index 6fc3974b..e1021e1d 100644
--- a/SunnyUI/Controls/UICheckBox.cs
+++ b/SunnyUI/Controls/UICheckBox.cs
@@ -42,7 +42,7 @@ namespace Sunny.UI
foreColor = UIStyles.Blue.CheckBoxForeColor;
fillColor = UIStyles.Blue.CheckBoxColor;
SetStyle(ControlStyles.StandardDoubleClick, UseDoubleClick);
- PaintOther += UICheckBox_PaintOther; ;
+ PaintOther += UICheckBox_PaintOther;
}
private void UICheckBox_PaintOther(object sender, PaintEventArgs e)
@@ -171,9 +171,10 @@ namespace Sunny.UI
}
else
{
- using (Pen pn = new Pen(color, 2))
+ using (Pen pn = new Pen(color, 1))
{
g.DrawRoundRectangle(pn, new Rectangle((int)left + 1, (int)top + 1, ImageSize - 2, ImageSize - 2), 1);
+ g.DrawRectangle(pn, new Rectangle((int)left + 2, (int)top + 2, ImageSize - 4, ImageSize - 4));
}
}
}
diff --git a/SunnyUI/Forms/UIFormHelper.cs b/SunnyUI/Forms/UIFormHelper.cs
index 453e9539..df71782b 100644
--- a/SunnyUI/Forms/UIFormHelper.cs
+++ b/SunnyUI/Forms/UIFormHelper.cs
@@ -28,6 +28,134 @@ namespace Sunny.UI
{
public static class UIMessageDialog
{
+ ///
+ /// 正确信息提示框
+ ///
+ /// 窗体
+ /// 信息
+ /// 主题
+ public static void ShowSuccessDialog(this Form form, string msg, UIStyle style = UIStyle.Green)
+ {
+ form.ShowMessageDialog(msg, UILocalize.SuccessTitle, false, style);
+ }
+
+ ///
+ /// 信息提示框
+ ///
+ /// 窗体
+ /// 信息
+ /// 主题
+ public static void ShowInfoDialog(this Form form, string msg, UIStyle style = UIStyle.Gray)
+ {
+ form.ShowMessageDialog(msg, UILocalize.InfoTitle, false, style);
+ }
+
+ ///
+ /// 警告信息提示框
+ ///
+ /// 窗体
+ /// 信息
+ /// 主题
+ public static void ShowWarningDialog(this Form form, string msg, UIStyle style = UIStyle.Orange)
+ {
+ form.ShowMessageDialog(msg, UILocalize.WarningTitle, false, style);
+ }
+
+ ///
+ /// 错误信息提示框
+ ///
+ /// 窗体
+ /// 信息
+ /// 主题
+ public static void ShowErrorDialog(this Form form, string msg, UIStyle style = UIStyle.Red)
+ {
+ form.ShowMessageDialog(msg, UILocalize.ErrorTitle, false, style);
+ }
+
+ ///
+ /// 确认信息提示框
+ ///
+ /// 窗体
+ /// 信息
+ ///
+ /// 结果
+ public static bool ShowAskDialog(this Form form, string msg, UIStyle style = UIStyle.Blue)
+ {
+ return form.ShowMessageDialog(msg, UILocalize.AskTitle, true, style);
+ }
+
+ ///
+ /// 正确信息提示框
+ ///
+ /// 窗体
+ /// 标题
+ /// 信息
+ /// 主题
+ public static void ShowSuccessDialog(this Form form, string title, string msg, UIStyle style = UIStyle.Green)
+ {
+ form.ShowMessageDialog(msg, title, false, style);
+ }
+
+ ///
+ /// 信息提示框
+ ///
+ /// 窗体
+ /// 标题
+ /// 信息
+ /// 主题
+ public static void ShowInfoDialog(this Form form, string title, string msg, UIStyle style = UIStyle.Gray)
+ {
+ form.ShowMessageDialog(msg, title, false, style);
+ }
+
+ ///
+ /// 警告信息提示框
+ ///
+ /// 窗体
+ /// 标题
+ /// 信息
+ /// 主题
+ public static void ShowWarningDialog(this Form form, string title, string msg, UIStyle style = UIStyle.Orange)
+ {
+ form.ShowMessageDialog(msg, title, false, style);
+ }
+
+ ///
+ /// 错误信息提示框
+ ///
+ /// 窗体
+ /// 标题
+ /// 信息
+ /// 主题
+ public static void ShowErrorDialog(this Form form, string title, string msg, UIStyle style = UIStyle.Red)
+ {
+ form.ShowMessageDialog(msg, title, false, style);
+ }
+
+ ///
+ /// 确认信息提示框
+ ///
+ /// 窗体
+ /// 标题
+ /// 信息
+ ///
+ /// 结果
+ public static bool ShowAskDialog(this Form form, string title, string msg, UIStyle style = UIStyle.Blue)
+ {
+ return form.ShowMessageDialog(msg, title, true, style);
+ }
+
+ public static bool ShowMessageDialog(this Form form, string message, string title, bool isShowCancel, UIStyle style)
+ {
+ UIMessageForm frm = new UIMessageForm();
+ frm.TopMost = form.TopMost;
+ frm.ShowMessage(message, title, isShowCancel, style);
+ frm.ShowDialog();
+ bool isOk = frm.IsOK;
+ frm.Dispose();
+ return isOk;
+ }
+
///
/// 确认信息提示框
///