Exemple #1
0
        /// <summary>
        /// Displays a task dialog with the given configuration options.
        /// </summary>
        /// <param name="options">
        /// A <see cref="T:Macad.Presentation.TaskDialogOptions"/> that specifies the
        /// configuration options for the dialog.
        /// </param>
        /// <returns>
        /// A <see cref="T:Macad.Presentation.TaskDialogResult"/> value that specifies
        /// which button is clicked by the user.
        /// </returns>
        public static TaskDialogResult Show(TaskDialogOptions options)
        {
            TaskDialogResult result = null;

            // Make a copy since we'll let Showing event possibly modify them
            TaskDialogOptions configOptions = options;

            OnShowing(new TaskDialogShowingEventArgs(ref configOptions));

            result = ShowTaskDialog(configOptions);

            OnClosed(new TaskDialogClosedEventArgs(result));

            return(result);
        }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TaskDialogClosedEventArgs"/> class.
 /// </summary>
 /// <param name="result">The result of the TaskDialog.</param>
 internal TaskDialogClosedEventArgs(TaskDialogResult result)
 {
     Result = result;
 }