public void Register() { Console.WriteLine("Write username:"******"Write your password: "******"You registered successfully"); Console.WriteLine("Now you can log in"); LogIn(); } catch { Console.WriteLine("You did not reigstered"); System.Threading.Thread.Sleep(1000); Console.Clear(); Program.Start(); } System.Threading.Thread.Sleep(1000); Console.Clear(); // Program.Start(); MenuOption.MainMenu(); }
public void LogIn() { Console.WriteLine("Write your username: "******"Write your password: "******"You logged in successfully"); Console.WriteLine("Displaying main menu......"); } catch { Console.WriteLine("Wrong credentials"); System.Threading.Thread.Sleep(1000); Console.Clear(); Program.Start(); } System.Threading.Thread.Sleep(1000); Console.Clear(); MenuOption.MainMenu(); }
public static void MainMenu() { MenuOption menuOption = new MenuOption(); var menu = menuOption.BuildMainMenu(); DisplayMainMenu(menu); var menuChoice = GetMenuSelection(menu); menuChoice.ItemHandler(); }
public void ListTaskLists() { User user = _securityManager.GetLoggedUser(); Console.Clear(); Console.WriteLine("Listing available Task Lists: "); Console.WriteLine(""); List <TaskList> listTaskList = _taskListManager.ListTaskLists(user); foreach (var row in listTaskList) { Console.WriteLine(row.Id + " " + row.Name); } Console.WriteLine("Done"); MenuOption.TaskListMenu(); }
public void ListTaskListItems() { try { TaskList taskList = _taskListManager.GetTaskList(ACTUAL_TASK_LIST_ID); List <TaskListItem> listTaskListItems = _taskListManager.ListTaskListItems(taskList); Console.Clear(); Console.WriteLine("Listing available Task List Items: "); Console.WriteLine(""); foreach (var row in listTaskListItems) { Console.WriteLine(row.Id + " " + row.Text + " " + row.IsCompleted); } Console.WriteLine("Done"); MenuOption.TaskMenu(); } catch { Console.WriteLine("There is no such a Task List"); System.Threading.Thread.Sleep(1000); Console.Clear(); _consoleTaskList.ListTaskLists(); } }