stepByStep framerate & gui fixes

This commit is contained in:
N00MKRAD
2020-12-02 01:09:41 +01:00
parent becc579376
commit 596c3148c9
5 changed files with 12 additions and 8 deletions

View File

@@ -1348,6 +1348,7 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
this.ClientSize = new System.Drawing.Size(934, 501);
this.Controls.Add(this.cancelBtn);
this.Controls.Add(this.stepSelector);
this.Controls.Add(this.runStepBtn);
this.Controls.Add(this.updateBtn);
@@ -1358,7 +1359,6 @@
this.Controls.Add(this.patreonBtn);
this.Controls.Add(this.paypalBtn);
this.Controls.Add(this.discordBtn);
this.Controls.Add(this.cancelBtn);
this.Controls.Add(this.longProgBar);
this.Controls.Add(this.installerBtn);
this.Controls.Add(this.panel1);

View File

@@ -80,6 +80,7 @@ namespace Flowframes
public BatchEntry GetBatchEntry()
{
SetTab("interpolate");
return new BatchEntry(inputTbox.Text.Trim(), outputTbox.Text.Trim(), GetAi(), fpsInTbox.GetFloat(), interpFactorCombox.GetInt(), GetOutMode());
}
@@ -152,12 +153,11 @@ namespace Flowframes
public void runBtn_Click(object sender, EventArgs e)
{
SetTab("interpolate");
if (!BatchProcessing.busy)
SetTab("interpolation");
if (fpsInTbox.Visible)
Interpolate.SetFps(fpsInTbox.GetFloat());
if (interpFactorCombox.Visible)
Interpolate.interpFactor = interpFactorCombox.GetInt();
Interpolate.SetFps(fpsInTbox.GetFloat());
Interpolate.interpFactor = interpFactorCombox.GetInt();
string inPath = inputTbox.Text.Trim();
string outPath = outputTbox.Text.Trim();
Interpolate.Start(inPath, outPath, tilesize.GetInt(), GetOutMode(), GetAi());
@@ -228,7 +228,7 @@ namespace Flowframes
public void SetWorking(bool state)
{
Control[] controlsToDisable = new Control[] { runBtn, settingsBtn, installerBtn };
Control[] controlsToDisable = new Control[] { runBtn, runStepBtn, settingsBtn, installerBtn };
Program.busy = state;
foreach (Control c in controlsToDisable)
c.Enabled = !state;
@@ -372,10 +372,13 @@ namespace Flowframes
bool stepByStep = Config.GetInt("processingMode") == 1;
stepSelector.Visible = stepByStep;
runStepBtn.Visible = stepByStep;
runBtn.Visible = !stepByStep;
}
private async void runStepBtn_Click(object sender, EventArgs e)
{
SetTab("interpolate");
Interpolate.SetFps(fpsInTbox.GetFloat());
await InterpolateSteps.Run(stepSelector.Text);
}

View File

@@ -146,7 +146,7 @@ namespace Flowframes
if (!Directory.Exists(currentFramesPath) || IOUtils.GetAmountOfFiles(currentFramesPath, false, "*.png") <= 0)
{
Cancel("Failed to extract frames from input video!");
Cancel("Input frames folder is empty!");
}
if (Config.GetInt("dedupMode") == 1)

View File

@@ -119,7 +119,7 @@ namespace Flowframes.Main
public static async Task DoInterpolate ()
{
currentFramesPath = Path.Combine(currentInterpFramesDir, Paths.framesDir);
currentFramesPath = Path.Combine(currentTempDir, Paths.framesDir);
if (!Directory.Exists(currentFramesPath))
{
InterpolateUtils.ShowMessage("There are no extracted frames that can be interpolated!\nDid you run the extraction step?", "Error");

View File

@@ -17,6 +17,7 @@ namespace Flowframes.UI
{
public static async Task InitInput (TextBox outputTbox, TextBox inputTbox, TextBox fpsInTbox)
{
Program.mainForm.SetTab("interpolate");
outputTbox.Text = inputTbox.Text.Trim().GetParentDir();
string path = inputTbox.Text.Trim();
Program.lastInputPath = path;