Пример #1
0
        public void AddActor(Actor newActor)
        {
            if (ListActors.Any(item => item.ID == newActor.ID))
            {
                return;
            }

            ListActors.Add(newActor);
            Dirty = true;
        }
Пример #2
0
        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);
        }