public void DragDropHandler(string[] files) { if (Program.busy) { return; } if (files.Length > 1) { queueBtn_Click(null, null); if (BatchProcessing.currentBatchForm != null) { BatchProcessing.currentBatchForm.LoadDroppedPaths(files); } } else { SetTab("interpolation"); Logger.Log("Selected video/directory: " + Path.GetFileName(files[0])); inputTbox.Text = files[0]; bool resume = (IOUtils.GetAmountOfFiles(Path.Combine(files[0], Paths.resumeDir), true) > 0); ResumeUtils.resumeNextRun = resume; if (resume) { ResumeUtils.LoadTempFolder(files[0]); } trimCombox.SelectedIndex = 0; MainUiFunctions.InitInput(outputTbox, inputTbox, fpsInTbox); } }
public void LoadBatchEntry(InterpSettings entry) { inputTbox.Text = entry.inPath; MainUiFunctions.SetOutPath(outputTbox, entry.outPath); interpFactorCombox.Text = entry.interpFactor.ToString(); aiCombox.SelectedIndex = Implementations.networks.IndexOf(Implementations.networks.Where(x => x.aiName == entry.ai.aiName).FirstOrDefault()); SetOutMode(entry.outMode); }
public static async Task <Size> GetVideoOrFramesRes(string path) { Size res = new Size(); if (!IsPathDirectory(path)) // If path is video { res = GetVideoRes(path); } else // Path is frame folder { Image thumb = await MainUiFunctions.GetThumbnail(path); res = new Size(thumb.Width, thumb.Height); } return(res); }
public static async Task <Size> GetVideoOrFramesRes(string path) { Size res = new Size(); try { if (!IsPathDirectory(path)) // If path is video { res = GetVideoRes(path); } else // Path is frame folder { Image thumb = await MainUiFunctions.GetThumbnail(path); res = new Size(thumb.Width, thumb.Height); } } catch (Exception e) { Logger.Log("GetVideoOrFramesRes Error: " + e.Message); } return(res); }
public void ValidateFactor() { interpFactorCombox.Text = $"x{MainUiFunctions.ValidateInterpFactor(interpFactorCombox.GetFloat())}"; }