public static void Show(string message, string caption, CustomMessageBoxType type, bool topMost = true) { _instance = new TopmostMessageBox(); _instance.Closed += InstanceClosed; _instance.BaseShow(message, caption, type, topMost); }
public static void Show(string message, CustomMessageBoxType type) { _instance = new TopmostMessageBox(); _instance.Closed += InstanceClosed; _instance.BaseShow(message, string.Empty, type, true); }
public static void Show(string message, bool topMost = true) { _instance = new TopmostMessageBox(); _instance.Closed += InstanceClosed; _instance.BaseShow(message, string.Empty, CustomMessageBoxType.OK, topMost); }
public static CustomMessageBoxResult ShowDialog(string message, string caption, CustomMessageBoxType type, bool topMost = true) { if (_instance == null) { _instance = new TopmostMessageBox(); _instance.Closed += InstanceClosed; } return(_instance.BaseShowDialog(message, caption, type, topMost)); }
public static CustomMessageBoxResult ShowDialog(string message, CustomMessageBoxType type) { if (_instance == null) { _instance = new TopmostMessageBox(); _instance.Closed += InstanceClosed; } return(_instance.BaseShowDialog(message, string.Empty, type, true)); }
private static void InstanceClosed(object sender, EventArgs e) { _instance = null; }