From 9323ef3d662b1126a492dffb4c95946db498211f Mon Sep 17 00:00:00 2001 From: M Sasan MH Date: Wed, 22 Nov 2023 22:18:21 +0330 Subject: [PATCH] v2.8.1 --- SecureDNSClient/Forms/FormMain.cs | 7 +------ SecureDNSClient/Forms/Methods.cs | 4 ++++ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/SecureDNSClient/Forms/FormMain.cs b/SecureDNSClient/Forms/FormMain.cs index 088ac14..d9aced3 100644 --- a/SecureDNSClient/Forms/FormMain.cs +++ b/SecureDNSClient/Forms/FormMain.cs @@ -132,12 +132,7 @@ static string getArchText(Architecture archOs, Architecture archProcess) // Write binaries if not exist or needs update bool successWrite = await WriteNecessaryFilesToDisk(); - if (successWrite) - { - string msgWB = $"{Info.GetAppInfo(Assembly.GetExecutingAssembly()).ProductName} is ready.{NL}"; - this.InvokeIt(() => CustomRichTextBoxLog.AppendText(msgWB, Color.LightGray)); - } - else + if (!successWrite) { string msgWB = $"Couldn't write binaries to disk.{NL}"; msgWB += $"Restart Application.{NL}"; diff --git a/SecureDNSClient/Forms/Methods.cs b/SecureDNSClient/Forms/Methods.cs index c2fbe85..b035c6a 100644 --- a/SecureDNSClient/Forms/Methods.cs +++ b/SecureDNSClient/Forms/Methods.cs @@ -6,6 +6,7 @@ using MsmhToolsWinFormsClass.Themes; using System.Diagnostics; using System.Net; +using System.Reflection; using System.Runtime.InteropServices; using Task = System.Threading.Tasks.Task; @@ -689,6 +690,9 @@ async Task writeBinariesAsync() // Update old version numbers await File.WriteAllTextAsync(SecureDNS.BinariesVersionPath, NecessaryFiles.Resource1.versions); + string msgWB = $"{Info.GetAppInfo(Assembly.GetExecutingAssembly()).ProductName} is ready.{NL}"; + this.InvokeIt(() => CustomRichTextBoxLog.AppendText(msgWB, Color.LightGray)); + return true; } catch (Exception ex)