private void btnAddTrait_Click(object sender, EventArgs e) { Trait newTS = new Trait(); newTS.name = "newTrait"; newTS.tag = "newTraitTag_" + prntForm.mod.nextIdNumber.ToString(); prntForm.traitsList.Add(newTS); refreshListBox(); }
private bool traitExists(Trait itImp) { foreach (Trait it in prntForm.traitsList) { if (it.tag == itImp.tag) { return true; } } return false; }