Exemplo n.º 1
0
 public static DialogResult QueryWithCancel(string message, string title, MessageBoxIcon icon = MessageBoxIcon.Question)
 {
     MessageDisplay dlg = new MessageDisplay(message, title, icon);
     dlg._query = true;
     dlg._cancel = true;
     return dlg.ShowDialog();
 }
Exemplo n.º 2
0
 public static DialogResult QueryWithCancelAndAbort(string message, string title, bool showForAll = false, MessageBoxIcon icon = MessageBoxIcon.Question)
 {
     MessageDisplay dlg = new MessageDisplay(message, title, icon);
     dlg._query = true;
     dlg._cancel = true;
     dlg._abort = true;
     dlg._forAll = showForAll;
     return dlg.ShowDialog();
 }
Exemplo n.º 3
0
        public static void ShowAboutBox()
        {
            string msgFmt = "{0}\n{1}\n{2}\n";
            string caption = Translator.Translate("TXT_ABOUT", Translator.Translate("TXT_APP_NAME"));
            string message = string.Format(msgFmt,
                Translator.Translate("TXT_APP_NAME"),
                Translator.Translate("TXT_VERSION", AssemblyInfo.GetVersionNumber(Assembly.GetEntryAssembly())),
                AssemblyInfo.GetCopyright(Assembly.GetEntryAssembly()));

            MessageDisplay dlg = new MessageDisplay(message, caption, MessageBoxIcon.None);
            dlg._isAboutBox = true;
            dlg.ShowDialog();
        }
Exemplo n.º 4
0
        public static DialogResult QueryEx(string message, string title, string additional, ref bool addCheck, MessageBoxIcon icon = MessageBoxIcon.Question)
        {
            MessageDisplay dlg = new MessageDisplay(message, title, icon);
            dlg._query = true;
            dlg.chkAdditionalCheck.Visible = true;
            dlg.chkAdditionalCheck.Text = additional;

            try
            {
                return dlg.ShowDialog();
            }
            finally
            {
                addCheck = (dlg.chkAdditionalCheck.Checked);
            }
        }