From 000de99c3726633e53ec83998e0b07256e5dba5a Mon Sep 17 00:00:00 2001 From: pizzaboxer <41478239+pizzaboxer@users.noreply.github.com> Date: Fri, 27 Jan 2023 19:12:34 +0000 Subject: [PATCH] Fix quiet launching Since this isn't a WinForms app anymore, there's no need to start the bootstrapper dialog as a new application with Application.Run. --- Bloxstrap/App.xaml | 3 +-- Bloxstrap/Bootstrapper.cs | 3 --- .../BootstrapperDialogs/BootstrapperDialogForm.cs | 3 --- Bloxstrap/Enums/BootstrapperStyle.cs | 10 ++-------- Bloxstrap/Properties/launchSettings.json | 3 +-- 5 files changed, 4 insertions(+), 18 deletions(-) diff --git a/Bloxstrap/App.xaml b/Bloxstrap/App.xaml index 37db26a..7e970e0 100644 --- a/Bloxstrap/App.xaml +++ b/Bloxstrap/App.xaml @@ -1,8 +1,7 @@  + xmlns:local="clr-namespace:Bloxstrap"> diff --git a/Bloxstrap/Bootstrapper.cs b/Bloxstrap/Bootstrapper.cs index e6217ca..90afade 100644 --- a/Bloxstrap/Bootstrapper.cs +++ b/Bloxstrap/Bootstrapper.cs @@ -91,9 +91,6 @@ namespace Bloxstrap // this is called from BootstrapperStyleForm.SetupDialog() public async Task Run() { - if (App.IsQuiet) - Dialog.CloseDialog(); - if (App.IsUninstall) { Uninstall(); diff --git a/Bloxstrap/Dialogs/BootstrapperDialogs/BootstrapperDialogForm.cs b/Bloxstrap/Dialogs/BootstrapperDialogs/BootstrapperDialogForm.cs index c39ff8b..fc60e59 100644 --- a/Bloxstrap/Dialogs/BootstrapperDialogs/BootstrapperDialogForm.cs +++ b/Bloxstrap/Dialogs/BootstrapperDialogs/BootstrapperDialogForm.cs @@ -79,9 +79,6 @@ namespace Bloxstrap.Dialogs.BootstrapperDialogs public void SetupDialog() { - if (App.IsQuiet) - this.Hide(); - this.Text = App.ProjectName; this.Icon = App.Settings.BootstrapperIcon.GetIcon(); diff --git a/Bloxstrap/Enums/BootstrapperStyle.cs b/Bloxstrap/Enums/BootstrapperStyle.cs index 73e8d8a..3816bbd 100644 --- a/Bloxstrap/Enums/BootstrapperStyle.cs +++ b/Bloxstrap/Enums/BootstrapperStyle.cs @@ -37,15 +37,9 @@ namespace Bloxstrap.Enums dialog = new ProgressDialog(bootstrapper); break; } - - if (bootstrapper is null) - { + + if (!App.IsQuiet) dialog.ShowDialog(); - } - else - { - Application.Run(dialog); - } } } } diff --git a/Bloxstrap/Properties/launchSettings.json b/Bloxstrap/Properties/launchSettings.json index 59170c9..4ac77ad 100644 --- a/Bloxstrap/Properties/launchSettings.json +++ b/Bloxstrap/Properties/launchSettings.json @@ -1,8 +1,7 @@ { "profiles": { "Bloxstrap": { - "commandName": "Project", - "commandLineArgs": "-foo -bar" + "commandName": "Project" } } } \ No newline at end of file