Exemplo n.º 1
0
        public void RemoveWorker(Person person)
        {
            MessageHello greetByPerson = new MessageHello(person.Greet);

            greetByUs   -= greetByPerson;
            person.Came -= new EventHandler(Person_Came);
            workers.Remove(person);
            person.Gone += new EventHandler(Person_Gone);
            person.IsGone();
            MessageBye byeByPerson = new MessageBye(person.GoodBye);

            byeByUs -= byeByPerson;
            if (byeByUs != null)
            {
                byeByUs(person);
            }
            person.Gone -= new EventHandler(Person_Gone);
        }