1 type derived from TaskDialogButton
System.Windows.Forms (1)
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogCommandLinkButton.cs (1)
9
public sealed class TaskDialogCommandLinkButton :
TaskDialogButton
16 instantiations of TaskDialogButton
System.Windows.Forms (13)
System\Windows\Forms\Dialogs\TaskDialog\TaskDialog.cs (1)
297
return new
TaskDialogButton
(result)
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogButton.cs (11)
89
public static TaskDialogButton OK =>
new
(TaskDialogResult.OK);
102
public static TaskDialogButton Cancel =>
new
(TaskDialogResult.Cancel);
107
public static TaskDialogButton Abort =>
new
(TaskDialogResult.Abort);
112
public static TaskDialogButton Retry =>
new
(TaskDialogResult.Retry);
117
public static TaskDialogButton Ignore =>
new
(TaskDialogResult.Ignore);
122
public static TaskDialogButton Yes =>
new
(TaskDialogResult.Yes);
127
public static TaskDialogButton No =>
new
(TaskDialogResult.No);
132
public static TaskDialogButton Close =>
new
(TaskDialogResult.Close);
143
public static TaskDialogButton Help =>
new
(TaskDialogResult.Help);
148
public static TaskDialogButton TryAgain =>
new
(TaskDialogResult.TryAgain);
153
public static TaskDialogButton Continue =>
new
(TaskDialogResult.Continue);
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogButtonCollection.cs (1)
39
TaskDialogButton button =
new
(text, enabled, allowCloseDialog);
WinFormsControlsTest (3)
TaskDialogSamples.cs (3)
128
TaskDialogButton btnSave =
new
("&Save");
129
TaskDialogButton btnDontSave =
new
("Do&n't save");
197
TaskDialogButton reconnectButton =
new
("&Reconnect now");
135 references to TaskDialogButton
Accessibility_Core_App (6)
TaskDialogTesting.cs (6)
30
var
buttonOK =
TaskDialogButton
.OK;
31
var
buttonHelp =
TaskDialogButton
.Help;
70
TaskDialogButton
.Close
88
var
dialogResult = TaskDialog.ShowDialog(page1);
System.Windows.Forms (91)
System\Windows\Forms\Dialogs\TaskDialog\TaskDialog.cs (25)
155
private (
TaskDialogButton
button, int buttonID)? _resultButton;
283
private static bool IsTaskDialogButtonCommitting(
TaskDialogButton
? button)
295
private static
TaskDialogButton
CreatePlaceholderButton(TaskDialogResult result)
319
/// The <see cref="
TaskDialogButton
"/> which was clicked by the user to close the dialog.
328
public static Task<
TaskDialogButton
> ShowDialogAsync(
352
/// The <see cref="
TaskDialogButton
"/> which was clicked by the user to close the dialog.
361
public static Task<
TaskDialogButton
> ShowDialogAsync(
386
/// The <see cref="
TaskDialogButton
"/> which was clicked by the user to close the dialog.
395
public static async Task<
TaskDialogButton
> ShowDialogAsync(
402
var completion = new TaskCompletionSource<
TaskDialogButton
>();
416
TaskDialogButton
result;
451
/// The <see cref="
TaskDialogButton
"/> which was clicked by the user to close the dialog.
459
public static
TaskDialogButton
ShowDialog(
481
/// The <see cref="
TaskDialogButton
"/> which was clicked by the user to close the dialog.
491
public static
TaskDialogButton
ShowDialog(
517
/// The <see cref="
TaskDialogButton
"/> which was clicked by the user to close the dialog.
525
public static unsafe
TaskDialogButton
ShowDialog(
546
/// The <see cref="
TaskDialogButton
"/> which was clicked by the user to close the dialog.
548
private unsafe
TaskDialogButton
ShowDialogInternal(
702
/// Closes the shown task dialog with <see cref="
TaskDialogButton
.Cancel"/> as resulting button.
707
/// <see cref="
TaskDialogButton
.PerformClick"/> method of the
708
/// <see cref="
TaskDialogButton
"/> that you want to set as a result.
712
/// navigation to complete, whereas <see cref="
TaskDialogButton
.PerformClick"/>
714
/// <see cref="
TaskDialogButton
.Click"/> event won't be raised.
1053
TaskDialogButton
? button = _boundPage.GetBoundButtonByID(buttonID);
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogButton.cs (32)
15
/// <see cref="
TaskDialogButton
"/> instances retrieved by static getters like <see cref="OK"/> are
55
/// Initializes a new instance of the <see cref="
TaskDialogButton
"/> class.
63
/// Initializes a new instance of the <see cref="
TaskDialogButton
"/> class
87
/// Gets a standard <see cref="
TaskDialogButton
"/> instance representing the "OK" button.
89
public static
TaskDialogButton
OK => new(TaskDialogResult.OK);
92
/// Gets a standard <see cref="
TaskDialogButton
"/> instance representing the "Cancel" button.
102
public static
TaskDialogButton
Cancel => new(TaskDialogResult.Cancel);
105
/// Gets a standard <see cref="
TaskDialogButton
"/> instance representing the "Abort" button.
107
public static
TaskDialogButton
Abort => new(TaskDialogResult.Abort);
110
/// Gets a standard <see cref="
TaskDialogButton
"/> instance representing the "Retry" button.
112
public static
TaskDialogButton
Retry => new(TaskDialogResult.Retry);
115
/// Gets a standard <see cref="
TaskDialogButton
"/> instance representing the "Ignore" button.
117
public static
TaskDialogButton
Ignore => new(TaskDialogResult.Ignore);
120
/// Gets a standard <see cref="
TaskDialogButton
"/> instance representing the "Yes" button.
122
public static
TaskDialogButton
Yes => new(TaskDialogResult.Yes);
125
/// Gets a standard <see cref="
TaskDialogButton
"/> instance representing the "No" button.
127
public static
TaskDialogButton
No => new(TaskDialogResult.No);
130
/// Gets a standard <see cref="
TaskDialogButton
"/> instance representing the "Close" button.
132
public static
TaskDialogButton
Close => new(TaskDialogResult.Close);
135
/// Gets a standard <see cref="
TaskDialogButton
"/> instance representing the "Help" button.
143
public static
TaskDialogButton
Help => new(TaskDialogResult.Help);
146
/// Gets a standard <see cref="
TaskDialogButton
"/> instance representing the "Try Again" button.
148
public static
TaskDialogButton
TryAgain => new(TaskDialogResult.TryAgain);
151
/// Gets a standard <see cref="
TaskDialogButton
"/> instance representing the "Continue" button.
153
public static
TaskDialogButton
Continue => new(TaskDialogResult.Continue);
231
/// <see cref="
TaskDialogButton
"/> should be shown when displaying
304
public static bool operator ==(
TaskDialogButton
? b1,
TaskDialogButton
? b2)
309
public static bool operator !=(
TaskDialogButton
? b1,
TaskDialogButton
? b2)
355
if (IsStandardButton && obj is
TaskDialogButton
otherButton && otherButton.IsStandardButton)
372
/// Returns a string that represents the current <see cref="
TaskDialogButton
"/> control.
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogButtonCollection.cs (13)
9
/// Represents a collection of <see cref="
TaskDialogButton
"/> objects.
11
public class TaskDialogButtonCollection : Collection<
TaskDialogButton
>
14
private readonly HashSet<
TaskDialogButton
> _itemSet = [];
26
/// Creates and adds a <see cref="
TaskDialogButton
"/> to the collection.
33
/// <returns>The created <see cref="
TaskDialogButton
"/>.</returns>
37
public
TaskDialogButton
Add(string? text, bool enabled = true, bool allowCloseDialog = true)
39
TaskDialogButton
button = new(text, enabled, allowCloseDialog);
57
protected override void SetItem(int index,
TaskDialogButton
item)
66
TaskDialogButton
oldItem = this[index];
97
protected override void InsertItem(int index,
TaskDialogButton
item)
125
TaskDialogButton
oldItem = this[index];
141
foreach (
TaskDialogButton
button in this)
150
private void DenyIfHasOtherCollection(
TaskDialogButton
item)
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogCommandLinkButton.cs (3)
14
/// Initializes a new instance of the <see cref="
TaskDialogButton
"/> class.
21
/// Initializes a new instance of the <see cref="
TaskDialogButton
"/> class
26
/// An additional description text that will be displayed in a separate line when the <see cref="
TaskDialogButton
"/>s
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogPage.cs (18)
56
private
TaskDialogButton
[]? _boundCustomButtons;
57
private Dictionary<int,
TaskDialogButton
>? _boundStandardButtonsByID;
96
/// user clicks the <see cref="
TaskDialogButton
.Help"/> button.
144
public
TaskDialogButton
? DefaultButton { get; set; }
425
/// <see cref="
TaskDialogButton
.Cancel"/> as resulting button by pressing ESC or Alt+F4
426
/// or by clicking the title bar's close button, even if a <see cref="
TaskDialogButton
.Cancel"/>
436
/// button by adding the <see cref="
TaskDialogButton
.Cancel"/> button that has its
437
/// <see cref="
TaskDialogButton
.Visible"/> property set to <see langword="false"/>.
705
internal
TaskDialogButton
? GetBoundButtonByID(int buttonID)
727
_boundStandardButtonsByID!.TryGetValue(buttonID, out
TaskDialogButton
? button);
795
foreach (
TaskDialogButton
button in _buttons)
872
_boundStandardButtonsByID = new Dictionary<int,
TaskDialogButton
>(
874
.Select(e => new KeyValuePair<int,
TaskDialogButton
>(e.ButtonID, e)));
879
foreach (
TaskDialogButton
standardButton in _boundStandardButtonsByID.Values)
891
TaskDialogButton
customButton = _boundCustomButtons[i];
899
TaskDialogButton
defaultButton = buttons[buttons.IndexOf(DefaultButton)];
975
foreach (
TaskDialogButton
button in buttons)
1023
foreach (
TaskDialogButton
button in buttons)
WinFormsControlsTest (38)
TaskDialogSamples.cs (38)
71
TaskDialogButton
result = TaskDialog.ShowDialog(this, new TaskDialogPage()
78
TaskDialogButton
.Yes,
79
TaskDialogButton
.No
82
DefaultButton =
TaskDialogButton
.No
85
if (result ==
TaskDialogButton
.Yes)
106
TaskDialogButton
.Yes,
107
TaskDialogButton
.No
110
DefaultButton =
TaskDialogButton
.No
113
var
resultButton = TaskDialog.ShowDialog(this, page);
115
if (resultButton ==
TaskDialogButton
.Yes)
127
TaskDialogButton
btnCancel =
TaskDialogButton
.Cancel;
128
TaskDialogButton
btnSave = new("&Save");
129
TaskDialogButton
btnDontSave = new("Do&n't save");
144
TaskDialogButton
result = TaskDialog.ShowDialog(this, page);
185
TaskDialogButton
result = TaskDialog.ShowDialog(this, page);
197
TaskDialogButton
reconnectButton = new("&Reconnect now");
198
var
cancelButton =
TaskDialogButton
.Cancel;
243
TaskDialogButton
result = TaskDialog.ShowDialog(this, page);
254
var
initialButtonYes =
TaskDialogButton
.Yes;
275
TaskDialogButton
.No,
278
DefaultButton =
TaskDialogButton
.No
284
var
inProgressCloseButton =
TaskDialogButton
.Close;
315
var
invisibleCancelButton =
TaskDialogButton
.Cancel;
329
TaskDialogButton
.Close
333
TaskDialogButton
showResultsButton = new TaskDialogCommandLinkButton("Show &Results");
388
TaskDialogButton
result = TaskDialog.ShowDialog(initialPage);
423
TaskDialogButton
.Close
480
var
buttonOK =
TaskDialogButton
.OK;
481
var
buttonHelp =
TaskDialogButton
.Help;
520
TaskDialogButton
.Close
538
var
dialogResult = TaskDialog.ShowDialog(page1);