Esempio n. 1
0
 private static void CreateTaskList()//Create new list
 {
     Console.Write("Create new taskList? (%Title%): "); string answer11 = Console.ReadLine();
     if (!answer11.Equals(""))
     {
         currentUser = MainControl.Add(answer11, currentUser); // Add new List to ListOfList and refresh currentUser link
         Console.WriteLine("Task List \"" + currentUser.ListOfLists.Last().Title + "\" has been created ");
     }
 }
Esempio n. 2
0
        private static void AddTaskInCurrentList()//Adding new task in current list
        {
            Console.Write("Add new task in current list ? (%TitleTask%): "); string answer12 = Console.ReadLine();
            if (!answer12.Equals(""))
            {
                Console.Write("Input new task: "); string answerNewTask = Console.ReadLine();
                currentUser = MainControl.Add(answer12, answerNewTask, currentList, currentUser);
                currentList = MainControl.FindList(currentList.Title, UserLab.Get().GetUser(currentUser.Id));

                ToDoTask task = MainControl.FindTask(answer12, currentList);
                Console.WriteLine("\nIn tasklist \"" + currentList.Title + "\" succesfully has been added new task \"" + task.Title + "\"");
            }
        }