ComponentFactory.Krypton.Toolkit.KryptonTaskDialog.ShowDialog C# (CSharp) Method

ShowDialog() public method

Shows the task dialog as a modal dialog box with the currently active window set as its owner.
public ShowDialog ( ) : DialogResult
return DialogResult
        public DialogResult ShowDialog()
        {
            return ShowDialog(Control.FromHandle(PI.GetActiveWindow()));
        }

Same methods

KryptonTaskDialog::ShowDialog ( IWin32Window owner ) : DialogResult

Usage Example

Esempio n. 1
0
        /// <summary>
        /// Show a task dialog using the specified values as content.
        /// </summary>
        /// <param name="windowTitle">Caption of the window.</param>
        /// <param name="mainInstruction">Principal text.</param>
        /// <param name="content">Extra text.</param>
        /// <param name="icon">Predefined icon.</param>
        /// <param name="commonButtons">Common buttons.</param>
        /// <returns>One of the DialogResult values.</returns>
        public static DialogResult Show(string windowTitle,
                                        string mainInstruction,
                                        string content,
                                        MessageBoxIcon icon,
                                        TaskDialogButtons commonButtons)
        {
            // Create a temporary task dialog for storing definition whilst showing
            using (KryptonTaskDialog taskDialog = new KryptonTaskDialog())
            {
                // Store incoming values
                taskDialog.WindowTitle     = windowTitle;
                taskDialog.MainInstruction = mainInstruction;
                taskDialog.Content         = content;
                taskDialog.Icon            = icon;
                taskDialog.CommonButtons   = commonButtons;

                // Show as a modal dialog
                return(taskDialog.ShowDialog());
            }
        }
All Usage Examples Of ComponentFactory.Krypton.Toolkit.KryptonTaskDialog::ShowDialog