private void Completed(TaskData taskData) { lock (this) { Tasks.Remove(taskData); } if (Tasks.Count == 0 && OnCompleted != null) { OnCompleted(); } }
private void Started(TaskData taskData) { bool started = false; lock (this) { started = Tasks.Count == 0; Tasks.Add(taskData); } if (started && OnStarted != null) OnStarted(); }
private void Started(TaskData taskData) { bool started = false; lock (this) { started = Tasks.Count == 0; Tasks.Add(taskData); } if (started && OnStarted != null) { OnStarted(); } }
public TaskItem(TaskData taskData) { TaskData = taskData; }