ReinstallInstalled setting

This commit is contained in:
Megalon 2020-05-09 14:40:22 -07:00
parent 1d906810b9
commit 2799bdd4aa
5 changed files with 40 additions and 20 deletions

View file

@ -47,6 +47,9 @@
<setting name="SelectedTheme" serializeAs="String">
<value />
</setting>
<setting name="ReinstallInstalled" serializeAs="String">
<value>True</value>
</setting>
</ModAssistant.Properties.Settings>
<ModAssistant.Settings1>
<setting name="InstallFolder" serializeAs="String">

View file

@ -20,6 +20,7 @@ namespace ModAssistant
public static bool SaveModSelection;
public static bool CheckInstalledMods;
public static bool SelectInstalledMods;
public static bool ReinstallInstalledMods;
public static string Version = Assembly.GetExecutingAssembly().GetName().Version.ToString();
public static List<string> SavedMods = ModAssistant.Properties.Settings.Default.SavedMods.Split(',').ToList();
@ -64,6 +65,7 @@ namespace ModAssistant
SaveModSelection = ModAssistant.Properties.Settings.Default.SaveSelected;
CheckInstalledMods = ModAssistant.Properties.Settings.Default.CheckInstalled;
SelectInstalledMods = ModAssistant.Properties.Settings.Default.SelectInstalled;
ReinstallInstalledMods = ModAssistant.Properties.Settings.Default.ReinstallInstalled;
if (e.Args.Length == 0)
{

View file

@ -309,7 +309,7 @@ namespace ModAssistant.Pages
}
}
public async void InstallMods(bool reinstallInstalledMods)
public async void InstallMods()
{
MainWindow.Instance.InstallButton.IsEnabled = false;
string installDirectory = App.BeatSaberInstallDirectory;
@ -320,7 +320,7 @@ namespace ModAssistant.Pages
if (mod.ListItem.GetVersionComparison > 0) continue;
// Ignore mods that are on current version if we aren't reinstalling mods
if (mod.ListItem.GetVersionComparison == 0 && !reinstallInstalledMods) continue;
if (mod.ListItem.GetVersionComparison == 0 && !App.ReinstallInstalledMods) continue;
if (mod.name.ToLower() == "bsipa")
{

View file

@ -1,4 +1,4 @@
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
@ -166,5 +166,17 @@ namespace ModAssistant.Properties {
this["SelectedTheme"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool ReinstallInstalled {
get {
return ((bool)(this["ReinstallInstalled"]));
}
set {
this["ReinstallInstalled"] = value;
}
}
}
}

View file

@ -38,5 +38,8 @@
<Setting Name="SelectedTheme" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="ReinstallInstalled" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>