PKHeX/PKHeX.WinForms/Controls/PKM Editor/EditPK1.cs
Kurt 6f09f7b89e Add catch rate editor control
#2132
has a 'reset' button which tries to set a legal value
has a 'clear' button which sets it to zero, similar to gen2 removing an
item
2018-09-30 10:16:45 -07:00

36 lines
768 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(pkm);
CR_PK1.LoadPK1(pk1);
// Attempt to detect language
CB_Language.SelectedValue = PKX.GetVCLanguage(pk1);
LoadPartyStats(pk1);
UpdateStats();
}
private PKM PreparePK1()
{
if (!(pkm is PK1 pk1))
return null;
SaveMisc1(pk1);
SavePartyStats(pk1);
pk1.FixMoves();
pk1.RefreshChecksum();
return pk1;
}
}
}