System.Windows.Forms.Control.Dispose(bool)

Here are the examples of the csharp api class System.Windows.Forms.Control.Dispose(bool) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

199 Examples 7

1. Example

Project: Krypton
Source File: KryptonCheckedListBox.cs
View license
protected override void Dispose(bool disposing)
            {
                base.Dispose(disposing);
                if (_screenDC != IntPtr.Zero)
                    PI.DeleteDC(_screenDC);
            }

2. Example

Project: Krypton
Source File: KryptonListBox.cs
View license
protected override void Dispose(bool disposing)
            {
                base.Dispose(disposing);
                if (_screenDC != IntPtr.Zero)
                    PI.DeleteDC(_screenDC);
            }

3. Example

Project: MapleShark
Source File: DockPanel.cs
View license
protected override void Dispose(bool disposing)
		{
			lock (this)
			{
				if (!m_disposed && disposing)
				{
                    m_focusManager.Dispose();
					if (m_mdiClientController != null)
					{
						m_mdiClientController.HandleAssigned -= new EventHandler(MdiClientHandleAssigned);
						m_mdiClientController.MdiChildActivate -= new EventHandler(ParentFormMdiChildActivate);
						m_mdiClientController.Layout -= new LayoutEventHandler(MdiClient_Layout);
						m_mdiClientController.Dispose();
					}
					FloatWindows.Dispose();
					Panes.Dispose();
					DummyContent.Dispose();

					m_disposed = true;
				}
				
				base.Dispose(disposing);
			}
		}

4. Example

Project: dockpanelsuite
Source File: DockPanel.cs
View license
protected override void Dispose(bool disposing)
        {
            if (!m_disposed && disposing)
            {
                m_focusManager.Dispose();
                if (m_mdiClientController != null)
                {
                    m_mdiClientController.HandleAssigned -= new EventHandler(MdiClientHandleAssigned);
                    m_mdiClientController.MdiChildActivate -= new EventHandler(ParentFormMdiChildActivate);
                    m_mdiClientController.Layout -= new LayoutEventHandler(MdiClient_Layout);
                    m_mdiClientController.Dispose();
                }
                FloatWindows.Dispose();
                Panes.Dispose();
                DummyContent.Dispose();

                m_disposed = true;
            }
                
            base.Dispose(disposing);
        }

5. Example

Project: DotSpatial
Source File: BreakSliderGraph.cs
View license
protected override void Dispose(bool disposing)
        {
            _graph?.Dispose();
            base.Dispose(disposing);
        }

6. Example

Project: fomm
Source File: VerticalTabPage.cs
View license
protected override void Dispose(bool disposing)
    {
      TabButton.Button.Dispose();
      base.Dispose(disposing);
    }

7. Example

Project: mbunit-v3
Source File: SplashView.cs
View license
protected override void Dispose(bool disposing)
        {
            layout.Dispose();

            base.Dispose(disposing);
        }

8. Example

Project: FunctionHacker
Source File: oVisMain.cs
View license
protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (directxFont != null)
                {
                    directxFont.Dispose();
                    directxFont = null;
                }
                if (device != null)
                {
                    device.Dispose();
                    device = null;
                }
                base.Dispose(true);
            }

        }

9. Example

Project: FunctionHacker
Source File: oVisPlayBar.cs
View license
protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (drawingFont != null)
                {
                    drawingFont.Dispose();
                    drawingFont = null;
                }
                if (device != null)
                {
                    device.Dispose();
                    device = null;
                }
                base.Dispose(true);
            }
        }

10. Example

Project: ArnoldSimulator
Source File: DockPanel.cs
View license
protected override void Dispose(bool disposing)
        {
            if (!m_disposed && disposing)
            {
                m_focusManager.Dispose();
                if (m_mdiClientController != null)
                {
                    m_mdiClientController.HandleAssigned -= new EventHandler(MdiClientHandleAssigned);
                    m_mdiClientController.MdiChildActivate -= new EventHandler(ParentFormMdiChildActivate);
                    m_mdiClientController.Layout -= new LayoutEventHandler(MdiClient_Layout);
                    m_mdiClientController.Dispose();
                }
                FloatWindows.Dispose();
                Panes.Dispose();
                DummyContent.Dispose();

                m_disposed = true;
            }
                
            base.Dispose(disposing);
        }

11. Example

View license
protected override void Dispose(bool disposing)
            {
                base.Dispose(disposing);
                Shell32.SHChangeNotifyUnregister(m_NotifyId);
            }

12. Example

Project: gong-shell
Source File: ShellView.cs
View license
protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (m_ShellViewWindow != IntPtr.Zero)
                {
                    User32.DestroyWindow(m_ShellViewWindow);
                    m_ShellViewWindow = IntPtr.Zero;
                }
            }
            base.Dispose(disposing);
        }

13. Example

View license
protected override void Dispose(bool disposing)
            {
                base.Dispose(disposing);
                Shell32.SHChangeNotifyUnregister(m_NotifyId);
            }

14. Example

Project: gong-shell
Source File: ShellView.cs
View license
protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (m_ShellViewWindow != IntPtr.Zero)
                {
                    User32.DestroyWindow(m_ShellViewWindow);
                    m_ShellViewWindow = IntPtr.Zero;
                }
            }
            base.Dispose(disposing);
        }

15. Example

Project: PSVRFramework
Source File: WizardPage.cs
View license
protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
//				//Unregister callbacks
//				ClearChangeNotifications();      
            }
            base.Dispose(disposing);
        }

16. Example

Project: gitter
Source File: FlowLayoutControl.cs
View license
protected override void Dispose(bool disposing)
		{
			if(disposing)
			{
				_panels.Clear();
			}
			base.Dispose(disposing);
		}

17. Example

Project: gitter
Source File: ViewSplit.cs
View license
protected override void Dispose(bool disposing)
		{
			if(disposing)
			{
				_positions.Dispose();
			}
			base.Dispose(disposing);
		}

18. Example

Project: lua-tilde
Source File: DockPanel.cs
View license
protected override void Dispose(bool disposing)
		{
			lock (this)
			{
				if (!m_disposed && disposing)
				{
                    m_focusManager.Dispose();
					if (m_mdiClientController != null)
					{
						m_mdiClientController.HandleAssigned -= new EventHandler(MdiClientHandleAssigned);
						m_mdiClientController.MdiChildActivate -= new EventHandler(ParentFormMdiChildActivate);
						m_mdiClientController.Layout -= new LayoutEventHandler(MdiClient_Layout);
						m_mdiClientController.Dispose();
					}
					FloatWindows.Dispose();
					Panes.Dispose();
					DummyContent.Dispose();

					m_disposed = true;
				}
				
				base.Dispose(disposing);
			}
		}

19. Example

View license
protected override void Dispose(bool disposing)
        {
            if (graphicsDeviceService != null)
            {
                graphicsDeviceService.Release(disposing);
                graphicsDeviceService = null;
            }

            base.Dispose(disposing);
        }

20. Example

Project: LibUsbDotNet
Source File: WizardPage.cs
View license
protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
//				//Unregister callbacks
//				ClearChangeNotifications();      
            }
            base.Dispose(disposing);
        }

21. Example

Project: clrprofiler
Source File: TreeListView.cs
View license
protected override void Dispose(bool disposing)
		{
			base.Dispose( disposing );
		}

22. Example

Project: Nexus-Mod-Manager
Source File: DockPanel.cs
View license
protected override void Dispose(bool disposing)
        {
            if (!m_disposed && disposing)
            {
                m_focusManager.Dispose();
                if (m_mdiClientController != null)
                {
                    m_mdiClientController.HandleAssigned -= new EventHandler(MdiClientHandleAssigned);
                    m_mdiClientController.MdiChildActivate -= new EventHandler(ParentFormMdiChildActivate);
                    m_mdiClientController.Layout -= new LayoutEventHandler(MdiClient_Layout);
                    m_mdiClientController.Dispose();
                }
                FloatWindows.Dispose();
                Panes.Dispose();
                DummyContent.Dispose();

                m_disposed = true;
            }
                
            base.Dispose(disposing);
        }

23. Example

View license
protected override void Dispose(bool disposing)
		{
			m_vtbTab.Button.Dispose();
			base.Dispose(disposing);
		}

24. Example

Project: OpenLiveWriter
Source File: SidebarListBox.cs
View license
protected override void Dispose(bool disposing)
        {
            if (disposing)
            {

            }
            base.Dispose(disposing);
        }

25. Example

View license
protected override void Dispose(bool disposing)
        {
            if (disposing)
            {

            }
            base.Dispose(disposing);
        }

26. Example

View license
protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (_thumbnailManager != null)
                {
                    _thumbnailManager.ThumbnailDownloadCompleted -= _thumbnailManager_ThumbnailDownloadCompleted;
                    _thumbnailManager.Dispose();
                }
            }
            base.Dispose(disposing);
        }

27. Example

Project: HTML-Renderer
Source File: HtmlLabel.cs
View license
protected override void Dispose(bool disposing)
        {
            if (_htmlContainer != null)
            {
                _htmlContainer.LoadComplete -= OnLoadComplete;
                _htmlContainer.LinkClicked -= OnLinkClicked;
                _htmlContainer.RenderError -= OnRenderError;
                _htmlContainer.Refresh -= OnRefresh;
                _htmlContainer.StylesheetLoad -= OnStylesheetLoad;
                _htmlContainer.ImageLoad -= OnImageLoad;
                _htmlContainer.Dispose();
                _htmlContainer = null;
            }
            base.Dispose(disposing);
        }

28. Example

Project: HTML-Renderer
Source File: HtmlPanel.cs
View license
protected override void Dispose(bool disposing)
        {
            if (_htmlContainer != null)
            {
                _htmlContainer.LoadComplete -= OnLoadComplete;
                _htmlContainer.LinkClicked -= OnLinkClicked;
                _htmlContainer.RenderError -= OnRenderError;
                _htmlContainer.Refresh -= OnRefresh;
                _htmlContainer.ScrollChange -= OnScrollChange;
                _htmlContainer.StylesheetLoad -= OnStylesheetLoad;
                _htmlContainer.ImageLoad -= OnImageLoad;
                _htmlContainer.Dispose();
                _htmlContainer = null;
            }
            base.Dispose(disposing);
        }

29. Example

Project: EvoNet
Source File: GraphicsDeviceControl.cs
View license
protected override void Dispose(bool disposing)
        {
            if (graphicsDeviceService != null)
            {
                graphicsDeviceService.Release(disposing);
                graphicsDeviceService = null;
            }

            base.Dispose(disposing);
        }

30. Example

Project: PowerPointLabs
Source File: UIThreadExecutor.cs
View license
public static void TearDown()
        {
            if (_isDisposed)
            {
                return;
            }

            _isDisposed = true;
            _instance.Dispose(true);
        }

31. Example

Project: PowerPointLabs
Source File: PPCopy.cs
View license
protected override void Dispose(bool disposing)
        {
            Native.ChangeClipboardChain(handle, nextHandle);
            if (isSuccessful)
            {
                Native.RemoveClipboardFormatListener(handle);
            }
            base.Dispose(disposing);
        }

32. Example

Project: WYZTracker
Source File: PianoControl.cs
View license
protected override void Dispose(bool disposing)
        {
            if(disposing)
            {
                foreach(PianoKey key in keys)
                {
                    key.Dispose();
                }
            }

            base.Dispose(disposing);
        }

33. Example

Project: WYZTracker
Source File: PatternView.cs
View license
protected override void Dispose(bool disposing)
        {
            virtPiano.Dispose();
            base.Dispose(disposing);
        }

34. Example

View license
protected override void Dispose(bool disposing)
        {
            if (disposing)
                _root.Dispose();
            base.Dispose(disposing);
        }

35. Example

Project: ATF
Source File: Cartesian2dCanvas.cs
View license
protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                // The setters will dispose and set to null
                ScaleTextBrush = null;
                ScaleTextFont = null;
                MajorGridlinePen = null;
                MinorGridlinePen = null;
                AxisPen = null;
                AxisLabelFont = null;
            }
            base.Dispose(disposing);
        }

36. Example

Project: ATF
Source File: ArrayEditingControl.cs
View license
protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                m_initialSelectedObject.AttributeChanged -= DomNode_AttributeChanged;
            }

            base.Dispose(disposing);
        }

37. Example

Project: ATF
Source File: Direct2DControl.cs
View license
protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                D2dGraphics.Dispose();
            }
            base.Dispose(disposing);
        }

38. Example

Project: ATF
Source File: GdiCanvas.cs
View license
protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);
        }

39. Example

View license
protected override void Dispose(bool disposing)
        {
            if(disposing)
            {
                foreach(PianoKey key in keys)
                {
                    key.Dispose();
                }
            }

            base.Dispose(disposing);
        }

40. Example

Project: ynoteclassic
Source File: DockPanel.cs
View license
protected override void Dispose(bool disposing)
        {
            if (!m_disposed && disposing)
            {
                m_focusManager.Dispose();
                if (m_mdiClientController != null)
                {
                    m_mdiClientController.HandleAssigned -= MdiClientHandleAssigned;
                    m_mdiClientController.MdiChildActivate -= ParentFormMdiChildActivate;
                    m_mdiClientController.Layout -= MdiClient_Layout;
                    m_mdiClientController.Dispose();
                }
                FloatWindows.Dispose();
                Panes.Dispose();
                DummyContent.Dispose();

                m_disposed = true;
            }

            base.Dispose(disposing);
        }

41. Example

Project: Gum
Source File: GraphicsDeviceControl.cs
View license
protected override void Dispose(bool disposing)
        {
            if (graphicsDeviceService != null)
            {
                graphicsDeviceService.Release(disposing);
                graphicsDeviceService = null;
            }

            base.Dispose(disposing);
        }

42. Example

Project: vrs
Source File: WizardPage.cs
View license
protected override void Dispose( bool disposing ) 
		{
			if( disposing ) 
			{
//				//Unregister callbacks
//				ClearChangeNotifications();      
			}
			base.Dispose( disposing );
		}

43. Example

Project: SquareOne
Source File: DockPanel.cs
View license
protected override void Dispose(bool disposing) {
			if (!m_disposed && disposing) {
				m_focusManager.Dispose();
				if (m_mdiClientController != null) {
					m_mdiClientController.HandleAssigned -= new EventHandler(MdiClientHandleAssigned);
					m_mdiClientController.MdiChildActivate -= new EventHandler(ParentFormMdiChildActivate);
					m_mdiClientController.Layout -= new LayoutEventHandler(MdiClient_Layout);
					m_mdiClientController.Dispose();
				}
				FloatWindows.Dispose();
				Panes.Dispose();
				DummyContent.Dispose();

				m_disposed = true;
			}

			base.Dispose(disposing);
		}

44. Example

Project: ceptr
Source File: DockPanel.cs
View license
protected override void Dispose(bool disposing)
		{
			lock (this)
			{
				if (!m_disposed && disposing)
				{
                    m_focusManager.Dispose();
					if (m_mdiClientController != null)
					{
						m_mdiClientController.HandleAssigned -= new EventHandler(MdiClientHandleAssigned);
						m_mdiClientController.MdiChildActivate -= new EventHandler(ParentFormMdiChildActivate);
						m_mdiClientController.Layout -= new LayoutEventHandler(MdiClient_Layout);
						m_mdiClientController.Dispose();
					}
					FloatWindows.Dispose();
					Panes.Dispose();
					DummyContent.Dispose();

					m_disposed = true;
				}
				
				base.Dispose(disposing);
			}
		}

45. Example

Project: ceptr
Source File: ChromiumWebBrowser.cs
View license
protected override void Dispose(bool disposing)
		{
			FocusHandler = null;
			ResourceHandler = null;

			Cef.RemoveDisposable(this);

			if (disposing)
			{
				if (managedCefBrowserAdapter != null)
				{
					managedCefBrowserAdapter.Dispose();
					managedCefBrowserAdapter = null;
				}
			}
			base.Dispose(disposing);
		}

46. Example

Project: 3DNUS
Source File: ChromiumWebBrowser.cs
View license
protected override void Dispose(bool disposing)
        {
            // Don't utilize any of the handlers anymore:
            this.SetHandlersToNull();

            Cef.RemoveDisposable(this);

            if (disposing)
            {
                IsBrowserInitialized = false;

                if (BrowserSettings != null)
                {
                    BrowserSettings.Dispose();
                    BrowserSettings = null;
                }

                if (parentFormMessageInterceptor != null)
                {
                    parentFormMessageInterceptor.Dispose();
                    parentFormMessageInterceptor = null;
                }

                if (managedCefBrowserAdapter != null)
                {
                    managedCefBrowserAdapter.Dispose();
                    managedCefBrowserAdapter = null;
                }

                // Don't maintain a reference to event listeners anylonger:
                LoadError = null;
                FrameLoadStart = null;
                FrameLoadEnd = null;
                LoadingStateChanged = null;
                ConsoleMessage = null;
                StatusMessage = null;
                AddressChanged = null;
                TitleChanged = null;
                IsBrowserInitializedChanged = null;
            }
            base.Dispose(disposing);
        }

47. Example

View license
protected override void Dispose(bool disposing)
		{
			if (disposing)
				_winformPage.Dispose();
			base.Dispose(disposing);
		}

48. Example

Project: ClearCanvas
Source File: TitleBar.cs
View license
protected override void Dispose(bool disposing)
		{
			if (disposing)
				Application.CurrentUIThemeChanged -= HandleApplicationCurrentUIThemeChanged;
			base.Dispose(disposing);
		}

49. Example

Project: HOPE
Source File: DockPanel.cs
View license
protected override void Dispose(bool disposing)
		{
			lock (this)
			{
				if (!m_disposed && disposing)
				{
                    m_focusManager.Dispose();
					if (m_mdiClientController != null)
					{
						m_mdiClientController.HandleAssigned -= new EventHandler(MdiClientHandleAssigned);
						m_mdiClientController.MdiChildActivate -= new EventHandler(ParentFormMdiChildActivate);
						m_mdiClientController.Layout -= new LayoutEventHandler(MdiClient_Layout);
						m_mdiClientController.Dispose();
					}
					FloatWindows.Dispose();
					Panes.Dispose();
					DummyContent.Dispose();

					m_disposed = true;
				}
				
				base.Dispose(disposing);
			}
		}

50. Example

Project: HOPE
Source File: ChromiumWebBrowser.cs
View license
protected override void Dispose(bool disposing)
		{
			FocusHandler = null;
			ResourceHandler = null;

			Cef.RemoveDisposable(this);

			if (disposing)
			{
				if (managedCefBrowserAdapter != null)
				{
					managedCefBrowserAdapter.Dispose();
					managedCefBrowserAdapter = null;
				}
			}
			base.Dispose(disposing);
		}