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); }
public void GoToWork() { //logic OnCame?.Invoke(this, DateTime.Now); }
public void GoToWork() { //logic OnCame?.Invoke(this, Time); }
public void GoToOffice() { OnCame?.Invoke(this, DateTime.Now); }
public void Came() { OnCame?.Invoke(this, DateTime.Now); }
public void GoToWork(DateTime timeArrive) { OnCame?.Invoke(this, timeArrive); Console.WriteLine(); }