mirror of
https://github.com/knah/VRCMelonAssistant.git
synced 2024-05-12 00:12:19 +12:00
Use ToLowerInvariant instead of ToLower (#346)
This commit is contained in:
parent
95d74b93c5
commit
f0210e33d8
|
@ -211,7 +211,7 @@ namespace ModAssistant.Pages
|
||||||
string InjectorHash = Utils.CalculateMD5(InjectorPath);
|
string InjectorHash = Utils.CalculateMD5(InjectorPath);
|
||||||
foreach (Mod mod in AllModsList)
|
foreach (Mod mod in AllModsList)
|
||||||
{
|
{
|
||||||
if (mod.name.ToLower() == "bsipa")
|
if (mod.name.ToLowerInvariant() == "bsipa")
|
||||||
{
|
{
|
||||||
foreach (Mod.DownloadLink download in mod.downloads)
|
foreach (Mod.DownloadLink download in mod.downloads)
|
||||||
{
|
{
|
||||||
|
@ -243,7 +243,7 @@ namespace ModAssistant.Pages
|
||||||
{
|
{
|
||||||
foreach (Mod mod in AllModsList)
|
foreach (Mod mod in AllModsList)
|
||||||
{
|
{
|
||||||
if (mod.name.ToLower() != "bsipa" && mod.status != "declined")
|
if (mod.name.ToLowerInvariant() != "bsipa" && mod.status != "declined")
|
||||||
{
|
{
|
||||||
foreach (Mod.DownloadLink download in mod.downloads)
|
foreach (Mod.DownloadLink download in mod.downloads)
|
||||||
{
|
{
|
||||||
|
@ -351,7 +351,7 @@ namespace ModAssistant.Pages
|
||||||
// Ignore mods that are on current version if we aren't reinstalling mods
|
// Ignore mods that are on current version if we aren't reinstalling mods
|
||||||
if (mod.ListItem.GetVersionComparison == 0 && !App.ReinstallInstalledMods) continue;
|
if (mod.ListItem.GetVersionComparison == 0 && !App.ReinstallInstalledMods) continue;
|
||||||
|
|
||||||
if (mod.name.ToLower() == "bsipa")
|
if (mod.name.ToLowerInvariant() == "bsipa")
|
||||||
{
|
{
|
||||||
MainWindow.Instance.MainText = $"{string.Format((string)FindResource("Mods:InstallingMod"), mod.name)}...";
|
MainWindow.Instance.MainText = $"{string.Format((string)FindResource("Mods:InstallingMod"), mod.name)}...";
|
||||||
await Task.Run(async () => await InstallMod(mod, installDirectory));
|
await Task.Run(async () => await InstallMod(mod, installDirectory));
|
||||||
|
@ -397,7 +397,7 @@ namespace ModAssistant.Pages
|
||||||
downloadLink = link.url;
|
downloadLink = link.url;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (link.type.ToLower() == App.BeatSaberInstallType.ToLower())
|
else if (link.type.ToLowerInvariant() == App.BeatSaberInstallType.ToLowerInvariant())
|
||||||
{
|
{
|
||||||
downloadLink = link.url;
|
downloadLink = link.url;
|
||||||
break;
|
break;
|
||||||
|
@ -746,13 +746,13 @@ namespace ModAssistant.Pages
|
||||||
Mod.DownloadLink links = null;
|
Mod.DownloadLink links = null;
|
||||||
foreach (Mod.DownloadLink link in mod.downloads)
|
foreach (Mod.DownloadLink link in mod.downloads)
|
||||||
{
|
{
|
||||||
if (link.type.ToLower() == "universal" || link.type.ToLower() == App.BeatSaberInstallType.ToLower())
|
if (link.type.ToLowerInvariant() == "universal" || link.type.ToLowerInvariant() == App.BeatSaberInstallType.ToLowerInvariant())
|
||||||
{
|
{
|
||||||
links = link;
|
links = link;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mod.name.ToLower() == "bsipa")
|
if (mod.name.ToLowerInvariant() == "bsipa")
|
||||||
{
|
{
|
||||||
var hasIPAExe = File.Exists(Path.Combine(App.BeatSaberInstallDirectory, "IPA.exe"));
|
var hasIPAExe = File.Exists(Path.Combine(App.BeatSaberInstallDirectory, "IPA.exe"));
|
||||||
var hasIPADir = Directory.Exists(Path.Combine(App.BeatSaberInstallDirectory, "IPA"));
|
var hasIPADir = Directory.Exists(Path.Combine(App.BeatSaberInstallDirectory, "IPA"));
|
||||||
|
@ -833,10 +833,10 @@ namespace ModAssistant.Pages
|
||||||
private bool SearchFilter(object mod)
|
private bool SearchFilter(object mod)
|
||||||
{
|
{
|
||||||
ModListItem item = mod as ModListItem;
|
ModListItem item = mod as ModListItem;
|
||||||
if (item.ModName.ToLower().Contains(SearchBar.Text.ToLower())) return true;
|
if (item.ModName.ToLowerInvariant().Contains(SearchBar.Text.ToLowerInvariant())) return true;
|
||||||
if (item.ModDescription.ToLower().Contains(SearchBar.Text.ToLower())) return true;
|
if (item.ModDescription.ToLowerInvariant().Contains(SearchBar.Text.ToLowerInvariant())) return true;
|
||||||
if (item.ModName.ToLower().Replace(" ", string.Empty).Contains(SearchBar.Text.ToLower().Replace(" ", string.Empty))) return true;
|
if (item.ModName.ToLowerInvariant().Replace(" ", string.Empty).Contains(SearchBar.Text.ToLowerInvariant().Replace(" ", string.Empty))) return true;
|
||||||
if (item.ModDescription.ToLower().Replace(" ", string.Empty).Contains(SearchBar.Text.ToLower().Replace(" ", string.Empty))) return true;
|
if (item.ModDescription.ToLowerInvariant().Replace(" ", string.Empty).Contains(SearchBar.Text.ToLowerInvariant().Replace(" ", string.Empty))) return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue