Ejemplo n.º 1
0
        public void DoWork(int hours, WorkType type)
        {
            for (int i = 0; i < hours; i++)
            {
                if (this.WorkPerformed != null)
                {
                    this.WorkPerformed.Invoke(i + 1, type);
                }
            }

            if (this.WorkComplete != null)
            {
                WorkComplete.Invoke(this, new WorkCompletedEventArgs(hours, type));
            }
        }
Ejemplo n.º 2
0
 protected virtual void OnWorkComplete(object sender, EventArgs e)
 {
     WorkComplete?.Invoke(sender, e);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Interprocess messege recived handler
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnIpcCommunicationMessageRecived(object sender, WorkResult e)
 {
     m_WorkCommandResults[e.Guid] = e;
     WorkComplete?.Invoke(this, new WorkCompleteEventArgs(e.Guid));
 }