Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Falcon BMS Alternative Launcher/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@
<setting name="Misc_bExportRTTTextures" serializeAs="String">
<value>False</value>
</setting>
<setting name="KeepLauncherOpen" serializeAs="String">
<value>False</value>
</setting>
</FalconBMS.Launcher.Properties.Settings>
<FalconBMS_Alternative_Launcher_Cs.Properties.Settings>
<setting name="Platform" serializeAs="String">
Expand Down
2 changes: 2 additions & 0 deletions Falcon BMS Alternative Launcher/AppProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public AppProperties(MainWindow mainWindow)
mainWindow.CMD_EF.IsOn = Properties.Settings.Default.CMD_EF;
mainWindow.CMD_MONO.IsOn = Properties.Settings.Default.CMD_MONO;

mainWindow.KeepLauncherOpen.IsChecked = Properties.Settings.Default.KeepLauncherOpen;
mainWindow.ApplicationOverride.IsChecked = Properties.Settings.Default.NoOverride;

mainWindow.Misc_RollLinkedNWS.IsChecked = Properties.Settings.Default.Misc_RLNWS;
Expand Down Expand Up @@ -86,6 +87,7 @@ public void SaveUISetup()
Properties.Settings.Default.CMD_EF = (bool)mainWindow.CMD_EF.IsOn;
Properties.Settings.Default.CMD_MONO = (bool)mainWindow.CMD_MONO.IsOn;

Properties.Settings.Default.KeepLauncherOpen = (bool)mainWindow.KeepLauncherOpen.IsChecked;
Properties.Settings.Default.NoOverride = (bool)mainWindow.ApplicationOverride.IsChecked;

Properties.Settings.Default.Misc_RLNWS = (bool)mainWindow.Misc_RollLinkedNWS.IsChecked;
Expand Down
14 changes: 13 additions & 1 deletion Falcon BMS Alternative Launcher/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Falcon BMS Alternative Launcher/Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,8 @@
<Setting Name="Misc_bExportRTTTextures" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="KeepLauncherOpen" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>
14 changes: 13 additions & 1 deletion Falcon BMS Alternative Launcher/Starter/Starter432.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public override void execute(object sender)
process = Utils.LaunchProcess(appReg.GetInstallDir() + "/Updater.exe");
mainWindow.Close();
break;

case "Launch_BMS_Large":
string strCmdText = getCommandLine();

Expand All @@ -35,8 +36,19 @@ public override void execute(object sender)
string bmsExe = appReg.GetInstallDir() + "/Bin/x86/Falcon BMS.exe";
process = Utils.LaunchProcess(bmsExe, strCmdText);
MainWindow.bmsHasBeenLaunched = true;
mainWindow.Close();

if (Properties.Settings.Default.KeepLauncherOpen)
{
// Stay open: minimize while BMS runs, then restore on exit
mainWindow.minimizeWindowUntilProcessEnds(process);
}
else
{
// Default behavior: close after launching BMS
mainWindow.Close();
}
break;

case "Launch_CFG":
process = Utils.LaunchProcess(appReg.GetInstallDir() + "/Config.exe");
mainWindow.minimizeWindowUntilProcessEnds(process);
Expand Down
14 changes: 13 additions & 1 deletion Falcon BMS Alternative Launcher/Starter/Starter433.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public override void execute(object sender)
process = Utils.LaunchProcess(appReg.GetInstallDir() + "/Updater.exe");
mainWindow.Close();
break;

case "Launch_BMS_Large":
string strCmdText = getCommandLine();

Expand All @@ -41,8 +42,19 @@ public override void execute(object sender)

process = Utils.LaunchProcess(bmsExe, strCmdText);
MainWindow.bmsHasBeenLaunched = true;
mainWindow.Close();

if (Properties.Settings.Default.KeepLauncherOpen)
{
// Stay open: minimize while BMS runs, then restore on exit
mainWindow.minimizeWindowUntilProcessEnds(process);
}
else
{
// Default behavior: close after launching BMS
mainWindow.Close();
}
break;

case "Launch_CFG":
process = Utils.LaunchProcess(appReg.GetInstallDir() + "/Config.exe");
mainWindow.minimizeWindowUntilProcessEnds(process);
Expand Down
14 changes: 13 additions & 1 deletion Falcon BMS Alternative Launcher/Starter/Starter434.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public override void execute(object sender)
process = Utils.LaunchProcess(appReg.GetInstallDir() + "/Updater.exe");
mainWindow.Close();
break;

case "Launch_BMS_Large":
string strCmdText = getCommandLine();

Expand All @@ -38,8 +39,19 @@ public override void execute(object sender)
string bmsExe = appReg.GetInstallDir() + "/Bin/x64/Falcon BMS.exe";
process = Utils.LaunchProcess(bmsExe, strCmdText);
MainWindow.bmsHasBeenLaunched = true;
mainWindow.Close();

if (Properties.Settings.Default.KeepLauncherOpen)
{
// Stay open: minimize while BMS runs, then restore on exit
mainWindow.minimizeWindowUntilProcessEnds(process);
}
else
{
// Default behavior: close after launching BMS
mainWindow.Close();
}
break;

case "Launch_CFG":
process = Utils.LaunchProcess(appReg.GetInstallDir() + "/Config.exe");
mainWindow.minimizeWindowUntilProcessEnds(process);
Expand Down
17 changes: 15 additions & 2 deletions Falcon BMS Alternative Launcher/Starter/Starter435.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,16 @@ public override void execute(object sender)
process = Utils.LaunchProcess(appReg.GetInstallDir() + "/Updater.exe");
mainWindow.Close();
break;

case "Launch_BMS_Large":
string strCmdText = getCommandLine();

// OVERRIDE SETTINGS.
mainWindow.executeOverride();

string testPlatform = appReg.GetInstallDir() + "/Bin/x64/Falcon BMS Test.exe";
if (File.Exists(testPlatform) && MessageBox.Show(Program.mainWin, "Start Test Exe?", "Launcher", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
if (File.Exists(testPlatform) &&
MessageBox.Show(Program.mainWin, "Start Test Exe?", "Launcher", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
{
process = Utils.LaunchProcess(testPlatform, strCmdText);
MainWindow.bmsHasBeenLaunched = true;
Expand All @@ -47,8 +49,19 @@ public override void execute(object sender)
process = Utils.LaunchProcess(bmsExe, strCmdText);
MainWindow.bmsHasBeenLaunched = true;
}
mainWindow.Close();

if (Properties.Settings.Default.KeepLauncherOpen)
{
// Stay open: minimize while BMS runs, then restore on exit
mainWindow.minimizeWindowUntilProcessEnds(process);
}
else
{
// Default behavior: close after launching BMS
mainWindow.Close();
}
break;

case "Launch_CFG":
process = Utils.LaunchProcess(appReg.GetInstallDir() + "/Config.exe");
mainWindow.minimizeWindowUntilProcessEnds(process);
Expand Down
14 changes: 13 additions & 1 deletion Falcon BMS Alternative Launcher/Starter/Starter436I.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public override void execute(object sender)
process = Utils.LaunchProcess(appReg.GetInstallDir() + "/Updater.exe");
mainWindow.Close();
break;

case "Launch_BMS_Large":
string strCmdText = getCommandLine();

Expand All @@ -38,8 +39,19 @@ public override void execute(object sender)
string bmsExe = appReg.GetInstallDir() + "/Bin/x64/Falcon BMS.exe";
process = Utils.LaunchProcess(bmsExe, strCmdText);
MainWindow.bmsHasBeenLaunched = true;
mainWindow.Close();

if (Properties.Settings.Default.KeepLauncherOpen)
{
// Stay open: minimize while BMS runs, then restore on exit
mainWindow.minimizeWindowUntilProcessEnds(process);
}
else
{
// Default behavior: close after launching BMS
mainWindow.Close();
}
break;

case "Launch_CFG":
process = Utils.LaunchProcess(appReg.GetInstallDir() + "/Config.exe");
mainWindow.minimizeWindowUntilProcessEnds(process);
Expand Down
6 changes: 5 additions & 1 deletion Falcon BMS Alternative Launcher/Windows/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,11 @@
<Label x:Name="Label_EDIT" Content="Editor&#xD;&#xA;" Margin="575,0,0,0"/>
</Grid>
</Border>
<CheckBox x:Name="ApplicationOverride" Content="Launch without applying overrides" HorizontalAlignment="Right" Margin="0,0,20,98" MinWidth="206" VerticalAlignment="Bottom" Background="#FFECFF71" Foreground="{StaticResource UiForegroundBrush}" />

<CheckBox x:Name="KeepLauncherOpen" Content="Reopen Launcher after exiting BMS"
HorizontalAlignment="Right" Margin="0,0,17,124" MinWidth="206" VerticalAlignment="Bottom" Background="#FFECFF71" Foreground="{StaticResource UiForegroundBrush}" />
<CheckBox x:Name="ApplicationOverride" Content="Launch without applying overrides"
HorizontalAlignment="Right" Margin="0,0,20,98" MinWidth="206" VerticalAlignment="Bottom" Background="#FFECFF71" Foreground="{StaticResource UiForegroundBrush}" />

<Border BorderThickness="1" HorizontalAlignment="Left" Height="72" Margin="48,0,0,20" VerticalAlignment="Bottom" Width="480" Style="{StaticResource LauncherStripBorder}">
<Grid HorizontalAlignment="Stretch" Height="auto" Margin="0,0,0,0" VerticalAlignment="Stretch" Width="auto">
Expand Down
3 changes: 3 additions & 0 deletions Falcon BMS Alternative Launcher/Windows/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,9 @@ private void Launch_Click(object sender, RoutedEventArgs e)
{
try
{
// Save UI Properties(Like Button Status)
appProperties.SaveUISetup();

if (appReg.IsUniqueNameDefined() == false)
{
CallsignWindow.ShowCallsignWindow(appReg);
Expand Down