235 references to IsDisposed
Microsoft.VisualBasic.Forms (1)
Microsoft\VisualBasic\ApplicationServices\WindowsFormsApplicationBase.vb (1)
693
If _splashScreen IsNot Nothing AndAlso Not _splashScreen.
IsDisposed
Then
System.Windows.Forms (55)
System\Windows\Forms\ApplicationContext.cs (1)
103
if (!_mainForm.
IsDisposed
)
System\Windows\Forms\Control.cs (5)
3504
if (
IsDisposed
&& _threadCallbackList is not null && _threadCallbackList.Count > 0)
9052
if (!
IsDisposed
)
11320
if (!RecreatingHandle && !Disposing && !
IsDisposed
&& GetState(States.TrackingMouseEvent))
11393
if (
IsDisposed
)
11579
&& !
IsDisposed
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (1)
1072
if (Disposing ||
IsDisposed
)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (5)
14616
if (!_dataGridViewOper[OperationInDispose] && !
IsDisposed
)
14945
&& !
IsDisposed
)
15868
&& !
IsDisposed
16672
if (_dataGridViewOper[OperationInDispose] ||
IsDisposed
)
30121
_dataGridViewOper[OperationInDispose] ||
IsDisposed
? null : Events[staticEvent] as T;
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (2)
2795
if (DataGridView is null || DataGridView.
IsDisposed
)
2831
if (DataGridView is not null && !DataGridView.
IsDisposed
&& !DataGridView.Disposing)
System\Windows\Forms\Controls\Labels\Label.cs (1)
1180
if (Disposing ||
IsDisposed
)
System\Windows\Forms\Controls\Labels\LinkLabel.cs (1)
865
if (Disposing ||
IsDisposed
)
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (1)
1053
if (Disposing ||
IsDisposed
)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (1)
3983
if (
IsDisposed
)
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
1310
if (
IsDisposed
)
System\Windows\Forms\Controls\TabControl\TabControl.cs (1)
367
if (!
IsDisposed
)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (3)
1403
if (!IsDropDown && !
IsDisposed
&& !Properties.TryGetValue(s_propToolStripPanelCell, out toolStripPanelCell))
3664
if (!Disposing && !
IsDisposed
)
4089
if (!Disposing && !
IsDisposed
)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.RestoreFocusMessageFilter.cs (1)
19
if (_ownerToolStrip.Disposing || _ownerToolStrip.
IsDisposed
|| _ownerToolStrip.IsDropDown)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (2)
1735
if (TopLevel && (!
IsDisposed
|| !Disposing))
1757
if (toolStrip is not null && !(toolStrip.
IsDisposed
|| toolStrip.Disposing))
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (1)
539
if (!
IsDisposed
)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (2)
2665
if (parent.Disposing || parent.
IsDisposed
)
3001
if (Owner is not null && !(Owner.
IsDisposed
|| Owner.Disposing))
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (1)
194
!toolStrip.
IsDisposed
&&
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (1)
533
if (activeToolStrip.
IsDisposed
)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.FeedbackRectangle.cs (2)
26
if (_dropDown is not null && !_dropDown.
IsDisposed
)
35
if (_dropDown is not null && !_dropDown.
IsDisposed
)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.FeedbackRectangle.FeedbackDropDown.cs (1)
43
if (
IsDisposed
|| _numPaintsServiced != 0)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelCell.cs (1)
389
&& !_wrappedToolStrip.
IsDisposed
// ensure we have a live-runtime only toolstrip.
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.ToolStripTextBoxControl.cs (1)
203
if (!Disposing && !
IsDisposed
)
System\Windows\Forms\Controls\TreeView\TreeNode.cs (14)
232
if (tv is null || tv.
IsDisposed
)
265
if (tv is null || tv.
IsDisposed
)
300
if (tv is null || !tv.IsHandleCreated || tv.
IsDisposed
)
328
if (HTREEITEMInternal != IntPtr.Zero && _treeView is not null && !_treeView.
IsDisposed
)
619
if (tv.
IsDisposed
)
693
if (tv is null || tv.
IsDisposed
)
855
if (tv is null || tv.
IsDisposed
)
960
if (tv is null || tv.
IsDisposed
)
1590
if (tv is null || tv.
IsDisposed
)
1659
if (tv is null || tv.
IsDisposed
)
1821
if (tv is null || !tv.IsHandleCreated || tv.
IsDisposed
)
1976
if (tv is null || tv.
IsDisposed
)
2137
if (tv.
IsDisposed
)
2204
if (tv.
IsDisposed
)
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (1)
1397
ObjectDisposedException.ThrowIf(
IsDisposed
, this);
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (1)
476
if (Visible && !Disposing && !
IsDisposed
)
System\Windows\Forms\ToolTip\ToolTip.cs (2)
196
if (TopLevelControl is not null && !TopLevelControl.
IsDisposed
)
1729
if (win is Control control && control.
IsDisposed
)
System\Windows\Forms\WindowsFormsSynchronizationContext.cs (1)
67
if (!control.
IsDisposed
)
System.Windows.Forms.Design (6)
System\ComponentModel\Design\DesignerActionPanel.cs (1)
361
if (Disposing ||
IsDisposed
)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.FlyoutDialog.cs (1)
67
if (!_parentControl.
IsDisposed
)
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.cs (1)
103
=> DesignerFrame is not null && !DesignerFrame.
IsDisposed
&& DesignerFrame.IsHandleCreated;
System\Windows\Forms\Design\DesignerFrame.cs (1)
119
if (selSvc?.PrimarySelection is Control {
IsDisposed
: false } ctrl)
System\Windows\Forms\Design\SelectionUIService.cs (1)
188
if (
IsDisposed
)
System\Windows\Forms\Design\ToolStripAdornerWindowService.cs (1)
230
if (_designerFrame is null || _designerFrame.
IsDisposed
|| !_designerFrame.IsHandleCreated)
System.Windows.Forms.Tests (173)
System\Windows\Forms\ApplicationContextTests.cs (9)
175
Assert.True(mainForm.
IsDisposed
);
179
Assert.True(mainForm.
IsDisposed
);
188
Assert.True(mainForm.
IsDisposed
);
192
Assert.True(mainForm.
IsDisposed
);
196
Assert.True(mainForm.
IsDisposed
);
252
Assert.True(mainForm.
IsDisposed
);
256
Assert.True(mainForm.
IsDisposed
);
266
Assert.False(mainForm.
IsDisposed
);
270
Assert.False(mainForm.
IsDisposed
);
System\Windows\Forms\ButtonBaseTests.cs (24)
4567
Assert.Equal(callCount > 0, control.
IsDisposed
);
4581
Assert.True(control.
IsDisposed
);
4592
Assert.True(control.
IsDisposed
);
4619
Assert.Equal(callCount > 0, control.
IsDisposed
);
4633
Assert.True(control.
IsDisposed
);
4644
Assert.True(control.
IsDisposed
);
4674
Assert.Equal(callCount > 0, control.
IsDisposed
);
4688
Assert.True(control.
IsDisposed
);
4699
Assert.True(control.
IsDisposed
);
4722
Assert.Equal(callCount > 0, control.
IsDisposed
);
4736
Assert.True(control.
IsDisposed
);
4747
Assert.True(control.
IsDisposed
);
4774
Assert.Equal(callCount > 0, control.
IsDisposed
);
4788
Assert.True(control.
IsDisposed
);
4799
Assert.True(control.
IsDisposed
);
4829
Assert.Equal(callCount > 0, control.
IsDisposed
);
4843
Assert.True(control.
IsDisposed
);
4854
Assert.True(control.
IsDisposed
);
4878
Assert.False(control.
IsDisposed
);
4889
Assert.False(control.
IsDisposed
);
4919
Assert.False(control.
IsDisposed
);
4930
Assert.False(control.
IsDisposed
);
4963
Assert.False(control.
IsDisposed
);
4974
Assert.False(control.
IsDisposed
);
System\Windows\Forms\ControlTests.Methods.cs (52)
983
Assert.Equal(callCount > 0, control.
IsDisposed
);
995
Assert.True(control.
IsDisposed
);
1005
Assert.True(control.
IsDisposed
);
1034
Assert.Equal(callCount > 0, control.
IsDisposed
);
1048
Assert.True(control.
IsDisposed
);
1059
Assert.True(control.
IsDisposed
);
1088
Assert.Equal(callCount > 0, control.
IsDisposed
);
1108
Assert.True(control.
IsDisposed
);
1110
Assert.True(child1.
IsDisposed
);
1112
Assert.True(child2.
IsDisposed
);
1129
Assert.True(control.
IsDisposed
);
1131
Assert.True(child1.
IsDisposed
);
1133
Assert.True(child2.
IsDisposed
);
1161
Assert.Equal(callCount > 0, control.
IsDisposed
);
1173
Assert.True(control.
IsDisposed
);
1183
Assert.True(control.
IsDisposed
);
1216
Assert.Equal(callCount > 0, control.
IsDisposed
);
1228
Assert.True(control.
IsDisposed
);
1242
Assert.True(control.
IsDisposed
);
1285
Assert.Equal(callCount > 0, control.
IsDisposed
);
1297
Assert.True(control.
IsDisposed
);
1307
Assert.True(control.
IsDisposed
);
1332
Assert.False(control.
IsDisposed
);
1342
Assert.False(control.
IsDisposed
);
1371
Assert.Equal(callCount > 0, control.
IsDisposed
);
1385
Assert.True(control.
IsDisposed
);
1396
Assert.True(control.
IsDisposed
);
1428
Assert.False(control.
IsDisposed
);
1439
Assert.False(control.
IsDisposed
);
1468
Assert.Equal(callCount > 0, control.
IsDisposed
);
1488
Assert.True(control.
IsDisposed
);
1490
Assert.True(child1.
IsDisposed
);
1492
Assert.True(child2.
IsDisposed
);
1509
Assert.True(control.
IsDisposed
);
1511
Assert.True(child1.
IsDisposed
);
1513
Assert.True(child2.
IsDisposed
);
1556
Assert.False(control.
IsDisposed
);
1558
Assert.False(child1.
IsDisposed
);
1560
Assert.False(child2.
IsDisposed
);
1577
Assert.False(control.
IsDisposed
);
1579
Assert.False(child1.
IsDisposed
);
1581
Assert.False(child2.
IsDisposed
);
1609
Assert.Equal(callCount > 0, control.
IsDisposed
);
1621
Assert.True(control.
IsDisposed
);
1631
Assert.True(control.
IsDisposed
);
1659
Assert.False(control.
IsDisposed
);
1669
Assert.False(control.
IsDisposed
);
1702
Assert.Equal(callCount > 0, control.
IsDisposed
);
1714
Assert.True(control.
IsDisposed
);
1728
Assert.True(control.
IsDisposed
);
1767
Assert.False(control.
IsDisposed
);
1781
Assert.False(control.
IsDisposed
);
System\Windows\Forms\DataGridViewCellTests.cs (8)
354
Assert.False(menu.
IsDisposed
);
3336
Assert.False(menu.
IsDisposed
);
3506
Assert.False(menu.
IsDisposed
);
3511
Assert.False(menu.
IsDisposed
);
3516
Assert.True(menu.
IsDisposed
);
3543
Assert.False(menu.
IsDisposed
);
3548
Assert.False(menu.
IsDisposed
);
3553
Assert.True(menu.
IsDisposed
);
System\Windows\Forms\DataGridViewHeaderCellTests.cs (2)
2038
Assert.False(menu.
IsDisposed
);
2124
Assert.False(menu.
IsDisposed
);
System\Windows\Forms\StatusStripTests.cs (8)
917
Assert.Equal(callCount > 0, control.
IsDisposed
);
930
Assert.True(control.
IsDisposed
);
941
Assert.True(control.
IsDisposed
);
970
Assert.Equal(callCount > 0, control.
IsDisposed
);
983
Assert.True(control.
IsDisposed
);
994
Assert.True(control.
IsDisposed
);
1036
Assert.False(control.
IsDisposed
);
1047
Assert.False(control.
IsDisposed
);
System\Windows\Forms\ToolStripControlHostTests.cs (8)
2583
Assert.False(c.
IsDisposed
);
2595
Assert.True(c.
IsDisposed
);
2603
Assert.True(c.
IsDisposed
);
2625
Assert.False(c.
IsDisposed
);
2637
Assert.True(c.
IsDisposed
);
2645
Assert.True(c.
IsDisposed
);
2669
Assert.False(c.
IsDisposed
);
2677
Assert.False(c.
IsDisposed
);
System\Windows\Forms\ToolStripDropDownTests.cs (27)
3050
Assert.Equal(callCount > 0, control.
IsDisposed
);
3063
Assert.True(control.
IsDisposed
);
3075
Assert.True(control.
IsDisposed
);
3107
Assert.Equal(callCount > 0, control.
IsDisposed
);
3120
Assert.True(control.
IsDisposed
);
3133
Assert.True(control.
IsDisposed
);
3163
Assert.Equal(callCount > 0, control.
IsDisposed
);
3176
Assert.True(control.
IsDisposed
);
3188
Assert.True(control.
IsDisposed
);
3223
Assert.Equal(callCount > 0, control.
IsDisposed
);
3244
Assert.True(control.
IsDisposed
);
3264
Assert.True(control.
IsDisposed
);
3294
Assert.Equal(callCount > 0, control.
IsDisposed
);
3307
Assert.True(control.
IsDisposed
);
3319
Assert.True(control.
IsDisposed
);
3346
Assert.False(control.
IsDisposed
);
3357
Assert.False(control.
IsDisposed
);
3388
Assert.Equal(callCount > 0, control.
IsDisposed
);
3401
Assert.True(control.
IsDisposed
);
3414
Assert.True(control.
IsDisposed
);
3447
Assert.False(control.
IsDisposed
);
3460
Assert.False(control.
IsDisposed
);
3496
Assert.Equal(callCount > 0, control.
IsDisposed
);
3517
Assert.True(control.
IsDisposed
);
3537
Assert.True(control.
IsDisposed
);
3586
Assert.False(control.
IsDisposed
);
3605
Assert.False(control.
IsDisposed
);
System\Windows\Forms\ToolStripTests.cs (19)
4368
Assert.Equal(callCount > 0, control.
IsDisposed
);
4381
Assert.True(control.
IsDisposed
);
4393
Assert.True(control.
IsDisposed
);
4422
Assert.Equal(callCount > 0, control.
IsDisposed
);
4435
Assert.True(control.
IsDisposed
);
4447
Assert.True(control.
IsDisposed
);
4482
Assert.Equal(callCount > 0, control.
IsDisposed
);
4503
Assert.True(control.
IsDisposed
);
4523
Assert.True(control.
IsDisposed
);
4553
Assert.Equal(callCount > 0, control.
IsDisposed
);
4566
Assert.True(control.
IsDisposed
);
4578
Assert.True(control.
IsDisposed
);
4605
Assert.False(control.
IsDisposed
);
4616
Assert.False(control.
IsDisposed
);
4650
Assert.Equal(callCount > 0, control.
IsDisposed
);
4671
Assert.True(control.
IsDisposed
);
4691
Assert.True(control.
IsDisposed
);
4740
Assert.False(control.
IsDisposed
);
4759
Assert.False(control.
IsDisposed
);
System\Windows\Forms\WebBrowserTests.cs (16)
2532
Assert.Equal(callCount > 0, control.
IsDisposed
);
2545
Assert.True(control.
IsDisposed
);
2556
Assert.True(control.
IsDisposed
);
2587
Assert.Equal(callCount > 0, control.
IsDisposed
);
2600
Assert.True(control.
IsDisposed
);
2611
Assert.True(control.
IsDisposed
);
2635
Assert.Equal(callCount > 0, control.
IsDisposed
);
2648
Assert.True(control.
IsDisposed
);
2659
Assert.True(control.
IsDisposed
);
2692
Assert.False(control.
IsDisposed
);
2703
Assert.False(control.
IsDisposed
);
2734
Assert.Equal(callCount > 0, control.
IsDisposed
);
2747
Assert.True(control.
IsDisposed
);
2758
Assert.True(control.
IsDisposed
);
2784
Assert.False(control.
IsDisposed
);
2795
Assert.False(control.
IsDisposed
);