Exemple #1
0
 /// <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;
     }
 }
Exemple #2
0
 /// <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);
     }
 }