public (bool Result, bool doNotAskAgain) YesNoMessageBox(string text, string caption, MessageBoxType messageBoxType = MessageBoxType.Info, string doNotAskAgainText = null) { var result = YesNoForm.ShowDialog(text, caption, doNotAskAgainText); return(result.dialogResult == DialogResult.Yes, result.doNotAskAgain); }
internal static (DialogResult dialogResult, bool doNotAskAgain) ShowDialog(string text, string caption, string doNotAskAgainText) { using (var f = new YesNoForm()) { f.label_text.Text = text; f.Text = $"Collection Manager - {caption}"; f.checkBox_doNotAskAgain.Text = doNotAskAgainText; return(f.ShowDialog(), f.DoNotAskAgain); } }