private void videoThumbnailControl_ThumbnailRemoved(object sender, InputFileObjectEventArgs e) { // remove control foreach (Control c in inputFilesPanel.Controls) { var h = c as RawVideoThumbnailControl; if (h != null && h.InputFileObject == e.InputFileObject) { inputFilesPanel.Controls.Remove(h); h.Dispose(); } } MainModel.InputFileObjects.Remove(e.InputFileObject); if (MainModel.InputFileObjects.Count == 0) { ClearVideos(); // go back to big drop image scanButton.Visible = false; } }
private void videoThumbnailControl_ThumbnailClicked(object sender, InputFileObjectEventArgs e) { var p = new Process(); p.StartInfo.FileName = e.InputFileObject.SourceFileInfo.FullName; try { p.Start(); } catch (Exception ex) { Logger.Error("Exception playing " + e.InputFileObject.SourceFileInfo.FullName + ": " + ex); } }