private void update(int i, int j, PokemonSearch.PokemonInfo poke) { if (poke == null) { qq[i, j].Name.SelectedItem = "烈咬陆鲨"; qq[i, j].poke = Pokemondata.GetpPokemonUSE("烈咬陆鲨"); for (int index1 = 0; index1 < 4; ++index1) { qq[i, j].Move[index1++].Text = ""; } qq[i, j].Item.Text = ""; qq[i, j].Nature.Text = ""; qq[i, j].Ability.Text = ""; } else { qq[i, j].Name.SelectedItem = poke.name; qq[i, j].poke = poke; int index1 = 0; foreach (String item in poke.move) { qq[i, j].Move[index1++].Text = item; } while (index1 < 4) { qq[i, j].Move[index1++].Text = ""; } qq[i, j].Item.Text = poke.Item; qq[i, j].Nature.Text = poke.Nature.name; qq[i, j].Ability.Text = poke.Ability; } }
public void SetPokemon(string poname) { if (poname == null) { this.poke = Pokemondata.GetpPokemonUSE("烈咬陆鲨"); } else if (poname != this.poke.name) { this.poke = Pokemondata.GetpPokemonUSE(poname); } }