using DevExpress.XtraBars.Alerter;
using DevExpress.XtraEditors;
using System.Drawing;
using System.Windows.Forms;
namespace CompressorXN.Untils
{
public class CustomMessageBoxHelper
{
///
/// 系统弹框
///
///
///
///
///
public static DialogResult XtraMessageBoxShow(string text = "操作成功", MessageBoxButtons messageBoxButtons = MessageBoxButtons.OK, string caption = "系统提示", MessageBoxIcon messageBoxIcon = MessageBoxIcon.Warning)
{
return XtraMessageBox.Show(text, caption, messageBoxButtons, messageBoxIcon);
}
///
/// 右下角提醒(异步时,使用 :【BeginInvoke(new Action(() =>{}));】方式调用)
///
/// 所属窗体
/// 标题
/// 内容
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);
}
}
}