|
|
|
|
|
using DevExpress.XtraBars.Alerter;
|
|
|
|
|
|
using DevExpress.XtraEditors;
|
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
|
|
|
|
namespace CompressorXN.Untils
|
|
|
|
|
|
{
|
|
|
|
|
|
public class CustomMessageBoxHelper
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 系统弹框
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="text"></param>
|
|
|
|
|
|
/// <param name="caption"></param>
|
|
|
|
|
|
/// <param name="messageBoxButtons"></param>
|
|
|
|
|
|
/// <param name="messageBoxIcon"></param>
|
|
|
|
|
|
public static DialogResult XtraMessageBoxShow(string text = "操作成功", MessageBoxButtons messageBoxButtons = MessageBoxButtons.OK, string caption = "系统提示", MessageBoxIcon messageBoxIcon = MessageBoxIcon.Warning)
|
|
|
|
|
|
{
|
|
|
|
|
|
return XtraMessageBox.Show(text, caption, messageBoxButtons, messageBoxIcon);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 右下角提醒(异步时,使用 :【BeginInvoke(new Action(() =>{}));】方式调用)
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="form">所属窗体</param>
|
|
|
|
|
|
/// <param name="caption">标题</param>
|
|
|
|
|
|
/// <param name="content">内容</param>
|
|
|
|
|
|
public static void AlertShow(Form form, string content = "操作成功", string caption = "系统提示")
|
|
|
|
|
|
{
|
|
|
|
|
|
var alertControl = new AlertControl();
|
|
|
|
|
|
alertControl.AppearanceCaption.Font = new Font("Tahoma", 12F, FontStyle.Regular, GraphicsUnit.Pixel);
|
|
|
|
|
|
alertControl.AppearanceText.Font = new Font("Tahoma", 18F, FontStyle.Regular, GraphicsUnit.Pixel);
|
|
|
|
|
|
alertControl.Show(form, caption, content);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|