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