public void Add(Person p, DateTime dt)
        {
            IConsole      link = p;
            StringBuilder sb   = new StringBuilder();

            sb.AppendFormat("\n[На работу пришел {0}]", p.Name);
            link.WriteLine(sb);

            OnCame?.Invoke(this, new OfficeEventArgs(p, dt));
            OnCame  += p.Greet;
            OnLeave += p.Goodbye;
            office.Add(p);
        }
Beispiel #2
0
 public void GoToWork()
 {
     //logic
     OnCame?.Invoke(this, DateTime.Now);
 }
Beispiel #3
0
 public void GoToWork()
 {
     //logic
     OnCame?.Invoke(this, Time);
 }
Beispiel #4
0
 public void GoToOffice()
 {
     OnCame?.Invoke(this, DateTime.Now);
 }
Beispiel #5
0
 public void Came()
 {
     OnCame?.Invoke(this, DateTime.Now);
 }
 public void GoToWork(DateTime timeArrive)
 {
     OnCame?.Invoke(this, timeArrive);
     Console.WriteLine();
 }