Guest User

Untitled

a guest
Jun 14th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. bool running = true;
  2. char input;
  3.  
  4. Console.WriteLine("===========================================================");
  5. while (running)
  6. {
  7. Console.WriteLine("Please enter your credentials.");
  8. Console.WriteLine("User Name: ");
  9. userName = Convert.ToString(Console.ReadLine());
  10. Console.WriteLine("Password: ");
  11. password = Convert.ToString(Console.ReadLine());
  12.  
  13. Console.Write("Confirm credentials \n" +
  14. "Username: " + userName + "\n" +
  15. "Password: " + password + "\n" +
  16. "Confirm: (y/n)");
  17.  
  18. input = Char.ToLower(Convert.ToChar(Console.Read()));
  19.  
  20. switch (input)
  21. {
  22. case 'y':
  23. if(userManager.Login(userName, password))
  24. {
  25. running = false;
  26. Console.WriteLine("===========================================================");
  27. }
  28. continue;
  29.  
  30. case 'n':
  31. continue;
  32.  
  33.  
  34. default:
  35. Logging.Log(ResourceStrings.InvalidInput);
  36. continue;
  37. }
  38. }
Add Comment
Please, Sign In to add comment