private void btnAddRace_Click(object sender, EventArgs e) { Race newRace = new Race(); newRace.name = "newRace"; newRace.tag = "newRace_" + prntForm.mod.nextIdNumber.ToString(); prntForm.racesList.Add(newRace); fillAllowedTraitList(); refreshListBox(); }
private bool raceExists(Race itImp) { foreach (Race it in prntForm.racesList) { if (it.tag == itImp.tag) { return true; } } return false; }