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.
This commit is contained in:
pizzaboxer 2023-01-27 19:12:34 +00:00
parent d7b8efbc2c
commit 000de99c37
5 changed files with 4 additions and 18 deletions

View File

@ -1,8 +1,7 @@
<Application x:Class="Bloxstrap.App" <Application x:Class="Bloxstrap.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Bloxstrap" xmlns:local="clr-namespace:Bloxstrap">
StartupUri="MainWindow.xaml">
<Application.Resources> <Application.Resources>
</Application.Resources> </Application.Resources>

View File

@ -91,9 +91,6 @@ namespace Bloxstrap
// this is called from BootstrapperStyleForm.SetupDialog() // this is called from BootstrapperStyleForm.SetupDialog()
public async Task Run() public async Task Run()
{ {
if (App.IsQuiet)
Dialog.CloseDialog();
if (App.IsUninstall) if (App.IsUninstall)
{ {
Uninstall(); Uninstall();

View File

@ -79,9 +79,6 @@ namespace Bloxstrap.Dialogs.BootstrapperDialogs
public void SetupDialog() public void SetupDialog()
{ {
if (App.IsQuiet)
this.Hide();
this.Text = App.ProjectName; this.Text = App.ProjectName;
this.Icon = App.Settings.BootstrapperIcon.GetIcon(); this.Icon = App.Settings.BootstrapperIcon.GetIcon();

View File

@ -38,14 +38,8 @@ namespace Bloxstrap.Enums
break; break;
} }
if (bootstrapper is null) if (!App.IsQuiet)
{
dialog.ShowDialog(); dialog.ShowDialog();
} }
else
{
Application.Run(dialog);
}
}
} }
} }

View File

@ -1,8 +1,7 @@
{ {
"profiles": { "profiles": {
"Bloxstrap": { "Bloxstrap": {
"commandName": "Project", "commandName": "Project"
"commandLineArgs": "-foo -bar"
} }
} }
} }