/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void EditLinkEvo_Button_Click(object sender, RoutedEventArgs e) { if (FormsAndEvos_List.SelectedItem == null) { return; } // Returns if selection is null Link_Evolution link = new Link_Evolution(((EvoLinks)FormsAndEvos_List.SelectedItem).LinkData); // Creates a new EvoLink Window to modify link with link.ShowDialog(); // Shows the Link Window }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void LinkEvo_Button_Click(object sender, RoutedEventArgs e) { Link_Evolution link = new Link_Evolution(); // Create a new EvoLink Window to create a link with bool? add = link.ShowDialog(); // Shows the Link Window, Creates a Dialog to return true if it added successfully if (add == true) { string name = SaveData.PokedexData.Pokemon.Find(x => x.Species_DexID == link.LinkData.Pokemon_Evo).Species_Name; FormsAndEvos_List.Items.Add(new EvoLinks(link.LinkData, name));// Add EvoLink to list if not canceled } }