private static bool IsUploadConfirmed(int length) { if (Program.Settings.ShowMultiUploadWarning) { using (MyMessageBox msgbox = new MyMessageBox("Are you sure you want to upload " + length + " files?", "ShareX - Upload files", MessageBoxButtons.YesNo, "Don't show this message again.")) { msgbox.ShowDialog(); Program.Settings.ShowMultiUploadWarning = !msgbox.IsChecked; return msgbox.DialogResult == DialogResult.Yes; } } return true; }
public static DialogResult Show(string text, string caption, MessageBoxButtons buttons = MessageBoxButtons.OK) { using (MyMessageBox messageBox = new MyMessageBox(text, caption, buttons)) { return messageBox.ShowDialog(); } }