Advertisement
Guest User

Untitled

a guest
Apr 25th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1.  
  2. public void Show()
  3. {
  4. while (true)
  5. {
  6. Console.Clear();
  7.  
  8. Console.Write("Username : ");
  9. string username = Console.ReadLine();
  10.  
  11. Console.Write("Password : ");
  12. string password = Console.ReadLine();
  13.  
  14. Authentication.AuthenticateUser(username, password);
  15.  
  16. if (Authentication.LoggedUser != null)
  17. {
  18. Console.WriteLine("Welcome " + Authentication.LoggedUser.username);
  19. Console.ReadKey(true);
  20. break;
  21. }
  22. else
  23. {
  24. Console.WriteLine("Invalid username or password");
  25. Console.ReadKey(true);
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement