/// <summary> /// SHows the message box. /// </summary> /// <param name="p_ctlParent">The parent of the message box.</param> /// <param name="p_strMessage">The message to display.</param> /// <param name="p_strCaption">The windows title.</param> /// <param name="p_mbbButtons">The buttons to display.</param> /// <param name="p_mbiIcon">The icon to display.</param> /// <param name="p_booRemember">Indicates whether the selected button should be remembered.</param> public static DialogResult Show(Control p_ctlParent, string p_strMessage, string p_strCaption, MessageBoxButtons p_mbbButtons, MessageBoxIcon p_mbiIcon, out bool p_booRemember) { RememberSelectionMessageBox mbxBox = new RememberSelectionMessageBox(); mbxBox.Init(p_strMessage, p_strCaption, p_mbbButtons, p_mbiIcon); DialogResult drsResult = DialogResult.OK; if (p_ctlParent == null) { mbxBox.StartPosition = FormStartPosition.CenterScreen; drsResult = mbxBox.ShowDialog(); } else drsResult = mbxBox.ShowDialog(p_ctlParent); p_booRemember = mbxBox.RememberSelection; return drsResult; }
/// <summary> /// SHows the message box. /// </summary> /// <param name="p_ctlParent">The parent of the message box.</param> /// <param name="p_strMessage">The message to display.</param> /// <param name="p_strCaption">The windows title.</param> /// <param name="p_mbbButtons">The buttons to display.</param> /// <param name="p_mbiIcon">The icon to display.</param> /// <param name="p_booRemember">Indicates whether the selected button should be remembered.</param> public static DialogResult Show(Control p_ctlParent, string p_strMessage, string p_strCaption, MessageBoxButtons p_mbbButtons, MessageBoxIcon p_mbiIcon, out bool p_booRemember) { var mbxBox = new RememberSelectionMessageBox(); mbxBox.Init(p_strMessage, p_strCaption, p_mbbButtons, p_mbiIcon); DialogResult drsResult; if (p_ctlParent == null) { mbxBox.StartPosition = FormStartPosition.CenterScreen; drsResult = mbxBox.ShowDialog(); } else { drsResult = mbxBox.ShowDialog(p_ctlParent); } p_booRemember = mbxBox.RememberSelection; return(drsResult); }