Example #1
0
        public override void Execute(TaskCollection tasks)
        {
            Console.Write("Are you sure? (y/N): ");
            if (Console.ReadKey().Key == ConsoleKey.Y)
            {
                tasks.Clear();

                Program.Status = "Task list cleared!";
                return;
            }
            Program.Status = "You didn't say yes, the list has not been cleared.";
        }
Example #2
0
        private void UpdateCollection()
        {
            if (TaskCollection.Count >= 1)
            {
                TaskCollection.Clear();
            }

            foreach (var task in _dataBase.QueryItem())
            {
                TaskCollection.Add(task);
            }
        }
Example #3
0
 /// <summary>
 /// Clears the task collection when changing projects
 /// </summary>
 public void ClearTaskCollections()
 {
     TaskCollection.Clear();
     FilteredTaskCollection.Clear();
 }