using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using DevExpress.XtraEditors; namespace DxHelper { public static class MsgBoxHelper { public static void ShowInfo(string msg) { XtraMessageBox.Show(msg,"提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } public static void ShowWarning(string msg) { XtraMessageBox.Show(msg, "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); } public static void ShowError(string msg) { XtraMessageBox.Show(msg, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); } /// /// 显示确认消息(是=true,否=false) /// /// /// public static bool ShowConfirm(string msg) { var result = XtraMessageBox.Show(msg, "确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question); return result == DialogResult.Yes; } } }