Exemple #1
0
 //событие прихода в офис
 public void Came(double time)
 {
     if (CameEvent != null)
     {
         MyEventArgs m = new MyEventArgs(time);
         CameEvent(this, m);
     }
 }
Exemple #2
0
        public void OnCame(object sender, MyEventArgs e)
        {
            var p = sender as Person;

            Console.WriteLine("\n(На работу пришел {0} (в {1:0.00}))", p.Name, e.Time);
            foreach (var person in PersonOnWork)
            {
                person.HelloAnotherPerson(p, e.Time);
            }
            PersonOnWork.Add(p);
        }