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();
 }
        public static DialogResult Query(string message, string title, MessageBoxIcon icon = MessageBoxIcon.Question)
        {
            MessageDisplay dlg = new MessageDisplay(message, title, icon);

            dlg._query = true;
            return(dlg.ShowDialog());
        }
Exemplo n.º 3
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();
 }
        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.º 5
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.º 6
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);
            }
        }
        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);
            }
        }
        public static void ShowAboutBox()
        {
            Assembly thisAssembly = Assembly.GetEntryAssembly();

            string msgFmt          = "{0}\n{1}\n{2}\n";
            string caption         = Translator.Translate("TXT_ABOUT", Translator.TranslatedAppName);
            string copyrightNotice = AssemblyInfo.GetCopyright(Assembly.GetEntryAssembly());

            DateTime?buildDate = ApplicationInfo.BuildDateTime;

            string message = string.Format(msgFmt,
                                           Translator.TranslatedAppName,
                                           Translator.Translate("TXT_VERSION", AssemblyInfo.GetVersionNumber(thisAssembly)),
                                           buildDate.HasValue ?
                                           $"{copyrightNotice}, 2005-{buildDate.Value.Year}" :
                                           copyrightNotice);

            MessageDisplay dlg = new MessageDisplay(message, caption, MessageBoxIcon.None);

            dlg._isAboutBox = true;
            dlg.ShowDialog();
        }