mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-10 06:34:19 +00:00
Minor clean
This commit is contained in:
parent
bf8d47c52b
commit
15a84d9d7e
5 changed files with 20 additions and 5 deletions
|
@ -6,4 +6,3 @@ public sealed record SlotGroup(string GroupName, PKM[] Slots)
|
|||
public override string ToString() => $"{GroupName}: {Slots.Length} {Slots.GetType().Name}";
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net6.0;net46</TargetFrameworks>
|
||||
<NeutralLanguage>en</NeutralLanguage>
|
||||
<LangVersion>10</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net6.0;net46</TargetFrameworks>
|
||||
<NeutralLanguage>en</NeutralLanguage>
|
||||
<LangVersion>10</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -117,17 +117,30 @@ namespace PKHeX.WinForms
|
|||
showChangelog = false;
|
||||
BAKprompt = false;
|
||||
|
||||
HaX = args.Any(x => string.Equals(x.Trim('-'), nameof(HaX), StringComparison.CurrentCultureIgnoreCase))
|
||||
|| Path.GetFileNameWithoutExtension(Process.GetCurrentProcess().MainModule!.FileName!).EndsWith(nameof(HaX));
|
||||
|
||||
FormLoadConfig(out BAKprompt, out showChangelog);
|
||||
HaX |= Settings.Startup.ForceHaXOnLaunch;
|
||||
HaX = Settings.Startup.ForceHaXOnLaunch || GetIsHaX(args);
|
||||
|
||||
WinFormsUtil.AddSaveFileExtensions(Settings.Backup.OtherSaveFileExtensions);
|
||||
SaveFinder.CustomBackupPaths.Clear();
|
||||
SaveFinder.CustomBackupPaths.AddRange(Settings.Backup.OtherBackupPaths.Where(Directory.Exists));
|
||||
}
|
||||
|
||||
private static bool GetIsHaX(IEnumerable<string> args)
|
||||
{
|
||||
foreach (var x in args)
|
||||
{
|
||||
if (string.Equals(x.Trim('-'), nameof(HaX), StringComparison.CurrentCultureIgnoreCase))
|
||||
return true;
|
||||
}
|
||||
|
||||
#if !NET6_0_OR_GREATER
|
||||
var path = Process.GetCurrentProcess().MainModule!.FileName!;
|
||||
#else
|
||||
var path = Environment.ProcessPath!;
|
||||
#endif
|
||||
return Path.GetFileNameWithoutExtension(path).EndsWith(nameof(HaX));
|
||||
}
|
||||
|
||||
private void FormLoadAddEvents()
|
||||
{
|
||||
C_SAV.Menu_Redo = Menu_Redo;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<OutputType>WinExe</OutputType>
|
||||
<TargetFrameworks>net46;net6.0-windows</TargetFrameworks>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<NeutralLanguage>en</NeutralLanguage>
|
||||
<PackageId>PKHeX</PackageId>
|
||||
<Company>Project Pokémon</Company>
|
||||
<Authors>Kaphotics</Authors>
|
||||
|
|
Loading…
Reference in a new issue