Наследование: System.Windows.Forms.NativeWindow, IDisposable
Пример #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("userWindowHandle");
            }

            if (buttons == null || buttons.Length == 0)
            {
                throw new ArgumentException("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
        public 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;
        }
Пример #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("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;
        }
Пример #6
0
        internal TaskbarWindow(IntPtr userWindowHandle, params 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);
            ThumbnailToolbarProxyWindow.TaskbarWindow = this;

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

            //
            this.ThumbnailButtons = buttons;
            UserWindowHandle = userWindowHandle;
            WindowsControl = null;
        }
Пример #7
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("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;
        }
        internal TaskbarWindow(System.Windows.UIElement windowsControl, params ThumbnailToolBarButton[] buttons)
        {
            if (windowsControl == null)
            {
                throw new ArgumentNullException(nameof(windowsControl));
            }

            if (buttons == null || buttons.Length == 0)
            {
                throw new ArgumentException(LocalizedMessages.TaskbarWindowEmptyButtonArray, nameof(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;
        }