mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-17 00:47:48 +01:00
File import splash, disable input file drive check by default
This commit is contained in:
@@ -450,9 +450,14 @@ namespace Flowframes.Forms.Main
|
|||||||
_mainTabInitialized = true;
|
_mainTabInitialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Initialized()
|
public static void CloseAllSplashForms ()
|
||||||
{
|
{
|
||||||
Application.OpenForms.OfType<SplashForm>().ToList().ForEach(f => f.Close());
|
Application.OpenForms.OfType<SplashForm>().ToList().ForEach(f => f.Close());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Initialized()
|
||||||
|
{
|
||||||
|
CloseAllSplashForms();
|
||||||
|
|
||||||
_initialized = true;
|
_initialized = true;
|
||||||
runBtn.Enabled = true;
|
runBtn.Enabled = true;
|
||||||
|
|||||||
@@ -8,12 +8,17 @@ namespace Flowframes.Forms
|
|||||||
public enum TextSize { Small, Medium, Large }
|
public enum TextSize { Small, Medium, Large }
|
||||||
private static readonly string[] fontPresets = { "Yu Gothic UI, 14pt", "Yu Gothic UI, 18pt", "Yu Gothic UI, 21.75pt" };
|
private static readonly string[] fontPresets = { "Yu Gothic UI, 14pt", "Yu Gothic UI, 18pt", "Yu Gothic UI, 21.75pt" };
|
||||||
|
|
||||||
public SplashForm(string status = "", bool topMost = true, TextSize textSize = TextSize.Large)
|
public SplashForm(string status = "", bool topMost = true, TextSize textSize = TextSize.Large, bool show = true)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
SetStatus(status);
|
SetStatus(status);
|
||||||
TopMost = topMost;
|
TopMost = topMost;
|
||||||
statusLabel.Font = (Font)new FontConverter().ConvertFromInvariantString(fontPresets[(int)textSize]);
|
statusLabel.Font = (Font)new FontConverter().ConvertFromInvariantString(fontPresets[(int)textSize]);
|
||||||
|
|
||||||
|
if (show)
|
||||||
|
{
|
||||||
|
Show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SplashForm_Load(object sender, System.EventArgs e)
|
private void SplashForm_Load(object sender, System.EventArgs e)
|
||||||
|
|||||||
@@ -16,8 +16,7 @@ namespace Flowframes.Media
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
Logger.Log($"Detecting hardare encoding support...");
|
Logger.Log($"Detecting hardare encoding support...");
|
||||||
SplashForm statusForm = new SplashForm("Checking hardware encoders...", textSize: SplashForm.TextSize.Medium);
|
var statusForm = new SplashForm("Checking hardware encoders...", textSize: SplashForm.TextSize.Medium);
|
||||||
statusForm.Show();
|
|
||||||
|
|
||||||
var previousMainFormOpacity = Program.mainForm.Opacity;
|
var previousMainFormOpacity = Program.mainForm.Opacity;
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ namespace Flowframes
|
|||||||
Application.EnableVisualStyles();
|
Application.EnableVisualStyles();
|
||||||
Application.SetCompatibleTextRenderingDefault(false);
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
var splash = new SplashForm("Starting Flowframes...");
|
var splash = new SplashForm("Starting Flowframes...");
|
||||||
splash.Show();
|
|
||||||
|
|
||||||
// Force culture to en-US across entire application (to avoid number parsing issues etc)
|
// Force culture to en-US across entire application (to avoid number parsing issues etc)
|
||||||
var culture = new CultureInfo("en-US");
|
var culture = new CultureInfo("en-US");
|
||||||
@@ -61,8 +60,8 @@ namespace Flowframes
|
|||||||
|
|
||||||
Paths.Init();
|
Paths.Init();
|
||||||
Config.Init();
|
Config.Init();
|
||||||
Task.Run(() => DiskSpaceCheckLoop());
|
|
||||||
Logger.Log($"Command Line: {Environment.CommandLine}", true);
|
Logger.Log($"Command Line: {Environment.CommandLine}", true);
|
||||||
|
Task.Run(() => DiskSpaceCheckLoop());
|
||||||
|
|
||||||
LaunchGui();
|
LaunchGui();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ using System.Threading.Tasks;
|
|||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Flowframes.Data;
|
using Flowframes.Data;
|
||||||
using Flowframes.MiscUtils;
|
using Flowframes.MiscUtils;
|
||||||
|
using Flowframes.Forms;
|
||||||
|
using Flowframes.Forms.Main;
|
||||||
|
|
||||||
namespace Flowframes.Ui
|
namespace Flowframes.Ui
|
||||||
{
|
{
|
||||||
@@ -34,10 +36,12 @@ namespace Flowframes.Ui
|
|||||||
if (Config.GetBool(Config.Key.clearLogOnInput))
|
if (Config.GetBool(Config.Key.clearLogOnInput))
|
||||||
Logger.ClearLogBox();
|
Logger.ClearLogBox();
|
||||||
|
|
||||||
|
var importSplash = new SplashForm("Importing...", topMost: false);
|
||||||
|
|
||||||
SetOutPath(outputTbox, inputTbox.Text.Trim().GetParentDir());
|
SetOutPath(outputTbox, inputTbox.Text.Trim().GetParentDir());
|
||||||
|
|
||||||
Program.lastInputPath = path;
|
Program.lastInputPath = path;
|
||||||
Program.lastInputPathIsSsd = OsUtils.DriveIsSSD(path);
|
Program.lastInputPathIsSsd = Config.GetBool("checkInputFileDriveType", false) && OsUtils.DriveIsSSD(path);
|
||||||
|
|
||||||
if (!Program.lastInputPathIsSsd)
|
if (!Program.lastInputPathIsSsd)
|
||||||
Logger.Log("Your file seems to be on an HDD or USB device. It is recommended to interpolate videos on an SSD drive for best performance.");
|
Logger.Log("Your file seems to be on an HDD or USB device. It is recommended to interpolate videos on an SSD drive for best performance.");
|
||||||
@@ -70,6 +74,8 @@ namespace Flowframes.Ui
|
|||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
|
|
||||||
|
Form1.CloseAllSplashForms();
|
||||||
|
|
||||||
if (!Cli.AutoRun)
|
if (!Cli.AutoRun)
|
||||||
{
|
{
|
||||||
Program.mainForm.Enabled = true;
|
Program.mainForm.Enabled = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user