Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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);
        }
Esempio n. 5
0
 public void ValidateFactor()
 {
     interpFactorCombox.Text = $"x{MainUiFunctions.ValidateInterpFactor(interpFactorCombox.GetFloat())}";
 }