예제 #1
0
        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;
            }
        }
예제 #2
0
        internal TaskbarWindow(IntPtr userWindowHandle, params ThumbnailToolBarButton[] buttons)
        {
            if (userWindowHandle == IntPtr.Zero)
            {
                throw new ArgumentException(LocalizedMessages.CommonFileDialogInvalidHandle, "userWindowHandle");
            }

            if (buttons == null || buttons.Length == 0)
            {
                throw new ArgumentException(LocalizedMessages.TaskbarWindowEmptyButtonArray, "buttons");
            }

            // Create our proxy window
            ThumbnailToolbarProxyWindow = new ThumbnailToolbarProxyWindow(userWindowHandle, buttons);
            ThumbnailToolbarProxyWindow.TaskbarWindow = this;

            // Set our current state
            EnableThumbnailToolbars = true;
            EnableTabbedThumbnails  = false;

            //
            this.ThumbnailButtons = buttons;
            UserWindowHandle      = userWindowHandle;
            WindowsControl        = null;
        }
예제 #3
0
        internal TaskbarWindow(System.Windows.UIElement windowsControl, params ThumbnailToolBarButton[] buttons)
        {
            if (windowsControl == null)
            {
                throw new ArgumentNullException("windowsControl");
            }

            if (buttons == null || buttons.Length == 0)
            {
                throw new ArgumentException(LocalizedMessages.TaskbarWindowEmptyButtonArray, "buttons");
            }

            // Create our proxy window
            ThumbnailToolbarProxyWindow = new ThumbnailToolbarProxyWindow(windowsControl, buttons);
            ThumbnailToolbarProxyWindow.TaskbarWindow = this;

            // Set our current state
            EnableThumbnailToolbars = true;
            EnableTabbedThumbnails  = false;

            this.ThumbnailButtons = buttons;
            UserWindowHandle      = IntPtr.Zero;
            WindowsControl        = windowsControl;
        }
예제 #4
0
        internal TaskbarWindow(IntPtr userWindowHandle, params ThumbnailToolBarButton[] buttons)
        {
            if (userWindowHandle == IntPtr.Zero)
            {
                throw new ArgumentException(LocalizedMessages.CommonFileDialogInvalidHandle, "userWindowHandle");
            }

            if (buttons == null || buttons.Length == 0)
            {
                throw new ArgumentException(LocalizedMessages.TaskbarWindowEmptyButtonArray, "buttons");
            }

            // Create our proxy window
            ThumbnailToolbarProxyWindow = new ThumbnailToolbarProxyWindow(userWindowHandle, buttons);
            ThumbnailToolbarProxyWindow.TaskbarWindow = this;

            // Set our current state
            EnableThumbnailToolbars = true;
            EnableTabbedThumbnails = false;

            //
            this.ThumbnailButtons = buttons;
            UserWindowHandle = userWindowHandle;
            WindowsControl = null;
        }
예제 #5
0
        internal TaskbarWindow(System.Windows.UIElement windowsControl, params ThumbnailToolBarButton[] buttons)
        {
            if (windowsControl == null)
            {
                throw new ArgumentNullException("windowsControl");
            }

            if (buttons == null || buttons.Length == 0)
            {
                throw new ArgumentException(LocalizedMessages.TaskbarWindowEmptyButtonArray, "buttons");
            }

            // Create our proxy window
            ThumbnailToolbarProxyWindow = new ThumbnailToolbarProxyWindow(windowsControl, buttons);
            ThumbnailToolbarProxyWindow.TaskbarWindow = this;

            // Set our current state
            EnableThumbnailToolbars = true;
            EnableTabbedThumbnails = false;

            this.ThumbnailButtons = buttons;
            UserWindowHandle = IntPtr.Zero;
            WindowsControl = windowsControl;
        }