32 references to CloseReason
Microsoft.VisualBasic.Forms (1)
Microsoft\VisualBasic\MyServices\Internal\ProgressDialog.vb (1)
179
If e.CloseReason =
CloseReason
.UserClosing And Not _closeDialogInvoked Then
System.Windows.Forms (23)
System\Windows\Forms\Form.cs (18)
159
private
CloseReason
_closeReason =
CloseReason
.None;
853
internal
CloseReason
CloseReason
3190
_closeReason =
CloseReason
.UserClosing;
4808
FormClosedEventArgs fce = new(
CloseReason
.FormOwnerClosing);
4819
OnFormClosed(new FormClosedEventArgs(
CloseReason
.ApplicationExitCall));
4828
FormClosingEventArgs e = new(
CloseReason
.ApplicationExitCall, false);
4836
FormClosingEventArgs fce = new(
CloseReason
.FormOwnerClosing, false);
5609
CloseReason =
CloseReason
.None;
6604
FormClosingEventArgs fe = new(
CloseReason
.MdiFormClosing, e.Cancel);
6634
FormClosingEventArgs cfe = new(
CloseReason
.FormOwnerClosing, e.Cancel);
6660
CloseReason =
CloseReason
.None;
6684
fc = new FormClosedEventArgs(
CloseReason
.MdiFormClosing);
6703
fc = new FormClosedEventArgs(
CloseReason
.FormOwnerClosing);
6954
CloseReason =
CloseReason
.UserClosing;
7048
if (CloseReason ==
CloseReason
.None)
7050
CloseReason =
CloseReason
.TaskManagerClosing;
7058
CloseReason =
CloseReason
.WindowsShutDown;
System\Windows\Forms\FormClosedEventArgs.cs (2)
11
public FormClosedEventArgs(
CloseReason
closeReason)
19
public
CloseReason
CloseReason { get; }
System\Windows\Forms\FormClosingEventArgs.cs (2)
13
public FormClosingEventArgs(
CloseReason
closeReason, bool cancel) : base(cancel)
21
public
CloseReason
CloseReason { get; }
System\Windows\Forms\MDI\MdiWindowListStrip.cs (1)
103
if (forms[i].Visible && (forms[i].CloseReason ==
CloseReason
.None))
System.Windows.Forms.Tests (6)
System\Windows\Forms\FormClosedEventArgsTests.cs (3)
10
[InlineData(
CloseReason
.None)]
11
[InlineData((
CloseReason
.None - 1))]
12
public void Ctor_CloseReason(
CloseReason
closeReason)
System\Windows\Forms\FormClosingEventArgsTests.cs (3)
10
[InlineData(
CloseReason
.None, true)]
11
[InlineData((
CloseReason
.None - 1), false)]
12
public void Ctor_CloseReason_Bool(
CloseReason
closeReason, bool cancel)
System.Windows.Forms.UI.IntegrationTests (2)
ButtonTests.cs (2)
38
Assert.Equal(
CloseReason
.None, form.CloseReason);
46
Assert.Equal(
CloseReason
.None, form.CloseReason);