public void newTaskFile(String url, String filename, int idref) { Task t = new TaskFile(this, url, filename, idref); if (tasks.Count == 0) { tasks.AddFirst(t); if (running) { t.Start(); } } else if (!running) { tasks.AddLast(t); return; } else { LinkedListNode <Task> node = tasks.First; while (node.Value.Running) { node = node.Next; if (node == null) { tasks.AddLast(t); return; } } tasks.AddBefore(node, t); } }
public TaskFile(TaskFile task) : this(task.tasklist, task.url, task.filename, task.TaskIdref) { }