mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-30 07:50:32 +00:00
b41f2a3062
Extract Species Name logic to SpeciesName Extract Language logic to Language Remove FormConverter wrapper for string[] fetch Rearrange some logic to more appropriate locations, update access modifiers / types Move some pkm array methods to arrayutil, make generic PKX.GetVCLanguage was a dupe of _K12.GuessedLanguage() so just expose the method PKX is now back to pkm data manip only
36 lines
767 B
C#
36 lines
767 B
C#
using PKHeX.Core;
|
|
|
|
namespace PKHeX.WinForms.Controls
|
|
{
|
|
public partial class PKMEditor
|
|
{
|
|
private void PopulateFieldsPK1()
|
|
{
|
|
if (!(pkm is PK1 pk1))
|
|
return;
|
|
|
|
LoadMisc1(pk1);
|
|
TID_Trainer.LoadIDValues(pk1);
|
|
CR_PK1.LoadPK1(pk1);
|
|
|
|
// Attempt to detect language
|
|
CB_Language.SelectedValue = pk1.GuessedLanguage();
|
|
|
|
LoadPartyStats(pk1);
|
|
UpdateStats();
|
|
}
|
|
|
|
private PKM PreparePK1()
|
|
{
|
|
if (!(pkm is PK1 pk1))
|
|
return null;
|
|
|
|
SaveMisc1(pk1);
|
|
|
|
SavePartyStats(pk1);
|
|
pk1.FixMoves();
|
|
pk1.RefreshChecksum();
|
|
return pk1;
|
|
}
|
|
}
|
|
}
|