using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; namespace CommonUtils.Msgbox { public class WinMessageBox { public static void Show(string text) { MessageBox.Show(text, "提示", MessageBoxButton.OK, MessageBoxImage.Information); } public static void Warning(string text) { MessageBox.Show(text, "预警", MessageBoxButton.OK, MessageBoxImage.Warning); } public static void Error(string text) { MessageBox.Show(text, "异常", MessageBoxButton.OK, MessageBoxImage.Error); } public static bool Question(string text) { return MessageBox.Show(text, "确认", MessageBoxButton.OKCancel, MessageBoxImage.Question) == MessageBoxResult.OK; } } }