public static void Register() { Console.ForegroundColor = ConsoleColor.Blue; Console.WriteLine("Thank you for choosing to register to Kanban!"); Console.ResetColor(); Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("NOTE : In order to go back to the start menu, press '-1' at any time."); Console.WriteLine("Please enter a valid email address, that hasn't been used in this system.\n"); Console.ResetColor(); Console.Write("EmailAddress : "); string email = Console.ReadLine(); email = CheckEmail(email); //check if the email is valid and if it is new in the system if (email != "-1") { Console.ForegroundColor = ConsoleColor.Blue; Console.WriteLine("Please enter a password."); Console.WriteLine("Your password must be in length of 4 to 20 characters,"); Console.WriteLine("and must include at least one capital character, one small character and a number.\n"); Console.ResetColor(); Console.Write("Password : "******"-1")// the user doesn't want to go to the menu { Console.ForegroundColor = ConsoleColor.Blue; Console.WriteLine("In this system you can limit the number of tasks in each column."); Console.WriteLine("Please insert a number which will limit your tasks quantity in each column.\n"); Console.ResetColor(); string maxLength = Console.ReadLine(); int validLength = ValidNumber(maxLength); while (validLength == -1) { Console.ForegroundColor = ConsoleColor.Red; Log.Info("Invalid input"); Console.WriteLine("Please enter a valid number."); Console.ResetColor(); maxLength = Console.ReadLine(); validLength = ValidNumber(maxLength); } kanban.Register(email, password, validLength); Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("Congratulations! You are now registered to Kanban!"); Console.ResetColor(); Log.Info("New registration by user with email: " + email); } } else //if the user wants to go to home menu { Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("Registretion failed."); Console.ResetColor(); Start(); } }
public void Register(string email, string password) { kanban.Register(email, password); }
public void Register() { //length kanban.Register(email, password); }