public void DeleteTask(ITask task) { RtmTask rtmTask = task as RtmTask; if (rtm != null) { try { rtm.TasksDelete(timeline, rtmTask.ListID, rtmTask.SeriesTaskID, rtmTask.TaskTaskID); lock (taskLock) { Gtk.Application.Invoke(delegate { if (taskIters.ContainsKey(rtmTask.ID)) { Gtk.TreeIter iter = taskIters[rtmTask.ID]; taskStore.Remove(ref iter); taskIters.Remove(rtmTask.ID); } }); } } catch (Exception e) { Logger.Debug("Unable to delete task: " + task.Name); Logger.Debug(e.ToString()); } } else { throw new Exception("Unable to communicate with Remember The Milk"); } }
public static void DeleteTask(string listId, string taskSeriesId, string taskId) { try { rtm.TasksDelete(timeline, listId, taskSeriesId, taskId); } catch (RtmException e) { Log <RTM> .Debug(e.Message); return; } FinalizeAction(AddinManager.CurrentLocalizer.GetString("Task Deleted"), AddinManager.CurrentLocalizer.GetString("The selected task has been successfully deleted from your Remember The Milk task list")); }