From d995a813b92e0ba58a13191e003aaf6ab449477e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krystian=20G=C3=B3recki?= Date: Mon, 23 Jul 2018 20:47:48 +0200 Subject: [PATCH 1/2] Check new version in new thread for faster startup. --- Helper.cs | 14 +++++++++++++- formMain.cs | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Helper.cs b/Helper.cs index 495b590..7100bb5 100644 --- a/Helper.cs +++ b/Helper.cs @@ -8,6 +8,7 @@ using System.Threading.Tasks; using System.Windows.Forms; using System.Xml; +using System.Threading; namespace MasterOfWebM { @@ -177,13 +178,24 @@ public static bool checkFFmpegFontConfig() } } } + /// + /// Performs new version check in new tread for faster startup. + /// + public static void checkUpdateInNewThread() + { + new Thread(() => + { + Thread.CurrentThread.IsBackground = false; + checkUpdate(); + }).Start(); + } /// /// Verifies the version of the program. /// It will prompt the user if the program is /// outdated. /// - public static void checkUpdate() + private static void checkUpdate() { try { diff --git a/formMain.cs b/formMain.cs index e64c54c..444c145 100644 --- a/formMain.cs +++ b/formMain.cs @@ -373,7 +373,7 @@ private void formMain_Load(object sender, EventArgs e) btnConvert.Enabled = false; } - Helper.checkUpdate(); + Helper.checkUpdateInNewThread(); } // Handles when the user focuses txtCrop From 9ab2c0c134833aadac960df086652221675c8e1e Mon Sep 17 00:00:00 2001 From: krystiangorecki <10375973+krystiangorecki@users.noreply.github.com> Date: Mon, 23 Jul 2018 21:03:28 +0200 Subject: [PATCH 2/2] typo --- Helper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Helper.cs b/Helper.cs index 7100bb5..37d3952 100644 --- a/Helper.cs +++ b/Helper.cs @@ -179,7 +179,7 @@ public static bool checkFFmpegFontConfig() } } /// - /// Performs new version check in new tread for faster startup. + /// Performs new version check in new thread for faster startup. /// public static void checkUpdateInNewThread() {