Exemple #1
0
        /// <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++);
        }
Exemple #2
0
 /// <summary>
 /// Stop Task
 /// </summary>
 public static void StopTask()
 {
     TaskGo.ForEach(t => t.Work = false);
 }
Exemple #3
0
 /// <summary>
 /// Task Work
 /// </summary>
 /// <returns></returns>
 public static bool TaskWork(int id)
 {
     return(TaskGo.SingleOrDefault(t => t.ID == id).Work);
 }
Exemple #4
0
 /// <summary>
 /// Task Work
 /// </summary>
 /// <returns></returns>
 public static bool TaskWork(int id)
 {
     return(TaskGo.Find(t => t.ID == id)?.Work ?? false);
 }