//open spell creation form editing selected spell private void editSpellButton_Click(object sender, EventArgs e) { int index = spellListBox.SelectedIndex; if (index >= 0) { SpellCreationForm spellCreation = new SpellCreationForm(searchSpells[index], searchSpells[index].ID); spellCreation.ShowDialog(this); } }
//clicked create spell button private void CreateSpell_ButtonClick(object sender, EventArgs e) { SpellCreationForm spellCreation = new SpellCreationForm(); spellCreation.ShowDialog(this); }