236 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 (56)
System\Windows\Forms\ApplicationContext.cs (1)
103
if (!_mainForm.
IsDisposed
)
System\Windows\Forms\Control.cs (5)
3503
if (
IsDisposed
&& _threadCallbackList is not null && _threadCallbackList.Count > 0)
9051
if (!
IsDisposed
)
11319
if (!RecreatingHandle && !Disposing && !
IsDisposed
&& GetState(States.TrackingMouseEvent))
11392
if (
IsDisposed
)
11578
&& !
IsDisposed
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (1)
1072
if (Disposing ||
IsDisposed
)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (5)
14615
if (!_dataGridViewOper[OperationInDispose] && !
IsDisposed
)
14944
&& !
IsDisposed
)
15867
&& !
IsDisposed
16671
if (_dataGridViewOper[OperationInDispose] ||
IsDisposed
)
30120
_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)
1052
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 (2)
367
if (!
IsDisposed
)
1963
!SelectedTab.
IsDisposed
&& SelectedTab.TabAccessibilityObject is not null)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (3)
1402
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)
193
!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)
391
&& !_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)
982
Assert.Equal(callCount > 0, control.
IsDisposed
);
994
Assert.True(control.
IsDisposed
);
1004
Assert.True(control.
IsDisposed
);
1033
Assert.Equal(callCount > 0, control.
IsDisposed
);
1047
Assert.True(control.
IsDisposed
);
1058
Assert.True(control.
IsDisposed
);
1087
Assert.Equal(callCount > 0, control.
IsDisposed
);
1107
Assert.True(control.
IsDisposed
);
1109
Assert.True(child1.
IsDisposed
);
1111
Assert.True(child2.
IsDisposed
);
1128
Assert.True(control.
IsDisposed
);
1130
Assert.True(child1.
IsDisposed
);
1132
Assert.True(child2.
IsDisposed
);
1160
Assert.Equal(callCount > 0, control.
IsDisposed
);
1172
Assert.True(control.
IsDisposed
);
1182
Assert.True(control.
IsDisposed
);
1215
Assert.Equal(callCount > 0, control.
IsDisposed
);
1227
Assert.True(control.
IsDisposed
);
1241
Assert.True(control.
IsDisposed
);
1284
Assert.Equal(callCount > 0, control.
IsDisposed
);
1296
Assert.True(control.
IsDisposed
);
1306
Assert.True(control.
IsDisposed
);
1331
Assert.False(control.
IsDisposed
);
1341
Assert.False(control.
IsDisposed
);
1370
Assert.Equal(callCount > 0, control.
IsDisposed
);
1384
Assert.True(control.
IsDisposed
);
1395
Assert.True(control.
IsDisposed
);
1427
Assert.False(control.
IsDisposed
);
1438
Assert.False(control.
IsDisposed
);
1467
Assert.Equal(callCount > 0, control.
IsDisposed
);
1487
Assert.True(control.
IsDisposed
);
1489
Assert.True(child1.
IsDisposed
);
1491
Assert.True(child2.
IsDisposed
);
1508
Assert.True(control.
IsDisposed
);
1510
Assert.True(child1.
IsDisposed
);
1512
Assert.True(child2.
IsDisposed
);
1555
Assert.False(control.
IsDisposed
);
1557
Assert.False(child1.
IsDisposed
);
1559
Assert.False(child2.
IsDisposed
);
1576
Assert.False(control.
IsDisposed
);
1578
Assert.False(child1.
IsDisposed
);
1580
Assert.False(child2.
IsDisposed
);
1608
Assert.Equal(callCount > 0, control.
IsDisposed
);
1620
Assert.True(control.
IsDisposed
);
1630
Assert.True(control.
IsDisposed
);
1658
Assert.False(control.
IsDisposed
);
1668
Assert.False(control.
IsDisposed
);
1701
Assert.Equal(callCount > 0, control.
IsDisposed
);
1713
Assert.True(control.
IsDisposed
);
1727
Assert.True(control.
IsDisposed
);
1766
Assert.False(control.
IsDisposed
);
1780
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
);