コード例 #1
0
        /// <summary>
        /// Moves to the given thumbnail in the sequence.
        /// </summary>
        public void MoveToThumbnail(ThumbnailBox thumbnail)
        {
            if (thumbnail != null)
            {
                this.SuspendLayout();

                SetThumbnailSelection(false);
                currentThumbnail = thumbnail;
                SetThumbnailSelection(true);
                ScrollControlIntoView(currentThumbnail);

                this.ResumeLayout(true);
            }
        }
コード例 #2
0
        private ThumbnailBox GenerateThumbnailHelper(int i)
        {
            ThumbnailBox tb = new ThumbnailBox(this, i, imageFiles[i]);
            ////////////////////////////////////////////////////////////
            //Raise event
            GeneratingEventArgs e = new GeneratingEventArgs(tb);

            e.Index = i;
            OnGeneratingThumbnailItem(this, e);

            this.Controls.Add(tb);

            if (currentThumbnail == null)
            {
                MoveToThumbnail(tb);
            }

            return(tb);
        }
コード例 #3
0
        private ThumbnailBox GenerateThumbnailHelper(int i)
        {
            ThumbnailBox tb = new ThumbnailBox(this, i, imageFiles[i]);
            ////////////////////////////////////////////////////////////
            //Raise event
            GeneratingEventArgs e = new GeneratingEventArgs(tb);
            e.Index = i;
            OnGeneratingThumbnailItem(this, e);

            this.Controls.Add(tb);

            if (currentThumbnail == null)
                MoveToThumbnail(tb);

            return tb;
        }
コード例 #4
0
        /// <summary>
        /// Moves to the given thumbnail in the sequence.
        /// </summary>
        public void MoveToThumbnail(ThumbnailBox thumbnail)
        {
            if (thumbnail != null)
            {
                this.SuspendLayout();

                SetThumbnailSelection(false);
                currentThumbnail = thumbnail;
                SetThumbnailSelection(true);
                ScrollControlIntoView(currentThumbnail);

                this.ResumeLayout(true);
            }
        }
コード例 #5
0
        /// <summary>
        /// Removes the thumbnails from the container control.
        /// </summary>
        public void DisposeOfPreviousThumbnails()
        {
            this.currentThumbnail = null;

            foreach (ThumbnailBox thumbnail in this.Controls)
                thumbnail.Dispose();

            this.Controls.Clear();

            foreach (ImageFile anImageFile in imageFiles)
                anImageFile.Dispose();
        }
コード例 #6
0
        private void SetThumbnailImage(object index)
        {
            ThumbnailBox aThumbnailBox = (ThumbnailBox)this.Controls[(int)index];

            aThumbnailBox.SetThumbnailImageThread();
        }