some refactoring
This commit is contained in:
parent
2253cf973a
commit
d2dfc7b95a
7 changed files with 13 additions and 44 deletions
|
@ -195,7 +195,7 @@ internal sealed class CustomTreeView : TreeView
|
|||
_ = comboBoxBounds.Remove(pair.Key);
|
||||
else if (pair.Value.Contains(clickPoint))
|
||||
{
|
||||
List<string> proxies = EmbeddedResources.FindAll(r => r.StartsWith("Koaloader")).Select(p =>
|
||||
List<string> proxies = EmbeddedResources.FindAll(r => r.StartsWith("Koaloader", StringComparison.Ordinal)).Select(p =>
|
||||
{
|
||||
p.GetProxyInfoFromIdentifier(out string proxyName, out _);
|
||||
return proxyName;
|
||||
|
|
|
@ -769,30 +769,9 @@ internal sealed partial class SelectForm : CustomForm
|
|||
items.Add(query);
|
||||
items.Add(new ContextMenuItem("Refresh Queries", "Command Prompt", (_, _) =>
|
||||
{
|
||||
try
|
||||
{
|
||||
appInfoVDF.Delete();
|
||||
}
|
||||
catch
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
try
|
||||
{
|
||||
appInfoJSON.Delete();
|
||||
}
|
||||
catch
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
try
|
||||
{
|
||||
cooldown.Delete();
|
||||
}
|
||||
catch
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
appInfoVDF.Delete();
|
||||
appInfoJSON.Delete();
|
||||
cooldown.Delete();
|
||||
OnLoad(true);
|
||||
}));
|
||||
}
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
[assembly: SuppressMessage("CodeQuality", "IDE0076:Invalid global 'SuppressMessageAttribute'")]
|
||||
[assembly: SuppressMessage("CodeQuality", "IDE0079:Remove unnecessary suppression")]
|
||||
|
||||
[assembly: SuppressMessage("Globalization", "CA1303:Do not pass literals as localized parameters")]
|
||||
[assembly: SuppressMessage("Globalization", "CA1305:Specify IFormatProvider")]
|
||||
[assembly: SuppressMessage("Globalization", "CA1307:Specify StringComparison for clarity")]
|
||||
[assembly: SuppressMessage("Globalization", "CA1310:Specify StringComparison for correctness")]
|
||||
|
||||
[assembly: SuppressMessage("Design", "CA1031:Do not catch general exception types")]
|
||||
|
||||
[assembly: SuppressMessage("Reliability", "CA2007:Consider calling ConfigureAwait on the awaited task")]
|
|
@ -1,4 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
|
@ -21,7 +22,7 @@ internal static class EpicLibrary
|
|||
epicManifestsPath ??= Registry.GetValue(@"HKEY_CURRENT_USER\Software\Wow6432Node\Epic Games\EOS", "ModSdkMetadataDir", null) as string;
|
||||
epicManifestsPath ??= Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Epic Games\EpicGamesLauncher", "AppDataPath", null) as string;
|
||||
epicManifestsPath ??= Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Epic Games\EpicGamesLauncher", "AppDataPath", null) as string;
|
||||
if (epicManifestsPath is not null && epicManifestsPath.EndsWith(@"\Data"))
|
||||
if (epicManifestsPath is not null && epicManifestsPath.EndsWith(@"\Data", StringComparison.Ordinal))
|
||||
epicManifestsPath += @"\Manifests";
|
||||
return epicManifestsPath.BeautifyPath();
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
@ -23,7 +24,7 @@ internal static class SteamStore
|
|||
List<string> dlcIds = new();
|
||||
if (appData.dlc is null)
|
||||
return dlcIds;
|
||||
dlcIds.AddRange(from appId in appData.dlc where appId > 0 select appId.ToString());
|
||||
dlcIds.AddRange(from appId in appData.dlc where appId > 0 select appId.ToString(CultureInfo.InvariantCulture));
|
||||
return dlcIds;
|
||||
});
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
@ -37,7 +38,7 @@ internal static class Koaloader
|
|||
|
||||
private static void WriteProxy(this string path, string proxyName, BinaryType binaryType)
|
||||
{
|
||||
foreach (string resourceIdentifier in EmbeddedResources.FindAll(r => r.StartsWith("Koaloader")))
|
||||
foreach (string resourceIdentifier in EmbeddedResources.FindAll(r => r.StartsWith("Koaloader", StringComparison.Ordinal)))
|
||||
{
|
||||
resourceIdentifier.GetProxyInfoFromIdentifier(out string _proxyName, out BinaryType _binaryType);
|
||||
if (_proxyName != proxyName || _binaryType != binaryType)
|
||||
|
|
|
@ -431,7 +431,7 @@ internal static class Resources
|
|||
return embeddedResources;
|
||||
string[] names = Assembly.GetExecutingAssembly().GetManifestResourceNames();
|
||||
embeddedResources = new();
|
||||
foreach (string resourceName in names.Where(n => n.StartsWith("CreamInstaller.Resources.")))
|
||||
foreach (string resourceName in names.Where(n => n.StartsWith("CreamInstaller.Resources.", StringComparison.Ordinal)))
|
||||
embeddedResources.Add(resourceName[25..]);
|
||||
return embeddedResources;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue