/// <summary> /// Изменение статуса задачи /// </summary> /// <param name="task">Задание</param> public void DisableTaskStatus(MyTaskView task) { using (TaskService ts = new TaskService()) { ts.RootFolder.SubFolders.Where(x => x.Name == @"Shutdowner").FirstOrDefault().AllTasks.Where(x => x.Name == task.Name).FirstOrDefault().Enabled = false; MyTasks.Where(x => x.Name == task.Name).FirstOrDefault().Enabled = false; } }
/// <summary> /// Удаление задания /// </summary> /// <param name="task">Задание</param> public void RemoveTask(MyTaskView task) { MyTasks.Remove(task); using (TaskService ts = new TaskService()) { ts.RootFolder.SubFolders.Where(x => x.Name == @"Shutdowner").FirstOrDefault().DeleteTask(task.Name); } }