public static void RemoveTask(Guid taskID) { var task = ObjTasks.FirstOrDefault(objTask => objTask.TaskID == taskID); if (task != null) { ObjTasks.Remove(task); } }
public static ObjTask GetTaskInfo(Guid taskID) { ObjTask taskInfo = null; if (!ObjTasks.IsNull()) { taskInfo = ObjTasks.FirstOrDefault(task => task.TaskID == taskID); } return(taskInfo); }
public static void FocusTask(Guid taskID) { var task = ObjTasks.FirstOrDefault(t => t.TaskID == taskID); if (!task.IsNull()) { if (!CurrentTask.IsNull()) { CurrentTask.IsFocusing = false; } task.IsFocusing = true; } }
public static void ClickTask(Guid taskID, bool keepSelect) { if (!keepSelect) { ObjTasks.Where(t => t.IsSelected).ToList().ForEach(t => t.IsSelected = false); } var task = ObjTasks.FirstOrDefault(t => t.TaskID == taskID); if (task != null) { task.IsSelected = !task.IsSelected; } }