A task list is a collection of tasks grouped together. It may have a title and a due date.
Inheritance: AttributedTask
        public override void visit(TaskList taskList)
        {
            visited.Add (taskList);

            //Can't check here because do not know about other subtasks of the supertasks
            foreach (Task task in taskList.SuperTasks)
                if (!visited.Contains (task))
                    this.visit (task);
        }
        public override void visit(TaskList taskList)
        {
            if (visited.Contains (taskList))
                return;

            visited.Add (taskList);
            foreach (Task task in taskList.Tasks)
                if (!visited.Contains (task))
                    this.visit (task);
        }
        public override void visit(TaskList tl)
        {
            visited.Add (tl);

            DateTime? date = tl.DueDate;
            if (date != null){
                result = ((DateTime) date) < result? (DateTime)date : result;
            }

            foreach (Task t in tl.Tasks)
                if (!visited.Contains (t))
                    this.visit (t);
        }
Beispiel #4
0
 public abstract void visit(TaskList taskList);
Beispiel #5
0
        /// <summary>
        /// Transfer all the tasks to another tasklist, used for merging
        /// </summary>
        /// <param name="tasklist">
        /// The other <see cref="TaskList"/> tasklist to send the tasks to
        /// </param>
        public void TransferTasksTo(TaskList tasklist)
        {
            List<Task> to_transfer = new List<Task> ();

            foreach (Task task in Tasks) {
                if (!task.WasDeleted) {
                    Logger.Debug ("adding task " + task.Description ());
                    to_transfer.Add (task);
                }
            }

            foreach (Task task in to_transfer) {
                tasklist.AddFinishedTask (task);
                task.RemoveTag (Tag);
                Tasks.Remove (task);
            }

            Delete ();
            tasklist.LockEnd ();
        }
        /// <summary>
        /// Add a new tasklist into the buffer
        /// </summary>
        void OnAddListActivated(object sender, EventArgs args)
        {
            if (utils.InTaskList ())
                return;

            TaskList tl = new TaskList (Note);
            //tl.Name = "New TaskList!";

            addin.TaskLists.Add (tl);
        }
        /// <summary>
        /// Fixes all the items in the fix_list
        /// </summary>
        public void FixList()
        {
            StopListeners ();

            foreach (FixAction action in fix_list)
            {
                if (action.Priority)
                    action.fix ();
            }

            foreach (FixAction action in fix_list)
            {
                if (!action.Priority)
                    action.fix ();
            }
            fix_list.Clear ();

            if (lock_end_needed != null)
            {
                if (lock_end_needed.LockEnd ())
                    lock_end_needed.PlaceCursorAtEnd ();

                lock_end_needed = null;
            }

            StartListeners ();
        }