Exemplo n.º 1
0
        private void HandleTaskStop(Object obj, TaskStoppedEventArgs e)
        {
            StartTasksAsync();
            var task = obj as UserTaskBase;

            if (task != null)
            {
                task.Stop -= this.HandleTaskStop;
            }
        }
Exemplo n.º 2
0
        protected virtual void OnTaskStopped(TaskStoppedEventArgs e)
        {
            var delegates = Stop?.GetInvocationList();

            if (delegates == null)
            {
                return;
            }
            foreach (EventHandler <TaskStoppedEventArgs> d in delegates)
            {
                d?.Invoke(this, e);
            }
        }