A task list is a collection of tasks grouped together. It may have a title and a due date.
상속: AttributedTask
예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #4
0
 public abstract void visit(TaskList taskList);
예제 #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 ();
        }
예제 #6
0
        /// <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);
        }
예제 #7
0
        /// <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 ();
        }