public static void MessageBoxError(Form parent, string message) { Forms.WindowMessage dlg = new Forms.WindowMessage(); dlg.Kind = Forms.WindowMessage.MessageKind.Error; dlg.Body = message; dlg.ShowDialog(parent); }
public static void MessageBoxInfo(Form parent, string message) { Forms.WindowMessage dlg = new Forms.WindowMessage(); dlg.Kind = Forms.WindowMessage.MessageKind.Info; dlg.Body = message; dlg.ShowDialog(parent); //MessageBox.Show(parent, message, Constants.Name, MessageBoxButtons.OK, MessageBoxIcon.Information); }
public static bool MessageBoxAskYesNo(Form parent, string message) { Forms.WindowMessage dlg = new Forms.WindowMessage(); dlg.Kind = Forms.WindowMessage.MessageKind.YesNo; dlg.Body = message; dlg.ShowDialog(parent); return(dlg.YesNoAnswer); //return (MessageBox.Show(parent, message, Constants.Name, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes); }