TBMM/GCMM/DialogUtils.cs

19 lines
No EOL
776 B
C#

using System.Windows.Forms;
namespace GCMM
{
public static class DialogUtils
{
public static void ShowInfo(string message, string title) =>
MessageBox.Show(message, title, MessageBoxButtons.OK, MessageBoxIcon.Information);
public static void ShowError(string message, string title) =>
MessageBox.Show(message, title, MessageBoxButtons.OK, MessageBoxIcon.Error);
public static void ShowWarning(string message, string title) =>
MessageBox.Show(message, title, MessageBoxButtons.OK, MessageBoxIcon.Warning);
public static bool ShowYesNoQuestion(string message, string title) =>
MessageBox.Show(message, title, MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes;
}
}