/// <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); } }
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); }
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; }
/// <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(); }
private void SetThumbnailImage(object index) { ThumbnailBox aThumbnailBox = (ThumbnailBox)this.Controls[(int)index]; aThumbnailBox.SetThumbnailImageThread(); }