329 references to DialogResult
Accessibility_Core_App (1)
PrintingControls.cs (1)
77
if (printDialog1.ShowDialog() ==
DialogResult
.OK)
Microsoft.VisualBasic.Forms (1)
Microsoft\VisualBasic\Helpers\VBInputBox.vb (1)
50
MyCancelButton.DialogResult =
DialogResult
.Cancel
PresentationUI (25)
MS\Internal\Documents\Application\FilePresentation.cs (2)
54
DialogResult
dialogResult;
77
if (dialogResult ==
DialogResult
.OK)
MS\Internal\Documents\CredentialManagerDialog.Designer.cs (2)
86
this._cancelButton.DialogResult = System.Windows.Forms.
DialogResult
.Cancel;
93
this._okButton.DialogResult = System.Windows.Forms.
DialogResult
.OK;
MS\Internal\Documents\RightsManagementManager.cs (12)
255
internal
DialogResult
ShowCredentialManagementUI(bool decrypting)
257
DialogResult
result =
DialogResult
.Cancel;
312
DialogResult
result =
DialogResult
.Cancel;
318
result =
DialogResult
.OK;
329
if (result ==
DialogResult
.OK)
339
if (result == System.Windows.Forms.
DialogResult
.OK)
458
DialogResult
result =
DialogResult
.Cancel;
465
if (result !=
DialogResult
.OK)
1009
if(ShowCredentialManagementUI(decrypting) !=
DialogResult
.OK)
MS\Internal\Documents\RMEnrollmentPage1.Designer.cs (2)
188
_nextButton.DialogResult = System.Windows.Forms.
DialogResult
.OK;
197
_cancelButton.DialogResult = System.Windows.Forms.
DialogResult
.Cancel;
MS\Internal\Documents\RMEnrollmentPage2.Designer.cs (2)
75
this._nextButton.DialogResult = System.Windows.Forms.
DialogResult
.OK;
84
this._cancelButton.DialogResult = System.Windows.Forms.
DialogResult
.Cancel;
MS\Internal\Documents\RMPermissions.Designer.cs (1)
155
this.closeButton.DialogResult = System.Windows.Forms.
DialogResult
.Cancel;
MS\Internal\Documents\RMPublishingDialog.cs (2)
742
DialogResult =
DialogResult
.OK;
761
DialogResult =
DialogResult
.OK;
MS\Internal\Documents\RMPublishingDialog.Designer.cs (1)
313
this.buttonCancel.DialogResult = System.Windows.Forms.
DialogResult
.Cancel;
MS\Internal\Documents\SigningDialog.Designer.cs (1)
199
_cancelButton.DialogResult = System.Windows.Forms.
DialogResult
.Cancel;
System.Windows.Forms (96)
src\Common\src\RTLAwareMessageBox.cs (1)
16
public static
DialogResult
Show(
System\Windows\Forms\Application.ThreadContext.cs (4)
619
DialogResult
result =
DialogResult
.OK;
632
case
DialogResult
.Abort:
636
case
DialogResult
.Yes:
System\Windows\Forms\Controls\Buttons\Button.cs (3)
23
private
DialogResult
_dialogResult;
137
[DefaultValue(
DialogResult
.None)]
139
public virtual
DialogResult
DialogResult
System\Windows\Forms\Controls\Buttons\IButtonControl.cs (1)
15
DialogResult
DialogResult { get; set; }
System\Windows\Forms\Controls\Labels\LinkLabel.cs (2)
27
private
DialogResult
_dialogResult;
735
DialogResult
IButtonControl.DialogResult
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridErrorDialog.cs (2)
160
DialogResult =
DialogResult
.OK,
172
DialogResult =
DialogResult
.Cancel,
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (6)
4851
public
DialogResult
ShowDialog(Form dialog)
4878
DialogResult
result;
4948
revert = uiService.ShowDialog(ErrorDialog) ==
DialogResult
.Cancel;
4952
revert = ShowDialog(ErrorDialog) ==
DialogResult
.Cancel;
5023
revert = uiService.ShowDialog(ErrorDialog) ==
DialogResult
.Cancel;
5027
revert = ShowDialog(ErrorDialog) ==
DialogResult
.Cancel;
System\Windows\Forms\Design\ComponentEditorForm.cs (6)
142
DialogResult =
DialogResult
.OK;
146
DialogResult =
DialogResult
.Cancel;
434
public virtual
DialogResult
ShowForm()
442
public virtual
DialogResult
ShowForm(int page)
450
public virtual
DialogResult
ShowForm(IWin32Window? owner)
458
public virtual
DialogResult
ShowForm(IWin32Window? owner, int page)
System\Windows\Forms\Design\IUIService.cs (2)
44
DialogResult
ShowDialog(Form form);
75
DialogResult
ShowMessage(string message, string caption, MessageBoxButtons buttons);
System\Windows\Forms\Design\IWindowsFormsEditorService.cs (1)
60
DialogResult
ShowDialog(Form dialog);
System\Windows\Forms\Design\WindowsFormsComponentEditor.cs (1)
42
return form.ShowForm(owner, GetInitialComponentEditorPageIndex()) ==
DialogResult
.OK;
System\Windows\Forms\Dialogs\CommonDialogs\CommonDialog.cs (6)
162
public
DialogResult
ShowDialog() => ShowDialog(owner: null);
167
public
DialogResult
ShowDialog(IWin32Window? owner)
179
DialogResult
result =
DialogResult
.Cancel;
220
result = RunDialog(ownerHwnd.Handle) ?
DialogResult
.OK :
DialogResult
.Cancel;
System\Windows\Forms\Dialogs\CommonDialogs\FileDialog.cs (1)
675
==
DialogResult
.Yes;
System\Windows\Forms\Dialogs\MessageBox.cs (27)
129
public static
DialogResult
Show(
144
public static
DialogResult
Show(
160
public static
DialogResult
Show(
177
public static
DialogResult
Show(
194
public static
DialogResult
Show(
212
public static
DialogResult
Show(
229
public static
DialogResult
Show(
247
public static
DialogResult
Show(
266
public static
DialogResult
Show(
286
public static
DialogResult
Show(
300
public static
DialogResult
Show(
313
public static
DialogResult
Show(
325
public static
DialogResult
Show(string? text, string? caption, MessageBoxButtons buttons)
333
public static
DialogResult
Show(string? text, string? caption)
341
public static
DialogResult
Show(string? text)
349
public static
DialogResult
Show(
364
public static
DialogResult
Show(
378
public static
DialogResult
Show(
391
public static
DialogResult
Show(
403
public static
DialogResult
Show(IWin32Window? owner, string? text, string? caption)
411
public static
DialogResult
Show(IWin32Window? owner, string? text)
416
private static
DialogResult
ShowCore(
426
DialogResult
result =
DialogResult
.None;
440
private static
DialogResult
ShowCore(
452
return
DialogResult
.None;
483
return (
DialogResult
)PInvoke.MessageBox(handle.Handle, text, caption, style);
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (3)
264
_continueButton.DialogResult =
DialogResult
.Cancel;
268
_quitButton.DialogResult =
DialogResult
.Abort;
272
_helpButton.DialogResult =
DialogResult
.Yes;
System\Windows\Forms\Form.cs (26)
153
private
DialogResult
_dialogResult;
171
private TaskCompletionSource<
DialogResult
>? _modalFormCompletion;
719
if (value is not null && value.DialogResult ==
DialogResult
.None)
721
value.DialogResult =
DialogResult
.Cancel;
941
public
DialogResult
DialogResult
2055
if (value == Visible && _dialogResult ==
DialogResult
.OK)
2085
if (_dialogResult !=
DialogResult
.None)
3122
if (_dialogResult ==
DialogResult
.None && Visible)
3139
_dialogResult =
DialogResult
.None;
3149
if (!closingOnly && _dialogResult !=
DialogResult
.None)
3164
_dialogResult =
DialogResult
.None;
3175
return _dialogResult !=
DialogResult
.None || !Visible;
5559
public
DialogResult
ShowDialog() => ShowDialog(owner: null);
5564
public
DialogResult
ShowDialog(IWin32Window? owner)
5634
_dialogResult =
DialogResult
.None;
5671
if (_dialogResult ==
DialogResult
.None)
5759
public Task<
DialogResult
> ShowDialogAsync() => ShowDialogAsyncInternal(owner: null);
5800
public Task<
DialogResult
> ShowDialogAsync(IWin32Window owner) => ShowDialogAsyncInternal(owner);
5802
private Task<
DialogResult
> ShowDialogAsyncInternal(IWin32Window? owner)
5811
_modalFormCompletion = new TaskCompletionSource<
DialogResult
>(TaskCreationOptions.RunContinuationsAsynchronously);
5828
void ShowDialogProc(ref TaskCompletionSource<
DialogResult
> modalFormCompletion, IWin32Window? owner = default)
5832
DialogResult
result = ShowDialog(owner);
6578
if (_dialogResult ==
DialogResult
.None)
6580
_dialogResult =
DialogResult
.Cancel;
6885
if (Modal && _dialogResult ==
DialogResult
.None)
6889
DialogResult =
DialogResult
.Cancel;
System\Windows\Forms\MDI\MDIWindowDialog.cs (2)
110
_okButton.DialogResult =
DialogResult
.OK;
117
_cancelButton.DialogResult =
DialogResult
.Cancel;
System\Windows\Forms\MDI\MdiWindowListStrip.cs (2)
167
DialogResult
result = dialog.ShowDialog();
168
if (result ==
DialogResult
.OK)
System.Windows.Forms.Design (65)
src\Common\src\RTLAwareMessageBox.cs (1)
16
public static
DialogResult
Show(
System\ComponentModel\Design\BinaryEditor.BinaryUI.cs (3)
113
DialogResult
result = sfd.ShowDialog();
114
if (result ==
DialogResult
.OK)
183
_buttonOK.DialogResult =
DialogResult
.OK;
System\ComponentModel\Design\BinaryEditor.cs (1)
113
if (editorService.ShowDialog(_binaryUI) ==
DialogResult
.OK)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (8)
285
DialogResult =
DialogResult
.None;
463
_okButton.DialogResult =
DialogResult
.OK;
468
_cancelButton.DialogResult =
DialogResult
.Cancel;
671
DialogResult =
DialogResult
.Cancel;
706
DialogResult =
DialogResult
.None;
954
protected internal override
DialogResult
ShowEditorDialog(IWindowsFormsEditorService edSvc)
957
DialogResult
result =
DialogResult
.OK;
System\ComponentModel\Design\CollectionEditor.CollectionForm.cs (1)
182
protected internal virtual
DialogResult
ShowEditorDialog(IWindowsFormsEditorService edSvc)
System\ComponentModel\Design\CollectionEditor.cs (1)
257
if (localCollectionForm.ShowEditorDialog(editorService) ==
DialogResult
.OK)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (1)
417
DialogResult
IWindowsFormsEditorService.ShowDialog(Form dialog)
System\Drawing\Design\ColorEditor.ColorPalette.cs (2)
245
DialogResult
result = dialog.ShowDialog();
246
if (result !=
DialogResult
.Cancel)
System\Drawing\Design\FontEditor.cs (1)
41
if (_fontDialog.ShowDialog() ==
DialogResult
.OK)
System\Drawing\Design\IconEditor.cs (1)
76
if (_fileDialog.ShowDialog() ==
DialogResult
.OK)
System\Drawing\Design\ImageEditor.cs (1)
104
if (_fileDialog.ShowDialog() ==
DialogResult
.OK)
System\Windows\Forms\Design\CollectionEditVerbManager.cs (1)
169
DialogResult
IWindowsFormsEditorService.ShowDialog(Form dialog)
System\Windows\Forms\Design\DataGridViewAddColumnDialog.cs (1)
568
DialogResult =
DialogResult
.OK;
System\Windows\Forms\Design\DataGridViewCellStyleBuilder.cs (2)
203
_okButton.DialogResult =
DialogResult
.OK;
208
_cancelButton.DialogResult =
DialogResult
.Cancel;
System\Windows\Forms\Design\DataGridViewCellStyleEditor.cs (1)
39
if (_builderDialog.ShowDialog() ==
DialogResult
.OK)
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (3)
282
DialogResult =
DialogResult
.Cancel;
601
_cancelButton.DialogResult =
DialogResult
.Cancel;
609
_okButton.DialogResult =
DialogResult
.OK;
System\Windows\Forms\Design\DataGridViewDesigner.cs (7)
749
DialogResult
result =
DialogResult
.Cancel;
757
if (result ==
DialogResult
.OK)
772
DialogResult
result =
DialogResult
.Cancel;
785
if (result ==
DialogResult
.OK)
796
private
DialogResult
ShowDialog(Form dialog)
System\Windows\Forms\Design\EditorServiceContext.cs (1)
123
DialogResult
IWindowsFormsEditorService.ShowDialog(Form dialog)
System\Windows\Forms\Design\FileNameEditor.cs (1)
35
if (_openFileDialog.ShowDialog() ==
DialogResult
.OK)
System\Windows\Forms\Design\FolderNameEditor.cs (1)
25
if (_folderBrowser.ShowDialog() ==
DialogResult
.OK)
System\Windows\Forms\Design\FolderNameEditor.FolderBrowser.cs (4)
46
public
DialogResult
ShowDialog() => ShowDialog(null);
51
public unsafe
DialogResult
ShowDialog(IWin32Window? owner)
70
return
DialogResult
.OK;
73
return
DialogResult
.Cancel;
System\Windows\Forms\Design\FormatStringDialog.cs (4)
187
_cancelButton.DialogResult =
DialogResult
.Cancel;
197
_okButton.DialogResult =
DialogResult
.OK;
245
DialogResult =
DialogResult
.OK;
251
DialogResult =
DialogResult
.Cancel;
System\Windows\Forms\Design\ImageListImageEditor.cs (1)
70
if (_fileDialog.ShowDialog() ==
DialogResult
.OK)
System\Windows\Forms\Design\LinkAreaEditor.cs (1)
48
if (editorService.ShowDialog(_linkAreaUI) ==
DialogResult
.OK)
System\Windows\Forms\Design\LinkAreaEditor.LinkAreaUI.cs (2)
75
_okButton.DialogResult =
DialogResult
.OK;
81
_cancelButton.DialogResult =
DialogResult
.Cancel;
System\Windows\Forms\Design\MaskDesignerDialog.cs (2)
188
_btnOK.DialogResult =
DialogResult
.OK;
197
_btnCancel.DialogResult =
DialogResult
.Cancel;
System\Windows\Forms\Design\MaskPropertyEditor.cs (2)
39
DialogResult
result = uiService is not null ? uiService.ShowDialog(dialog) : dialog.ShowDialog();
40
if (result ==
DialogResult
.OK)
System\Windows\Forms\Design\StringCollectionEditor.StringCollectionForm.cs (3)
101
_okButton.DialogResult =
DialogResult
.OK;
107
_cancelButton.DialogResult =
DialogResult
.Cancel;
167
DialogResult =
DialogResult
.Cancel;
System\Windows\Forms\Design\StyleEditorForm.cs (5)
254
_cancelButton.DialogResult =
DialogResult
.Cancel;
508
protected internal override
DialogResult
ShowEditorDialog(IWindowsFormsEditorService edSvc)
1100
DialogResult =
DialogResult
.OK;
1104
DialogResult =
DialogResult
.Cancel;
1116
DialogResult =
DialogResult
.Cancel;
System\Windows\Forms\Design\TreeNodeCollectionEditor.cs (2)
242
_okButton.DialogResult =
DialogResult
.OK;
247
_btnCancel.DialogResult =
DialogResult
.Cancel;
System.Windows.Forms.Design.Tests (31)
BinaryEditorTests.cs (1)
20
.Returns(
DialogResult
.OK);
System\ComponentModel\Design\CollectionEditorTests.cs (14)
154
.Returns(
DialogResult
.OK);
197
.Returns(
DialogResult
.OK);
245
.Returns(
DialogResult
.OK);
295
.Returns(
DialogResult
.OK);
410
.Returns(
DialogResult
.OK);
447
.Returns(
DialogResult
.OK);
524
.Returns(
DialogResult
.OK);
557
.Returns(
DialogResult
.OK);
597
.Returns(
DialogResult
.OK);
644
.Returns(
DialogResult
.Cancel);
691
.Returns(
DialogResult
.OK);
842
.Returns(
DialogResult
.OK);
946
.Returns(
DialogResult
.OK);
989
.Returns(
DialogResult
.OK);
System\ComponentModel\Design\CollectionFormTests.cs (15)
111
.Returns(
DialogResult
.OK);
167
.Returns(
DialogResult
.OK);
226
.Returns(
DialogResult
.OK);
285
.Returns(
DialogResult
.OK);
344
.Returns(
DialogResult
.OK);
392
.Returns(
DialogResult
.OK);
504
.Returns(
DialogResult
.OK);
548
.Returns(
DialogResult
.OK);
597
.Returns(
DialogResult
.OK);
648
.Returns(
DialogResult
.OK);
719
.Returns(
DialogResult
.OK);
763
.Returns(
DialogResult
.OK);
812
.Returns(
DialogResult
.OK);
813
Assert.Equal(
DialogResult
.OK, form.ShowEditorDialog(mockEditorService.Object));
877
public new
DialogResult
ShowEditorDialog(IWindowsFormsEditorService edSvc) => base.ShowEditorDialog(edSvc);
System\Windows\Forms\Design\MaskedTextBoxTextEditorTests.cs (1)
25
.Returns(
DialogResult
.OK);
System.Windows.Forms.Tests (78)
System\Windows\Forms\ButtonBaseTests.cs (1)
9256
public
DialogResult
DialogResult { get; set; }
System\Windows\Forms\ButtonTests.cs (19)
60
Assert.Equal(
DialogResult
.None, control.DialogResult);
613
[EnumData<
DialogResult
>]
614
public void Button_DialogResult_Set_GetReturnsExpected(
DialogResult
value)
630
[EnumData<
DialogResult
>]
631
public void Button_DialogResult_SetWithHandle_GetReturnsExpected(
DialogResult
value)
659
[InvalidEnumData<
DialogResult
>]
660
public void Button_DialogResult_SetInvalidValue_ThrowsInvalidEnumArgumentException(
DialogResult
value)
1942
DialogResult =
DialogResult
.Yes
1956
Assert.Equal(
DialogResult
.Yes, form.DialogResult);
1966
Assert.Equal(
DialogResult
.Yes, form.DialogResult);
2024
DialogResult =
DialogResult
.Yes
2045
Assert.Equal(
DialogResult
.Yes, form.DialogResult);
2057
Assert.Equal(
DialogResult
.Yes, form.DialogResult);
3126
DialogResult =
DialogResult
.Yes
3140
Assert.Equal(
DialogResult
.None, form.DialogResult);
3149
Assert.Equal(
DialogResult
.None, form.DialogResult);
3204
DialogResult =
DialogResult
.Yes
3225
Assert.Equal(
DialogResult
.None, form.DialogResult);
3237
Assert.Equal(
DialogResult
.None, form.DialogResult);
System\Windows\Forms\CommonDialogTests.cs (30)
91
[InlineData(true,
DialogResult
.OK)]
92
[InlineData(false,
DialogResult
.Cancel)]
93
public void ShowDialog_NoOwner_ReturnsExpected(bool runDialogResult,
DialogResult
expectedDialogResult)
104
[InlineData(true,
DialogResult
.OK)]
105
[InlineData(false,
DialogResult
.Cancel)]
106
public void ShowDialog_NonControlOwner_ReturnsExpected(bool runDialogResult,
DialogResult
expectedDialogResult)
120
[InlineData(true,
DialogResult
.OK)]
121
[InlineData(false,
DialogResult
.Cancel)]
122
public void ShowDialog_NonControlOwnerWithVisualStyles_ReturnsExpected(bool runDialogResultParam,
DialogResult
expectedDialogResultParam)
128
DialogResult
expectedDialogResult = (
DialogResult
)Enum.Parse(typeof(
DialogResult
), expectedDialogResultString);
145
[InlineData(true,
DialogResult
.OK)]
146
[InlineData(false,
DialogResult
.Cancel)]
147
public void ShowDialog_ControlOwner_ReturnsExpected(bool runDialogResult,
DialogResult
expectedDialogResult)
158
[InlineData(true,
DialogResult
.OK)]
159
[InlineData(false,
DialogResult
.Cancel)]
160
public void ShowDialog_ControlOwnerWithVisualStyles_ReturnsExpected(bool runDialogResultParam,
DialogResult
expectedDialogResultParam)
166
DialogResult
expectedDialogResult = (
DialogResult
)Enum.Parse(typeof(
DialogResult
), expectedDialogResultString);
180
[InlineData(true,
DialogResult
.OK)]
181
[InlineData(false,
DialogResult
.Cancel)]
182
public void ShowDialog_ControlOwnerWithHandle_ReturnsExpected(bool runDialogResult,
DialogResult
expectedDialogResult)
194
[InlineData(true,
DialogResult
.OK)]
195
[InlineData(false,
DialogResult
.Cancel)]
196
public void ShowDialog_ControlOwnerWithHandleWithVisualStyles_ReturnsExpected(bool runDialogResultParam,
DialogResult
expectedDialogResultParam)
202
DialogResult
expectedDialogResult = (
DialogResult
)Enum.Parse(typeof(
DialogResult
), expectedDialogResultString);
System\Windows\Forms\Design\ComponentEditorFormTests.cs (1)
78
Assert.Equal(
DialogResult
.None, control.DialogResult);
System\Windows\Forms\FormTests.cs (27)
77
Assert.Equal(
DialogResult
.None, control.DialogResult);
1829
DialogResult
expectedDialogResult =
DialogResult
.OK;
1851
foreach (
DialogResult
dialogResult in Enum.GetValues(typeof(
DialogResult
)))
1860
public void Form_Visible_Set_GetReturnsExpected(
DialogResult
dialogResult, bool value)
1888
foreach (
DialogResult
dialogResult in Enum.GetValues(typeof(
DialogResult
)))
1899
public void Form_Visible_SetMdiChild_GetReturnsExpected(
DialogResult
dialogResult, bool parentVisible, bool value, bool expected)
1933
public void Form_Visible_SetWithHandle_GetReturnsExpected(
DialogResult
dialogResult, bool value)
1980
[EnumData<
DialogResult
>]
1981
public void Form_Visible_SetTrueMdiChildVisibleWithHandle_GetReturnsExpected(
DialogResult
dialogResult)
2002
Assert.Equal(dialogResult is
DialogResult
.OK or
DialogResult
.None, control.Visible);
2003
Assert.Equal(dialogResult is
DialogResult
.OK or
DialogResult
.None, control.IsHandleCreated);
2022
Assert.Equal(dialogResult !=
DialogResult
.OK, control.Visible);
2023
Assert.Equal(dialogResult !=
DialogResult
.OK, control.IsHandleCreated);
2032
[EnumData<
DialogResult
>]
2033
public void Form_Visible_SetFalseMdiChildVisibleWithHandle_GetReturnsExpected(
DialogResult
dialogResult)
2064
Assert.Equal(dialogResult ==
DialogResult
.None, control.Visible);
2065
Assert.Equal(dialogResult ==
DialogResult
.None, control.IsHandleCreated);
2085
public void Form_Visible_SetMdiChildNotVisibleWithHandle_GetReturnsExpected(
DialogResult
dialogResult, bool value)
2118
foreach (
DialogResult
dialogResult in Enum.GetValues(typeof(
DialogResult
)))
2127
public void Form_Visible_SetTrueWithHandler_CallsVisibleChanged(
DialogResult
dialogResult, bool value, int expectedLoadCallCount)
2288
public void Form_Visible_SetTrueWithHandlerWithHandle_CallsVisibleChanged(
DialogResult
dialogResult, bool value, int expectedLoadCallCount)
System.Windows.Forms.UI.IntegrationTests (25)
ButtonTests.cs (17)
19
[InlineData(
DialogResult
.Abort)]
20
[InlineData(
DialogResult
.Cancel)]
21
[InlineData(
DialogResult
.Ignore)]
22
[InlineData(
DialogResult
.No)]
23
[InlineData(
DialogResult
.OK)]
24
[InlineData(
DialogResult
.Retry)]
25
[InlineData(
DialogResult
.Yes)]
27
[InlineData(
DialogResult
.None)]
28
public async Task Button_DialogResult_ClickDefaultButtonToCloseFormAsync(
DialogResult
dialogResult)
32
Assert.Equal(
DialogResult
.None, button.DialogResult);
39
Assert.Equal(
DialogResult
.None, form.DialogResult);
50
Assert.Equal(dialogResult ==
DialogResult
.None, form.Visible);
62
button.DialogResult =
DialogResult
.OK;
70
Assert.Equal(
DialogResult
.OK, form.DialogResult);
80
button.DialogResult =
DialogResult
.OK;
88
Assert.Equal(
DialogResult
.None, form.DialogResult);
107
Assert.Equal(
DialogResult
.Cancel, form.DialogResult);
FolderBrowserDialogTests.cs (1)
27
Assert.Equal(
DialogResult
.Cancel, dialog.ShowDialog(dialogOwnerForm));
FolderNameEditorTests.cs (1)
46
if (_folderBrowser.ShowDialog(dialogOwnerForm) ==
DialogResult
.OK)
MessageBoxTests.cs (1)
12
Assert.Equal(
DialogResult
.None, MessageBox.Show("Testing DialogResult"));
OpenFileDialogTests.cs (3)
22
Assert.Equal(
DialogResult
.Cancel, dialog.ShowDialog(dialogOwnerForm));
31
Assert.Equal(
DialogResult
.Cancel, dialog.ShowDialog(dialogOwnerForm));
44
Assert.Equal(
DialogResult
.OK, dialog.ShowDialog(dialogOwnerForm));
PrintDialogTests.cs (2)
22
Assert.Equal(
DialogResult
.Cancel, dialog.ShowDialog(dialogOwnerForm));
31
Assert.Equal(
DialogResult
.OK, dialog.ShowDialog(dialogOwnerForm));
WinFormsControlsTest (7)
ListViewTest.cs (3)
242
if (openFileDialog1.ShowDialog() !=
DialogResult
.OK)
271
DialogResult
result = openFileDialog1.ShowDialog();
274
if (result !=
DialogResult
.OK)
RichTextBoxes.cs (2)
130
Button confirmation = new() { Text = "Ok", Left = 350, Width = 100, Top = 70, DialogResult =
DialogResult
.OK };
137
return prompt.ShowDialog() ==
DialogResult
.OK ? textBox.Text : "";
TaskDialogSamples.cs (2)
57
DialogResult
messageBoxResult = MessageBox.Show(
65
if (messageBoxResult ==
DialogResult
.Yes)