public void DoWork() { var hours = 8; for (int i = 0; i <= hours; i++) { ReportEvent?.Invoke(i, ActionType.Working, new Location("KMW", "Warsaw")); Thread.Sleep(500); } ReportCompletedEvent?.Invoke(this, EventArgs.Empty); }
public void DoWork() { var hours = 8; for (int i = 0; i <= hours; i++) { var eventArgs = new ReportHoursEventArgs { Hours = i, ActionType = ActionType.Working, Location = new Location("KMW", "Warsaw") }; ReportEvent?.Invoke(this, eventArgs); Thread.Sleep(500); } ReportCompletedEvent?.Invoke(this, EventArgs.Empty); }
private void OnWorkCompleted() { ReportCompletedEvent?.Invoke(this, EventArgs.Empty); }