Example #1
0
 public static DialogResult MessageBox(string title,
                                       string mainInstruction,
                                       string content,
                                       ETaskDialogButtons buttons,
                                       ESysIcons mainIcon)
 {
     return(MessageBox(null, title, mainInstruction, content, "", "", "", buttons, mainIcon,
                       ESysIcons.Information));
 }
Example #2
0
 //--------------------------------------------------------------------------------
 // Overloaded versions...
 //--------------------------------------------------------------------------------
 public static DialogResult MessageBox(string title,
     string mainInstruction,
     string content,
     string expandedInfo,
     string footer,
     string verificationText,
     ETaskDialogButtons buttons,
     ESysIcons mainIcon,
     ESysIcons footerIcon)
 {
     return ShowTaskDialogBox(null, title, mainInstruction, content, expandedInfo, footer, verificationText, "",
         "", buttons, mainIcon, footerIcon);
 }
Example #3
0
 //--------------------------------------------------------------------------------
 // Overloaded versions...
 //--------------------------------------------------------------------------------
 public static DialogResult MessageBox(string title,
                                       string mainInstruction,
                                       string content,
                                       string expandedInfo,
                                       string footer,
                                       string verificationText,
                                       ETaskDialogButtons buttons,
                                       ESysIcons mainIcon,
                                       ESysIcons footerIcon)
 {
     return(ShowTaskDialogBox(null, title, mainInstruction, content, expandedInfo, footer, verificationText, "",
                              "", buttons, mainIcon, footerIcon));
 }
Example #4
0
 //--------------------------------------------------------------------------------
 // Overloaded versions...
 //--------------------------------------------------------------------------------
 public static DialogResult ShowTaskDialogBox(IWin32Window owner,
                                              string title,
                                              string mainInstruction,
                                              string content,
                                              string expandedInfo,
                                              string footer,
                                              string verificationText,
                                              string radioButtons,
                                              string commandButtons,
                                              ETaskDialogButtons buttons,
                                              ESysIcons mainIcon,
                                              ESysIcons footerIcon)
 {
     return(ShowTaskDialogBox(owner, title, mainInstruction, content, expandedInfo, footer, verificationText,
                              radioButtons, commandButtons, buttons, mainIcon, footerIcon, 0));
 }
Example #5
0
        //--------------------------------------------------------------------------------

        //--------------------------------------------------------------------------------

        #region ShowTaskDialogBox

        //--------------------------------------------------------------------------------
        public static DialogResult ShowTaskDialogBox(IWin32Window owner,
                                                     string title,
                                                     string mainInstruction,
                                                     string content,
                                                     string expandedInfo,
                                                     string footer,
                                                     string verificationText,
                                                     string radioButtons,
                                                     string commandButtons,
                                                     ETaskDialogButtons buttons,
                                                     ESysIcons mainIcon,
                                                     ESysIcons footerIcon,
                                                     int defaultIndex)

        {
            DialogResult result;

            OnTaskDialogShown?.Invoke(null, EventArgs.Empty);

            using (var td = new frmTaskDialog())
            {
                var display = new DisplayProperties();
                td.Title              = title;
                td.MainInstruction    = mainInstruction;
                td.Content            = content;
                td.ExpandedInfo       = expandedInfo;
                td.Footer             = footer;
                td.RadioButtons       = radioButtons;
                td.CommandButtons     = commandButtons;
                td.Buttons            = buttons;
                td.MainIcon           = mainIcon;
                td.FooterIcon         = footerIcon;
                td.VerificationText   = verificationText;
                td.Width              = display.ScaleWidth(EmulatedFormWidth);
                td.DefaultButtonIndex = defaultIndex;
                td.BuildForm();
                result = td.ShowDialog(owner);

                RadioButtonResult   = td.RadioButtonIndex;
                CommandButtonResult = td.CommandButtonClickedIndex;
                VerificationChecked = td.VerificationCheckBoxChecked;
            }

            OnTaskDialogClosed?.Invoke(null, EventArgs.Empty);
            return(result);
        }
Example #6
0
 public static DialogResult MessageBox(string title,
     string mainInstruction,
     string content,
     ETaskDialogButtons buttons,
     ESysIcons mainIcon)
 {
     return MessageBox(null, title, mainInstruction, content, "", "", "", buttons, mainIcon,
         ESysIcons.Information);
 }
Example #7
0
 //--------------------------------------------------------------------------------
 // Overloaded versions...
 //--------------------------------------------------------------------------------
 public static DialogResult ShowTaskDialogBox(IWin32Window owner,
     string title,
     string mainInstruction,
     string content,
     string expandedInfo,
     string footer,
     string verificationText,
     string radioButtons,
     string commandButtons,
     ETaskDialogButtons buttons,
     ESysIcons mainIcon,
     ESysIcons footerIcon)
 {
     return ShowTaskDialogBox(owner, title, mainInstruction, content, expandedInfo, footer, verificationText,
         radioButtons, commandButtons, buttons, mainIcon, footerIcon, 0);
 }
Example #8
0
        //--------------------------------------------------------------------------------
        public static DialogResult ShowTaskDialogBox(IWin32Window owner,
            string title,
            string mainInstruction,
            string content,
            string expandedInfo,
            string footer,
            string verificationText,
            string radioButtons,
            string commandButtons,
            ETaskDialogButtons buttons,
            ESysIcons mainIcon,
            ESysIcons footerIcon,
            int defaultIndex)
        {
            DialogResult result;
            OnTaskDialogShown?.Invoke(null, EventArgs.Empty);

            using (var td = new frmTaskDialog())
            {
                td.Title = title;
                td.MainInstruction = mainInstruction;
                td.Content = content;
                td.ExpandedInfo = expandedInfo;
                td.Footer = footer;
                td.RadioButtons = radioButtons;
                td.CommandButtons = commandButtons;
                td.Buttons = buttons;
                td.MainIcon = mainIcon;
                td.FooterIcon = footerIcon;
                td.VerificationText = verificationText;
                td.Width = EmulatedFormWidth;
                td.DefaultButtonIndex = defaultIndex;
                td.BuildForm();
                result = td.ShowDialog(owner);

                RadioButtonResult = td.RadioButtonIndex;
                CommandButtonResult = td.CommandButtonClickedIndex;
                VerificationChecked = td.VerificationCheckBoxChecked;
            }

            OnTaskDialogClosed?.Invoke(null, EventArgs.Empty);
            return result;
        }