public static void SetDueDateTime(string listId, string taskSeriesId, string taskId, string due) { try { if (String.IsNullOrEmpty(due)) { rtm.TasksSetDueDate(timeline, listId, taskSeriesId, taskId); } else { rtm.TasksSetDueDateParse(timeline, listId, taskSeriesId, taskId, due); } } catch (RtmException e) { Log <RTM> .Debug(e.Message); return; } if (String.IsNullOrEmpty(due)) { FinalizeAction(AddinManager.CurrentLocalizer.GetString("Due Date/Time Unset"), AddinManager.CurrentLocalizer.GetString("The due date/time of the selected task in your Remember The Milk task list has been unset.")); } else { FinalizeAction(AddinManager.CurrentLocalizer.GetString("Due Date/Time Changed"), AddinManager.CurrentLocalizer.GetString("The due date/time of the selected task in your Remember The Milk task list has been changed.")); } }
public void UpdateTaskDueDate(RtmTask task) { if (rtm != null) { try { List list; if (task.DueDate == DateTime.MinValue) { list = rtm.TasksSetDueDate(timeline, task.ListID, task.SeriesTaskID, task.TaskTaskID); } else { list = rtm.TasksSetDueDate(timeline, task.ListID, task.SeriesTaskID, task.TaskTaskID, task.DueDateString); } UpdateTaskFromResult(list); } catch (Exception e) { Logger.Debug("Unable to set due date on task: " + task.Name); Logger.Debug(e.ToString()); } } }