mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-23 19:59:31 +01:00
Ask if temp folder should be deleted after cancelling
This commit is contained in:
@@ -197,7 +197,11 @@ namespace Flowframes
|
|||||||
Program.mainForm.SetStatus("Canceled.");
|
Program.mainForm.SetStatus("Canceled.");
|
||||||
Program.mainForm.SetProgress(0);
|
Program.mainForm.SetProgress(0);
|
||||||
if (Config.GetInt("processingMode") == 0 && !Config.GetBool("keepTempFolder"))
|
if (Config.GetInt("processingMode") == 0 && !Config.GetBool("keepTempFolder"))
|
||||||
|
{
|
||||||
|
DialogResult dialogResult = MessageBox.Show($"Delete the temp folder (Yes) or keep it for resuming later (No)?", "Delete temporary files?", MessageBoxButtons.YesNo);
|
||||||
|
if (dialogResult == DialogResult.Yes)
|
||||||
IOUtils.TryDeleteIfExists(current.tempFolder);
|
IOUtils.TryDeleteIfExists(current.tempFolder);
|
||||||
|
}
|
||||||
AutoEncode.busy = false;
|
AutoEncode.busy = false;
|
||||||
Program.mainForm.SetWorking(false);
|
Program.mainForm.SetWorking(false);
|
||||||
Program.mainForm.SetTab("interpolation");
|
Program.mainForm.SetTab("interpolation");
|
||||||
|
|||||||
@@ -57,8 +57,9 @@ namespace Flowframes.Main
|
|||||||
|
|
||||||
foreach (KeyValuePair<string, string> entry in AiProcess.filenameMap)
|
foreach (KeyValuePair<string, string> entry in AiProcess.filenameMap)
|
||||||
{
|
{
|
||||||
if (counter % 500 == 0) await Task.Delay(1);
|
if (counter % 1000 == 0) await Task.Delay(1);
|
||||||
fileContent += $"{entry.Key}|{entry.Value}\n";
|
fileContent += $"{entry.Key}|{entry.Value}\n";
|
||||||
|
counter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
File.WriteAllText(filePath, fileContent);
|
File.WriteAllText(filePath, fileContent);
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ using System.Runtime.InteropServices;
|
|||||||
[assembly: AssemblyCopyright("Copyright © 2020")]
|
[assembly: AssemblyCopyright("Copyright © 2020")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
[assembly: System.Resources.NeutralResourcesLanguage("en-US")]
|
||||||
|
|
||||||
|
|
||||||
// Setting ComVisible to false makes the types in this assembly not visible
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
// to COM components. If you need to access a type in this assembly from
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
|||||||
@@ -74,11 +74,7 @@ namespace Flowframes.UI
|
|||||||
string msg = $"A temporary folder for this video already exists. It contains {scnFrames}, {srcFrames}, {interpFrames}.";
|
string msg = $"A temporary folder for this video already exists. It contains {scnFrames}, {srcFrames}, {interpFrames}.";
|
||||||
|
|
||||||
DialogResult dialogResult = MessageBox.Show($"{msg}\n\nClick \"Yes\" to use the existing files or \"No\" to delete them.", "Use files from existing temp folder?", MessageBoxButtons.YesNo);
|
DialogResult dialogResult = MessageBox.Show($"{msg}\n\nClick \"Yes\" to use the existing files or \"No\" to delete them.", "Use files from existing temp folder?", MessageBoxButtons.YesNo);
|
||||||
if (dialogResult == DialogResult.Yes)
|
if (dialogResult == DialogResult.No)
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (dialogResult == DialogResult.No)
|
|
||||||
{
|
{
|
||||||
IOUtils.TryDeleteIfExists(tmpFolder);
|
IOUtils.TryDeleteIfExists(tmpFolder);
|
||||||
Logger.Log("Deleted old temp folder.");
|
Logger.Log("Deleted old temp folder.");
|
||||||
|
|||||||
Reference in New Issue
Block a user