private trpoke7 PrepareTP7() { var pk = pkm.Clone(); pk.Species = CB_Species.SelectedIndex; pk.Form = CB_Forme.SelectedIndex; pk.Level = (byte)NUD_Level.Value; pk.Ability = CB_Ability.SelectedIndex; pk.Item = CB_Item.SelectedIndex; pk.Shiny = CHK_Shiny.Checked; pk.Nature = CB_Nature.SelectedIndex; pk.Gender = CB_Gender.SelectedIndex; pk.Move1 = CB_Move1.SelectedIndex; pk.Move2 = CB_Move2.SelectedIndex; pk.Move3 = CB_Move3.SelectedIndex; pk.Move4 = CB_Move4.SelectedIndex; pk.IV_HP = WinFormsUtil.ToInt32(TB_HPIV); pk.IV_ATK = WinFormsUtil.ToInt32(TB_ATKIV); pk.IV_DEF = WinFormsUtil.ToInt32(TB_DEFIV); pk.IV_SPA = WinFormsUtil.ToInt32(TB_SPAIV); pk.IV_SPE = WinFormsUtil.ToInt32(TB_SPEIV); pk.IV_SPD = WinFormsUtil.ToInt32(TB_SPDIV); pk.EV_HP = WinFormsUtil.ToInt32(TB_HPEV); pk.EV_ATK = WinFormsUtil.ToInt32(TB_ATKEV); pk.EV_DEF = WinFormsUtil.ToInt32(TB_DEFEV); pk.EV_SPA = WinFormsUtil.ToInt32(TB_SPAEV); pk.EV_SPE = WinFormsUtil.ToInt32(TB_SPEEV); pk.EV_SPD = WinFormsUtil.ToInt32(TB_SPDEV); return(pk); }
private void PopulateFieldsTP7(trpoke7 pk) { pkm = pk.Clone(); int spec = pkm.Species, form = pkm.Form; CB_Species.SelectedIndex = spec; CB_Forme.SelectedIndex = form; CB_Ability.SelectedIndex = pkm.Ability; CB_Item.SelectedIndex = pkm.Item; CHK_Shiny.Checked = pkm.Shiny; CB_Gender.SelectedIndex = pkm.Gender; CB_Move1.SelectedIndex = pkm.Move1; CB_Move2.SelectedIndex = pkm.Move2; CB_Move3.SelectedIndex = pkm.Move3; CB_Move4.SelectedIndex = pkm.Move4; updatingStats = true; CB_Nature.SelectedIndex = pkm.Nature; NUD_Level.Value = Math.Min(NUD_Level.Maximum, pkm.Level); TB_HPIV.Text = pkm.IV_HP.ToString(); TB_ATKIV.Text = pkm.IV_ATK.ToString(); TB_DEFIV.Text = pkm.IV_DEF.ToString(); TB_SPAIV.Text = pkm.IV_SPA.ToString(); TB_SPEIV.Text = pkm.IV_SPE.ToString(); TB_SPDIV.Text = pkm.IV_SPD.ToString(); TB_HPEV.Text = pkm.EV_HP.ToString(); TB_ATKEV.Text = pkm.EV_ATK.ToString(); TB_DEFEV.Text = pkm.EV_DEF.ToString(); TB_SPAEV.Text = pkm.EV_SPA.ToString(); TB_SPEEV.Text = pkm.EV_SPE.ToString(); TB_SPDEV.Text = pkm.EV_SPD.ToString(); updatingStats = false; UpdateStats(null, null); }
private void populateFieldsTP7(trpoke7 pk) { pkm = pk.Clone(); int spec = pkm.Species, form = pkm.Form; CB_Species.SelectedIndex = spec; CB_Forme.SelectedIndex = form; CB_Ability.SelectedIndex = pkm.Ability; CB_Item.SelectedIndex = pkm.Item; CHK_Shiny.Checked = pkm.Shiny; CB_Gender.SelectedIndex = pkm.Gender; CB_Move1.SelectedIndex = pkm.Move1; CB_Move2.SelectedIndex = pkm.Move2; CB_Move3.SelectedIndex = pkm.Move3; CB_Move4.SelectedIndex = pkm.Move4; updatingStats = true; CB_Nature.SelectedIndex = pkm.Nature; NUD_Level.Value = Math.Min(NUD_Level.Maximum, pkm.Level); TB_HPIV.Text = pkm.IV_HP.ToString(); TB_ATKIV.Text = pkm.IV_ATK.ToString(); TB_DEFIV.Text = pkm.IV_DEF.ToString(); TB_SPAIV.Text = pkm.IV_SPA.ToString(); TB_SPEIV.Text = pkm.IV_SPE.ToString(); TB_SPDIV.Text = pkm.IV_SPD.ToString(); TB_HPEV.Text = pkm.EV_HP.ToString(); TB_ATKEV.Text = pkm.EV_ATK.ToString(); TB_DEFEV.Text = pkm.EV_DEF.ToString(); TB_SPAEV.Text = pkm.EV_SPA.ToString(); TB_SPEEV.Text = pkm.EV_SPE.ToString(); TB_SPDEV.Text = pkm.EV_SPD.ToString(); updatingStats = false; updateStats(null, null); }