protected void TaskCompleted(object sender, RunWorkerCompletedEventArgs e) { SequentialTask t = current_task.Current; t.Selected = false; if (canceled) { Stopped(); return; } RunNextTask(); }
protected void RunNextTask() { while (current_task.MoveNext()) { SequentialTask t = current_task.Current; if (t.Selected) { t.TaskCompleted += TaskCompleted; if (t.Start()) { return; } } } Stopped(); return; }
public void AddTask(SequentialTask task) { tasks.Add(task); }