protected override void Dispose(bool disposing) { if (_disposed || !disposing) { return; } if (_projectExplorerContextMenu != null) { _projectExplorerContextMenu.Dispose(); } if (_todoItemsMenu != null) { _todoItemsMenu.Dispose(); } if (_refactorMenu != null) { _refactorMenu.Dispose(); } if (_codeExplorerMenu != null) { _codeExplorerMenu.Dispose(); } if (_testMenu != null) { _testMenu.Dispose(); } if (_codeInspectionsMenu != null) { _codeInspectionsMenu.Dispose(); } _about.Click -= OnAboutClick; _settings.Click -= OnOptionsClick; _sourceControl.Click -= OnSourceControlClick; var menuBarControls = IDE.CommandBars[1].Controls; menuBarControls.Parent.FindControl(_menu.Type, _menu.Id, _menu.Tag, _menu.Visible).Delete(); _disposed = true; base.Dispose(true); }
protected override void Dispose(bool disposing) { if (_disposed) { return; } if (disposing) { if (_todoItemsMenu != null) { _todoItemsMenu.Dispose(); } if (_refactorMenu != null) { _refactorMenu.Dispose(); } if (_codeExplorerMenu != null) { _codeExplorerMenu.Dispose(); } if (_testMenu != null) { _testMenu.Dispose(); } if (_codeInspectionsMenu != null) { _codeInspectionsMenu.Dispose(); } } _disposed = true; base.Dispose(disposing); }