Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool running = true;
- char input;
- Console.WriteLine("===========================================================");
- while (running)
- {
- Console.WriteLine("Please enter your credentials.");
- Console.WriteLine("User Name: ");
- userName = Convert.ToString(Console.ReadLine());
- Console.WriteLine("Password: ");
- password = Convert.ToString(Console.ReadLine());
- Console.Write("Confirm credentials \n" +
- "Username: " + userName + "\n" +
- "Password: " + password + "\n" +
- "Confirm: (y/n)");
- input = Char.ToLower(Convert.ToChar(Console.Read()));
- switch (input)
- {
- case 'y':
- if(userManager.Login(userName, password))
- {
- running = false;
- Console.WriteLine("===========================================================");
- }
- continue;
- case 'n':
- continue;
- default:
- Logging.Log(ResourceStrings.InvalidInput);
- continue;
- }
- }
Add Comment
Please, Sign In to add comment