private void btnAddSpell_Click(object sender, EventArgs e) { Spell newTS = new Spell(); newTS.name = "newSpell"; newTS.tag = "newSpellTag_" + prntForm.mod.nextIdNumber.ToString(); prntForm.spellsList.Add(newTS); refreshListBox(); }
private bool spellExists(Spell itImp) { foreach (Spell it in prntForm.spellsList) { if (it.tag == itImp.tag) { return true; } } return false; }