With the new version of Visual Studio bringing C# 12, we can revise our logic for better readability as well as use new methods/APIs introduced in the .NET 8.0 BCL.
Previous commit changed the behavior to not check SaveFile's CurrentBox, only keep current index. If we want a specific index (like a new SaveFile's latest box), we must pass it.
Handle all warnings
obviously the usage of null! could potentially be avoided if the object init wasn't such garbage, but here we are with years of old junk and lack of abstraction in the GUI project
ilmerging assemblies somehow ignores the loadFromRemoteSources app
setting, so allow the compiler (user) to specify that the main app
should ignore those security checks.
reference PKHeX.Core, main window loads assemblies & initializes
providing an ISaveProvider and the menustrip control (to insert controls
into)
pretty rough but should allow for inserting external control buttons &
allowing it to edit the UI a little
example: https://github.com/kwsch/PKHeXPluginExample
feedback is appreciated