Esempio n. 1
0
 public static TaskDialogResult CommandBox(string title, string message, string detail, string commandButtons,
                                           bool showCancelButton, string verificationText, TaskDialogIcon mainIcon, string help,
                                           DialogResponseHandler handler)
 {
     return(CommandBox(title, message, detail, null, help, verificationText, commandButtons, showCancelButton,
                       mainIcon, TaskDialogIcon.Information, handler));
 }
Esempio n. 2
0
 public DialogResult CommandBox(string title, string mainInstruction, string content, string expandedInfo,
                                string help, string verificationText, string commandButtons,
                                bool showCancelButton, SysIcons mainIcon, SysIcons footerIcon,
                                DialogResponseHandler handler)
 {
     return(DialogResult.None);
 }
Esempio n. 3
0
        public DialogResult CommandBox(string title, string mainInstruction, string content,
                                       string expandedInfo,
                                       string help,
                                       string verificationText, string commandButtons, bool showCancelButton,
                                       SysIcons mainIcon,
                                       SysIcons footerIcon, DialogResponseHandler handler)
        {
            //BringToFront();
            TaskDialog dialog = new TaskDialog();

            dialog.HelpDelegate = delegate(string url) { Utils.StartProcess(url); };
            DialogResult result = dialog.ShowCommandBox(this, title,
                                                        mainInstruction,
                                                        content,
                                                        expandedInfo,
                                                        FormatHelp(help),
                                                        verificationText,
                                                        commandButtons,
                                                        showCancelButton,
                                                        mainIcon,
                                                        footerIcon);

            handler(dialog.CommandButtonResult, dialog.VerificationChecked);
            return(result);
        }
Esempio n. 4
0
        public DialogResult MessageBox(string title, string message, string content,
                                       string expandedInfo,
                                       string help,
                                       string verificationText,
                                       DialogResponseHandler handler)
        {
            //BringToFront();
            TaskDialog dialog = new TaskDialog();

            dialog.HelpDelegate = delegate(string url) { Utils.StartProcess(url); };
            DialogResult result = dialog.MessageBox(this,
                                                    title,
                                                    message,
                                                    content,
                                                    expandedInfo,
                                                    FormatHelp(help),
                                                    verificationText,
                                                    TaskDialogButtons.OK, SysIcons.Information, SysIcons.Information);

            handler(-1, dialog.VerificationChecked);
            return(result);
        }
Esempio n. 5
0
 public DialogResult MessageBox(string title, string message, string content, string expandedInfo,
                                string help,
                                string verificationText, DialogResponseHandler handler)
 {
     return(DialogResult.None);
 }
Esempio n. 6
0
 public TaskDialogResult CommandBox(string title, string mainInstruction, string content, string expandedInfo,
                                    string help, string verificationText, string commandButtons, bool showCancelButton, TaskDialogIcon mainIcon,
                                    TaskDialogIcon footerIcon, DialogResponseHandler handler)
 {
     return(TaskDialogResult.Empty);
 }
Esempio n. 7
0
 public virtual TaskDialogResult CommandBox(string title, string mainInstruction, string content,
                                            string expandedInfo, string help, string verificationText, string commandButtons, bool showCancelButton,
                                            TaskDialogIcon mainIcon, TaskDialogIcon footerIcon, DialogResponseHandler handler)
 {
     return(Utils.CommandBox(this, title, mainInstruction, content, expandedInfo, help, verificationText,
                             commandButtons, showCancelButton, mainIcon, footerIcon, handler));
 }
Esempio n. 8
0
 public virtual TaskDialogResult MessageBox(string title, string message, string content, string expandedInfo,
                                            string help, string verificationText, DialogResponseHandler handler)
 {
     return(Utils.MessageBox(this, title, message, content, expandedInfo, help, verificationText, handler));
 }
Esempio n. 9
0
 public DialogResult CommandBox(string title, string mainInstruction, string content, string expandedInfo,
                                string help, string verificationText, string commandButtons,
                                bool showCancelButton, SysIcons mainIcon, SysIcons footerIcon,
                                DialogResponseHandler handler)
 {
     return DialogResult.None;
 }
Esempio n. 10
0
 public DialogResult MessageBox(string title, string message, string content, string expandedInfo,
                                string help,
                                string verificationText, DialogResponseHandler handler)
 {
     return DialogResult.None;
 }
Esempio n. 11
0
        public static TaskDialogResult MessageBox(IWin32Window owner, string title, string message, string content,
                                                  string expandedInfo, string help, string verificationText, DialogResponseHandler handler)
        {
            TaskDialogResult result = TaskDialog.Show(
                owner: owner?.Handle ?? IntPtr.Zero,
                title: title,
                mainInstruction: message,
                content: content,
                footerText: FormatHelp(help),
                expandedInfo: expandedInfo,
                verificationText: verificationText,
                commonButtons: TaskDialogCommonButtons.OK,
                mainIcon: TaskDialogIcon.Information,
                callback: (dialog, args, callbackData) =>
            {
                switch (args.Notification)
                {
                case TaskDialogNotification.HyperlinkClicked:
                    BrowserLauncherFactory.get().open(args.Hyperlink);
                    return(true);
                }
                return(false);
            });

            handler(result.CommandButtonResult ?? -1, result.VerificationChecked ?? false);
            return(result);
        }
Esempio n. 12
0
 public DialogResult MessageBox(string title, string message, string content,
     string expandedInfo,
     string help,
     string verificationText,
     DialogResponseHandler handler)
 {
     //BringToFront();
     TaskDialog dialog = new TaskDialog();
     dialog.HelpDelegate = delegate(string url) { Utils.StartProcess(url); };
     DialogResult result = dialog.MessageBox(this,
                                             title,
                                             message,
                                             content,
                                             expandedInfo,
                                             FormatHelp(help),
                                             verificationText,
                                             TaskDialogButtons.OK, SysIcons.Information, SysIcons.Information);
     handler(-1, dialog.VerificationChecked);
     return result;
 }
Esempio n. 13
0
 public DialogResult CommandBox(string title, string mainInstruction, string content,
     string expandedInfo,
     string help,
     string verificationText, string commandButtons, bool showCancelButton,
     SysIcons mainIcon,
     SysIcons footerIcon, DialogResponseHandler handler)
 {
     //BringToFront();
     TaskDialog dialog = new TaskDialog();
     dialog.HelpDelegate = delegate(string url) { Utils.StartProcess(url); };
     DialogResult result = dialog.ShowCommandBox(this, title,
                                                 mainInstruction,
                                                 content,
                                                 expandedInfo,
                                                 FormatHelp(help),
                                                 verificationText,
                                                 commandButtons,
                                                 showCancelButton,
                                                 mainIcon,
                                                 footerIcon);
     handler(dialog.CommandButtonResult, dialog.VerificationChecked);
     return result;
 }