public void AddActor(Actor newActor) { if (ListActors.Any(item => item.ID == newActor.ID)) { return; } ListActors.Add(newActor); Dirty = true; }
public bool ChangeActorID(Actor actor, string newID) { if (newID == String.Empty) //Forbid empty string { return(false); } if (ListActors.Any(item => item.ID == newID)) //Forbid two actors with same ID { return(false); } actor.ID = newID; return(true); }