private void btn_loadXML_Click(object sender, EventArgs e) { System.IO.StreamReader sr; using (FolderBrowserDialog fbd = new FolderBrowserDialog()) { if (fbd.ShowDialog() == DialogResult.OK) { folder = fbd.SelectedPath; } } try { sr = new System.IO.StreamReader(folder + "\\pokemon.xml"); pokedex = Pokedex.ObtenirDadesPokedex(sr, "pokedex", "pokemon"); pokedexKeys = Pokedex.GetPokedexNameNum(pokedex); /*foreach (KeyValuePair<string, int> reg in pokedexKeys) * { * comboBox1.Items.Add(reg.Key); * }*/ if (!loaded) { dgv_pkmnStats.BorderStyle = System.Windows.Forms.BorderStyle.None; dgv_pkmnStats.Columns.Add("stat", "stat"); dgv_pkmnStats.Columns.Add("value", "value"); dgv_evos.Columns.Add("pokemon", "id"); loaded = true; } } catch (System.IO.FileNotFoundException excpt) { } }