void Dispose(bool disposing) { if (!disposing) { return; } if (_thumbnailToolbarProxyWindow != null) { _thumbnailToolbarProxyWindow.Dispose(); } _thumbnailToolbarProxyWindow = 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; }
public TaskbarWindow(IntPtr userWindowHandle, ThumbnailToolbarButton[] buttons) { if (userWindowHandle == IntPtr.Zero) { throw new ArgumentException("userWindowHandle"); } if (buttons == null || buttons.Length == 0) { throw new ArgumentException("buttons"); } // Create our proxy window _thumbnailToolbarProxyWindow = new ThumbnailToolbarProxyWindow(userWindowHandle, buttons) { TaskbarWindow = this }; // Set our current state ThumbnailButtons = buttons; WindowHandle = userWindowHandle; }