public void Dispose(bool disposing) { if (disposing) { // Dispose managed resources if (_tabbedThumbnailPreview != null) { _tabbedThumbnailPreview.Dispose(); } _tabbedThumbnailPreview = null; if (ThumbnailToolbarProxyWindow != null) { ThumbnailToolbarProxyWindow.Dispose(); } ThumbnailToolbarProxyWindow = null; if (TabbedThumbnailProxyWindow != null) { TabbedThumbnailProxyWindow.Dispose(); } TabbedThumbnailProxyWindow = null; // Don't dispose the thumbnail buttons as they might be used in another window. // Setting them to null will indicate we don't need use anymore. _thumbnailButtons = null; } }
internal TaskbarWindow(TabbedThumbnail preview) { if (preview == null) { throw new ArgumentNullException("preview"); } // Create our proxy window // Bug: This is only called in this constructor. Which will cause the property // to fail if TaskbarWindow is initialized from a different constructor. TabbedThumbnailProxyWindow = new TabbedThumbnailProxyWindow(preview); // set our current state EnableThumbnailToolbars = false; EnableTabbedThumbnails = true; // copy values UserWindowHandle = preview.WindowHandle; WindowsControl = preview.WindowsControl; TabbedThumbnail = preview; }