Exemple #1
0
 /// <summary>
 /// Displays a task dialog in front of the specified window and with the specified title, intruction, content, title, buttons and icon..
 /// </summary>
 /// <param name="owner">A window that will own the modal dialog box.</param>
 /// <param name="windowTitle">The text to display in the title bar of the task dialog.</param>
 /// <param name="mainInstruction">The instruction to display in the task dialog.</param>
 /// <param name="content">The text to display in the task dialog.</param>
 /// <param name="commonButtons">One of the TaskDialogCommonButtons values that specifies which buttons to display in the task dialog.</param>
 /// <param name="icon">One of the TaskDialogIcon values that specifies which icon to display in the task dialog.</param>
 /// <returns>One of the TaskDialogResult values.</returns>
 public static TaskDialogResult Show(Window owner, string windowTitle, string mainInstruction, string content, TaskDialogCommonButtons commonButtons, TaskDialogIcon icon)
 {
     TaskDialogWindow td = new TaskDialogWindow(null, true) { Owner = owner, WindowTitle = windowTitle, MainIcon = icon, MainInstruction = mainInstruction, ContentText = content, CommonButtons = commonButtons };
     td.DefaultButton = TaskDialogHelpers.GetFirstButton(commonButtons);
     td.UseCommandLinks = true;
     td.ShowDialog();
     return (TaskDialogResult)td.Tag;
 }
Exemple #2
0
 /// <summary>
 /// Displays a task dialog in front of the specified window and with the specified text, title, buttons, and icon.
 /// </summary>
 /// <param name="owner">A window that will own the modal dialog box.</param>
 /// <param name="text">The text to display in the task dialog.</param>
 /// <param name="title">The text to display in the title bar of the task dialog.</param>
 /// <param name="buttons">One of the TaskDialogCommonButtons values that specifies which buttons to display in the task dialog.</param>
 /// <param name="icon">One of the TaskDialogIcon values that specifies which icon to display in the task dialog.</param>
 /// <returns>One of the TaskDialogResult values.</returns>
 public static TaskDialogResult Show(Window owner, string text, string title, TaskDialogCommonButtons buttons, TaskDialogIcon icon)
 {
     return Show(owner, text, title, buttons, icon, TaskDialogHelpers.GetFirstButton(buttons));
 }
Exemple #3
0
 /// <summary>
 /// Displays a task dialog with specified text, title, buttons, and icon.
 /// </summary>
 /// <param name="text">The text to display in the task dialog.</param>
 /// <param name="title">The text to display in the title bar of the task dialog.</param>
 /// <param name="buttons">One of the TaskDialogCommonButtons values that specifies which buttons to display in the task dialog.</param>
 /// <param name="icon">One of the TaskDialogIcon values that specifies which icon to display in the task dialog.</param>
 /// <returns>One of the TaskDialogResult values.</returns>
 public static TaskDialogResult Show(string text, string title, TaskDialogCommonButtons buttons, TaskDialogIcon icon)
 {
     return(Show(DefaultOwnerWindow, text, title, buttons, icon, TaskDialogHelpers.GetFirstButton(buttons)));
 }