public TaskItem(String task, DateTime deadline, REPEAT_TYPE type) { this.task = task; this.deadline = deadline; this.repeatType = type; this.id = DateTime.Now.ToFileTimeUtc(); }
// IDを指定してタスク内容を変更する public void editTaskItemByID(long id, String task, DateTime deadline, REPEAT_TYPE type) { TaskItem taskItem = getTaskItemByID(id); if (null != taskItem) { taskItem.Task = task; taskItem.Deadline = deadline; taskItem.RepeatType = type; this.taskList.Sort(delegate(TaskItem a, TaskItem b) { return(a.Deadline.CompareTo(b.Deadline)); }); } }