private void ThumbnailContainer_DoubleClick(object sender, EventArgs e) { ThumbnailContainer thumbnailContainer = sender as ThumbnailContainer; if (thumbnailContainer != null) { _worker.OpenMediaFile(thumbnailContainer.MediaFile, true); } }
private void SelectThumbnail(ThumbnailContainer thumbnailContainer) { if (_worker.SelectedFile != null && _fileCollection.ContainsKey(_worker.SelectedFile)) { ThumbnailContainer oldThumbnailContainer = _fileCollection[_worker.SelectedFile]; oldThumbnailContainer.Deselect(); } thumbnailContainer.Select(); _worker.SelectedFile = thumbnailContainer.MediaFile; }
private void ThumbnailContainer_GotFocus(object sender, EventArgs e) { ThumbnailContainer thumbnailContainer = sender as ThumbnailContainer; if (thumbnailContainer != null) { SelectThumbnail(thumbnailContainer); UpdateProperties(thumbnailContainer.MediaFile); } }
private void ShowThumbnailContextMenu(ThumbnailContainer thumbnailContainer, Point point) { toolStripMenuItemThumbnailOpenImage.Visible = (thumbnailContainer.MediaFile is ImageFile); toolStripMenuItemThumbnailOpenImage.Enabled = thumbnailContainer.MediaFile.Exists(); toolStripMenuItemThumbnailOpenImage.Tag = thumbnailContainer; toolStripMenuItemThumbnailOpenPreview.Visible = (thumbnailContainer.MediaFile is VideoFile); toolStripMenuItemThumbnailOpenPreview.Tag = thumbnailContainer; toolStripMenuItemThumbnailPlayVideo.Visible = (thumbnailContainer.MediaFile is VideoFile); toolStripMenuItemThumbnailPlayVideo.Enabled = thumbnailContainer.MediaFile.Exists(); toolStripMenuItemThumbnailPlayVideo.Tag = thumbnailContainer; contextMenuStripThumbnail.Show(point); }
private void ThumbnailContainer_Click(object sender, MouseEventArgs e) { ThumbnailContainer thumbnailContainer = sender as ThumbnailContainer; if (thumbnailContainer != null) { thumbnailContainer.Focus(); if (e.Button == MouseButtons.Right) { ShowThumbnailContextMenu(thumbnailContainer, e.Location); } } }
private void toolStripMenuItemThumbnailPlayVideo_Click(object sender, EventArgs e) { ToolStripItem toolStripItem = sender as ToolStripItem; if (toolStripItem != null) { ThumbnailContainer thumbnailContainer = toolStripItem.Tag as ThumbnailContainer; if (thumbnailContainer != null) { _worker.OpenMediaFile(thumbnailContainer.MediaFile); } } }
private void CreateThumbnails(MediaFolder folder) { flowLayoutPanel.SuspendLayout(); foreach (MediaFile mediaFile in folder.Files) { ThumbnailContainer thumbnailContainer = new ThumbnailContainer(mediaFile); thumbnailContainer.ThumbnailClicked += ThumbnailContainer_Click; thumbnailContainer.ThumbnailDoubleClicked += ThumbnailContainer_DoubleClick; thumbnailContainer.ThumbnailGotFocus += ThumbnailContainer_GotFocus; _fileCollection.Add(mediaFile, thumbnailContainer); flowLayoutPanel.Controls.Add(thumbnailContainer); } flowLayoutPanel.ResumeLayout(true); }
// Token: 0x06001FC7 RID: 8135 RVA: 0x0006917C File Offset: 0x0006737C public void method_6(Class140 data) { EventHandler eventHandler = null; EventHandler eventHandler2 = null; ThumbnailStrip.Class314 @class = new ThumbnailStrip.Class314(); @class.thumbnailStrip_0 = this; ThumbnailContainer thumbnailContainer = null; @class.class131_0 = null; try { thumbnailContainer = new ThumbnailContainer(); thumbnailContainer.Size = new Size(178, 146); thumbnailContainer.FileName = data.FileName; thumbnailContainer.Image = data.bitmap_0; @class.class131_0 = new ThumbnailStrip.Class131(data, thumbnailContainer); ThumbnailContainer thumbnailContainer2 = thumbnailContainer; if (eventHandler == null) { eventHandler = new EventHandler(@class.method_0); } thumbnailContainer2.ButtonSelected += eventHandler; ThumbnailContainer thumbnailContainer3 = thumbnailContainer; if (eventHandler2 == null) { eventHandler2 = new EventHandler(@class.method_1); } thumbnailContainer3.ShowScreenshot += eventHandler2; this.dictionary_0.Add(@class.class131_0.class140_0.FileName, @class.class131_0); this.class299_0.method_0(@class.class131_0); } catch { if (thumbnailContainer != null) { thumbnailContainer.Dispose(); } if (@class.class131_0 != null) { @class.class131_0.Dispose(); } throw; } }
private void MainWorker_ThumbnailAvailable(object sender, MediaFileEventArgs e) { try { if (InvokeRequired) { Invoke(new EventHandler <MediaFileEventArgs>(MainWorker_ThumbnailAvailable), new object[] { sender, e }); } else { if (e.File.ThumbnailImage != null && _fileCollection.ContainsKey(e.File)) { ThumbnailContainer thumbnailContainer = _fileCollection[e.File]; thumbnailContainer.SetThumbnail(e.File.ThumbnailImage, new Point(10 + (200 - e.File.ThumbnailImage.Size.Width) / 2, 10)); } } } catch (Exception ex) { FormUtilities.ShowError(this, ex); } }
// Token: 0x06001FDA RID: 8154 RVA: 0x0000CD0F File Offset: 0x0000AF0F public Class131(Class140 data, ThumbnailContainer control) { this.class140_0 = data; this.thumbnailContainer_0 = control; }