From a196880413ca47516a1cae8551ffab6ebc899dac Mon Sep 17 00:00:00 2001 From: Thomas G <62822072+Thomasluigi07@users.noreply.github.com> Date: Wed, 20 Jul 2022 21:56:14 +1000 Subject: [PATCH] 1.3 --- Form2.Designer.cs | 4 ++-- Form2.cs | 11 ++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Form2.Designer.cs b/Form2.Designer.cs index c832482..dd97929 100644 --- a/Form2.Designer.cs +++ b/Form2.Designer.cs @@ -87,9 +87,9 @@ this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(55, 6); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(144, 15); + this.label2.Size = new System.Drawing.Size(132, 14); this.label2.TabIndex = 1; - this.label2.Text = "Configuring ARCHBLOX..."; + this.label2.Text = "Checking for updates..."; // // progressBar2 // diff --git a/Form2.cs b/Form2.cs index 127ab6e..2f528b7 100644 --- a/Form2.cs +++ b/Form2.cs @@ -40,6 +40,8 @@ namespace ARCHBLOXBootstrapper string studioPath = Path.Combine(clientPath, "ArchbloxStudio.exe"); if (Directory.Exists(clientPath) & System.IO.File.Exists(studioPath)) { + label1.Text = "Launching Studio..."; + DontEvenBother = true; CreateShortcut(); var pProcess = new Process(); pProcess.StartInfo.FileName = studioPath; @@ -48,9 +50,8 @@ namespace ARCHBLOXBootstrapper pProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal; pProcess.StartInfo.CreateNoWindow = false; pProcess.Start(); - Environment.Exit(0); } - if (Directory.Exists(folderPath)) + if (Directory.Exists(folderPath) & DontEvenBother == false) { DialogResult res = MessageBox.Show("Do you want to delete previous installs of ARCHBLOX Studio?", "ARCHBLOX Studio", MessageBoxButtons.YesNo, MessageBoxIcon.Information); if (res == DialogResult.Yes) @@ -62,15 +63,19 @@ namespace ARCHBLOXBootstrapper wc.DownloadProgressChanged += Client_DownloadProgressChanged; wc.DownloadFileCompleted += Client_DownloadFileCompleted; progressBar2.Style = ProgressBarStyle.Marquee; - label2.Text = "Configuring ARCHBLOX..."; wc.DownloadProgressChanged += Client_DownloadProgressChanged; wc.DownloadFileCompleted += Client_DownloadFileCompleted; if (DontEvenBother == false) { + label2.Text = "Configuring ARCHBLOX..."; Directory.CreateDirectory(clientPath); wc.DownloadFileAsync(new Uri(@"https://archblox.com/studio/" + version_string + ".zip"), filePath); progressBar2.Style = ProgressBarStyle.Blocks; handle.WaitOne(); + } else + { + Thread.Sleep(3000); + Environment.Exit(0); } }