void SpellsetAddSpellClick(object sender, EventArgs e) { MonsterSpellForm form = new MonsterSpellForm(); if (form.ShowDialog() == DialogResult.OK) { MonsterXfer.SpellEntry entry = form.GetSpell(); customSpellSet.Items.Add(entry); Xfer.KnownSpells.Add(entry); } }
void CustomSpellSetDoubleClick(object sender, EventArgs e) { int index = customSpellSet.SelectedIndex; if (index >= 0) { MonsterSpellForm form = new MonsterSpellForm(); form.SetSpell(Xfer.KnownSpells[index]); if (form.ShowDialog() == DialogResult.OK) { Xfer.KnownSpells[index] = form.GetSpell(); customSpellSet.Items[index] = Xfer.KnownSpells[index]; } } }