diff --git a/Code/Form1.Designer.cs b/Code/Form1.Designer.cs index 7367796..4229163 100644 --- a/Code/Form1.Designer.cs +++ b/Code/Form1.Designer.cs @@ -1462,6 +1462,7 @@ this.Text = "Flowframes"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing); this.Load += new System.EventHandler(this.Form1_Load); + this.Shown += new System.EventHandler(this.Form1_Shown); this.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form1_DragDrop); this.DragEnter += new System.Windows.Forms.DragEventHandler(this.Form1_DragEnter); this.panel1.ResumeLayout(false); diff --git a/Code/Form1.cs b/Code/Form1.cs index a3920d7..5c2c9f8 100644 --- a/Code/Form1.cs +++ b/Code/Form1.cs @@ -14,6 +14,7 @@ using HTAlt.WinForms; using Flowframes.Data; using Microsoft.WindowsAPICodePack.Taskbar; using Flowframes.MiscUtils; +using System.Threading.Tasks; namespace Flowframes { @@ -53,20 +54,26 @@ namespace Flowframes InterpolateUtils.preview = previewPicturebox; UpdateStepByStepControls(); Initialized(); - Checks(); HandleArguments(); - Text = $"Flowframes {Updater.GetInstalledVer()}"; + Text = $"Flowframes"; } - void Checks() + private void Form1_Shown(object sender, EventArgs e) + { + Checks(); + } + + async Task Checks() { try { - GetWebInfo.LoadNews(newsLabel); - GetWebInfo.LoadPatronListCsv(patronsLabel); - Updater.AsyncUpdateCheck(); - Updater.UpdateModelList(); - Python.CheckCompression(); + await Task.Delay(10); + Text = $"Flowframes " + Updater.GetInstalledVerStr(); + await Updater.UpdateModelList(); // Update AI model list + await Updater.AsyncUpdateCheck(); // Check for Flowframes updates + await GetWebInfo.LoadNews(newsLabel); // Loads news/MOTD + await GetWebInfo.LoadPatronListCsv(patronsLabel); // Load patron list + await Python.CheckCompression(); } catch (Exception e) { diff --git a/Code/OS/Updater.cs b/Code/OS/Updater.cs index f680047..06522e5 100644 --- a/Code/OS/Updater.cs +++ b/Code/OS/Updater.cs @@ -14,6 +14,13 @@ namespace Flowframes.OS public enum VersionCompareResult { Older, Newer, Equal }; public static string latestVerUrl = "https://dl.nmkd.de/flowframes/exe/ver.ini"; + public static string GetInstalledVerStr () + { + Version ver = GetInstalledVer(); + if (ver.Major == 0 && ver.Minor == 0 && ver.Minor == 0) return ""; + return ver.ToString(); + } + public static Version GetInstalledVer() { try