Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 private void OnWorkCompleted()
 {
     ReportCompletedEvent?.Invoke(this, EventArgs.Empty);
 }