mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-16 08:27:44 +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;
|
||||
}
|
||||
|
||||
public void Initialized()
|
||||
public static void CloseAllSplashForms ()
|
||||
{
|
||||
Application.OpenForms.OfType<SplashForm>().ToList().ForEach(f => f.Close());
|
||||
}
|
||||
|
||||
public void Initialized()
|
||||
{
|
||||
CloseAllSplashForms();
|
||||
|
||||
_initialized = true;
|
||||
runBtn.Enabled = true;
|
||||
|
||||
@@ -8,12 +8,17 @@ namespace Flowframes.Forms
|
||||
public enum TextSize { Small, Medium, Large }
|
||||
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();
|
||||
SetStatus(status);
|
||||
TopMost = topMost;
|
||||
statusLabel.Font = (Font)new FontConverter().ConvertFromInvariantString(fontPresets[(int)textSize]);
|
||||
|
||||
if (show)
|
||||
{
|
||||
Show();
|
||||
}
|
||||
}
|
||||
|
||||
private void SplashForm_Load(object sender, System.EventArgs e)
|
||||
|
||||
@@ -16,8 +16,7 @@ namespace Flowframes.Media
|
||||
return;
|
||||
|
||||
Logger.Log($"Detecting hardare encoding support...");
|
||||
SplashForm statusForm = new SplashForm("Checking hardware encoders...", textSize: SplashForm.TextSize.Medium);
|
||||
statusForm.Show();
|
||||
var statusForm = new SplashForm("Checking hardware encoders...", textSize: SplashForm.TextSize.Medium);
|
||||
|
||||
var previousMainFormOpacity = Program.mainForm.Opacity;
|
||||
|
||||
|
||||
@@ -46,7 +46,6 @@ namespace Flowframes
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
var splash = new SplashForm("Starting Flowframes...");
|
||||
splash.Show();
|
||||
|
||||
// Force culture to en-US across entire application (to avoid number parsing issues etc)
|
||||
var culture = new CultureInfo("en-US");
|
||||
@@ -61,8 +60,8 @@ namespace Flowframes
|
||||
|
||||
Paths.Init();
|
||||
Config.Init();
|
||||
Task.Run(() => DiskSpaceCheckLoop());
|
||||
Logger.Log($"Command Line: {Environment.CommandLine}", true);
|
||||
Task.Run(() => DiskSpaceCheckLoop());
|
||||
|
||||
LaunchGui();
|
||||
}
|
||||
|
||||
@@ -13,6 +13,8 @@ using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Flowframes.Data;
|
||||
using Flowframes.MiscUtils;
|
||||
using Flowframes.Forms;
|
||||
using Flowframes.Forms.Main;
|
||||
|
||||
namespace Flowframes.Ui
|
||||
{
|
||||
@@ -34,10 +36,12 @@ namespace Flowframes.Ui
|
||||
if (Config.GetBool(Config.Key.clearLogOnInput))
|
||||
Logger.ClearLogBox();
|
||||
|
||||
var importSplash = new SplashForm("Importing...", topMost: false);
|
||||
|
||||
SetOutPath(outputTbox, inputTbox.Text.Trim().GetParentDir());
|
||||
|
||||
Program.lastInputPath = path;
|
||||
Program.lastInputPathIsSsd = OsUtils.DriveIsSSD(path);
|
||||
Program.lastInputPathIsSsd = Config.GetBool("checkInputFileDriveType", false) && OsUtils.DriveIsSSD(path);
|
||||
|
||||
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.");
|
||||
@@ -70,6 +74,8 @@ namespace Flowframes.Ui
|
||||
}
|
||||
catch { }
|
||||
|
||||
Form1.CloseAllSplashForms();
|
||||
|
||||
if (!Cli.AutoRun)
|
||||
{
|
||||
Program.mainForm.Enabled = true;
|
||||
|
||||
Reference in New Issue
Block a user