/// <summary> /// Constructor that is created from an RTM Task Series /// </summary> /// <param name="taskSeries"> /// A <see cref="TaskSeries"/> /// </param> public RtmTask(TaskSeries taskSeries, RtmBackend be, string listID) { this.taskSeries = taskSeries; this.rtmBackend = be; this.category = be.GetCategory(listID); if(CompletionDate == DateTime.MinValue ) state = TaskState.Active; else state = TaskState.Completed; notes = new List<INote>(); if (taskSeries.Notes.NoteCollection != null) { foreach(Note note in taskSeries.Notes.NoteCollection) { RtmNote rtmNote = new RtmNote(note); notes.Add(rtmNote); } } }
public RtmCategory(List list) { this.list = list; }
public RtmTask UpdateTaskFromResult(List list) { TaskSeries ts = list.TaskSeriesCollection[0]; if(ts != null) { RtmTask rtmTask = new RtmTask(ts, this, list.ID); lock(taskLock) { Gtk.Application.Invoke ( delegate { if(taskIters.ContainsKey(rtmTask.ID)) { Gtk.TreeIter iter = taskIters[rtmTask.ID]; taskStore.SetValue (iter, 0, rtmTask); } else { Gtk.TreeIter iter = taskStore.AppendNode(); taskIters.Add(rtmTask.ID, iter); taskStore.SetValue (iter, 0, rtmTask); } }); } return rtmTask; } return null; }