Ejemplo n.º 1
0
        public LayerControl()
        {
            this.elementHeight = 2 + SystemLayer.UI.ScaleWidth(LayerElement.ThumbSizePreScaling);

            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();

            elementClickDelegate = new EventHandler(ElementClickHandler);
            elementDoubleClickDelegate = new EventHandler(ElementDoubleClickHandler);
            documentChangedDelegate = new EventHandler(DocumentChangedHandler);
            documentChangingDelegate = new EventHandler<Document>(DocumentChangingHandler);
            layerInsertedDelegate = new IndexEventHandler(LayerInsertedHandler);
            layerRemovedDelegate = new IndexEventHandler(LayerRemovedHandler);
            layerChangedDelegate = new EventHandler(LayerChangedHandler);
            keyUpDelegate = new KeyEventHandler(KeyUpHandler);

            this.thumbnailManager = new ThumbnailManager(this);
            this.thumbnailSize = SystemLayer.UI.ScaleWidth(LayerElement.ThumbSizePreScaling);
            layerControls = new List<LayerElement>();
        }
Ejemplo n.º 2
0
        public DocumentStrip()
        {
            PdnBaseForm.RegisterFormHotKey(Keys.Control | Keys.Tab, OnNextTabHotKeyPressed);
            PdnBaseForm.RegisterFormHotKey(Keys.Control | Keys.PageDown, OnNextTabHotKeyPressed);
            PdnBaseForm.RegisterFormHotKey(Keys.Control | Keys.Shift | Keys.Tab, OnPreviousTabHotKeyPressed);
            PdnBaseForm.RegisterFormHotKey(Keys.Control | Keys.PageUp, OnPreviousTabHotKeyPressed);

            thumbnailManager = new ThumbnailManager(this); // allow for a 1px black border

            InitializeComponent();

            for (int i = 0; i <= 9; ++i)
            {
                Keys digit = Utility.LetterOrDigitCharToKeys((char)(i + '0'));
                PdnBaseForm.RegisterFormHotKey(Keys.Control | digit, OnDigitHotKeyPressed);
                PdnBaseForm.RegisterFormHotKey(Keys.Alt | digit, OnDigitHotKeyPressed);
            }

            this.ShowCloseButtons = true;
        }
Ejemplo n.º 3
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                while (this.documents.Count > 0)
                {
                    RemoveDocumentWorkspace(this.documents[this.documents.Count - 1]);
                }

                if (this.thumbnailManager != null)
                {
                    this.thumbnailManager.Dispose();
                    this.thumbnailManager = null;
                }

                foreach (DocumentWorkspace dw in this.thumbs.Keys)
                {
                    RenderArgs ra = this.thumbs[dw];
                    ra.Dispose();
                }

                this.thumbs.Clear();
                this.thumbs = null;
            }

            base.Dispose(disposing);
        }
Ejemplo n.º 4
0
        /// <summary> 
        /// Clean up any resources being used.
        /// </summary>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (components != null)
                {
                    components.Dispose();
                    components = null;
                }

                if (this.thumbnailManager != null)
                {
                    this.thumbnailManager.Dispose();
                    this.thumbnailManager = null;
                }
            }

            base.Dispose(disposing);
        }