From 85b0b88e78530674e3e05b91b959252ff77a5bee Mon Sep 17 00:00:00 2001 From: num0005 Date: Sat, 6 Jul 2024 18:30:18 +0100 Subject: [PATCH] Remove `ProfileSettingsToSpace` and fix spacing on `build type`. --- Launcher/PathSettings.xaml | 105 +++++-------------------------------- Launcher/UIHelpers.cs | 66 ----------------------- 2 files changed, 14 insertions(+), 157 deletions(-) diff --git a/Launcher/PathSettings.xaml b/Launcher/PathSettings.xaml index b994478..0e2ced7 100644 --- a/Launcher/PathSettings.xaml +++ b/Launcher/PathSettings.xaml @@ -11,7 +11,6 @@ DataContext="{Binding RelativeSource={RelativeSource Self}}"> - @@ -62,27 +61,9 @@ - - - - - - - - - - - - - - - - - - - - + + @@ -103,30 +84,12 @@ - + - - - - - - - - - - - - - - - - - - - - + + @@ -234,7 +197,7 @@ - + @@ -317,7 +280,7 @@ - + @@ -336,7 +299,7 @@ - + @@ -355,7 +318,7 @@ - + @@ -375,7 +338,7 @@ - + @@ -386,53 +349,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -442,7 +365,7 @@ - + @@ -452,7 +375,7 @@ - + @@ -462,7 +385,7 @@ - + diff --git a/Launcher/UIHelpers.cs b/Launcher/UIHelpers.cs index ff04e14..cf97a7a 100644 --- a/Launcher/UIHelpers.cs +++ b/Launcher/UIHelpers.cs @@ -721,72 +721,6 @@ public override object Convert(object[] values, Type targetType, object paramete } } - public class ProfileSettingsToSpace : OneWayMultiValueConverter - { - public override object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture) - { - var grid = new GridLength(0); - bool isMCC = (bool)values[0]; - int gen_type_selection = (int)values[1]; - bool community_selection = (bool)values[2]; - string parameter_workaround = (string)values[3]; - if (ToolkitProfiles.SettingsList.Count > 0) - { - if (parameter_workaround is string && Int32.Parse(parameter_workaround as string) == 0) - { - //Check if the build type and gentype are set to a standalone Halo 1 or Halo 2 profile for community extensions - if (!isMCC) - if (gen_type_selection == 0 || gen_type_selection == 1) - grid = new GridLength(8); - } - else if (parameter_workaround is string && Int32.Parse(parameter_workaround as string) == 1) - { - //Check if the build type and gentype are set to an MCC Halo 1 or Halo 2 profile for the verbose flag - if (isMCC) - if (gen_type_selection == 0 || gen_type_selection == 1) - grid = new GridLength(8); - } - else if (parameter_workaround is string && Int32.Parse(parameter_workaround as string) == 2) - { - //Check if the build type and gentype are set to an MCC Halo 2 profile for the expert and batch flag - if (isMCC && gen_type_selection == 1) - grid = new GridLength(8); - } - else if (parameter_workaround is string && Int32.Parse(parameter_workaround as string) == 3) - { - //Check if the build type is MCC Halo 2 profile for the asset directory - if (isMCC && gen_type_selection <= 1) - grid = new GridLength(8); - } - else if (parameter_workaround is string && Int32.Parse(parameter_workaround as string) == 4) - { - //Check if the build type is standalone Halo 2 community profile for H2Codez updates - if (!isMCC && gen_type_selection == 1 && community_selection) - grid = new GridLength(8); - } - else if (parameter_workaround is string && Int32.Parse(parameter_workaround as string) == 5) - { - //Check if the build type is set to a MCC and gentype is not Halo CE or is Halo 3 and above - if (isMCC && gen_type_selection != 0 || gen_type_selection >= 2) - grid = new GridLength(1, (double)GridUnitType.Auto); - } - } - else - { - if (parameter_workaround is string && Int32.Parse(parameter_workaround as string) == 5) - { - grid = new GridLength(1, (double)GridUnitType.Auto); - } - else - { - //Either we're in desinger or there are no profiles. Reveal ourselves either way. - grid = new GridLength(8); - } - } - return grid; - } - } - public class LightmapConfigModifier : OneWayMultiValueConverter { public override object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)