/// <summary> /// Start Task /// </summary> /// <returns></returns> public static int StartTask() { TaskGo.Add(new TaskGo(TaskNbr)); TaskGo.Where(t => t.ID < TaskNbr).ToList().ForEach(t => t.Work = false); return(TaskNbr++); }
/// <summary> /// Stop Task /// </summary> public static void StopTask() { TaskGo.ForEach(t => t.Work = false); }
/// <summary> /// Task Work /// </summary> /// <returns></returns> public static bool TaskWork(int id) { return(TaskGo.SingleOrDefault(t => t.ID == id).Work); }
/// <summary> /// Task Work /// </summary> /// <returns></returns> public static bool TaskWork(int id) { return(TaskGo.Find(t => t.ID == id)?.Work ?? false); }