예제 #1
0
        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;
        }
예제 #2
0
 public static DialogResult Show(string text, string caption, MessageBoxButtons buttons = MessageBoxButtons.OK)
 {
     using (MyMessageBox messageBox = new MyMessageBox(text, caption, buttons))
     {
         return messageBox.ShowDialog();
     }
 }