Exemple #1
0
        private IUser SignIn()
        {
            Console.Write("\nEnter your user name: ");
            string username = Console.ReadLine();

            Console.Write("Enter your password: ");
            string password = ConsoleHelpers.ReadPasswordLine();

            return((IUser)mUserDb.Login(username, password).User);
        }
Exemple #2
0
 private IUser Signup()
 {
     while (true)
     {
         Console.Write("\nChoose a username: "******"Username Taken!");
             continue;
         }
         Console.Write("\nType your Password: "******"\nType your Password again: ");
         string password2 = ConsoleHelpers.ReadPasswordLine();
         if (password != password2)
         {
             Console.WriteLine("\nThe passwords aren't the same!");
             continue;
         }
         mUserDb.AddUser(name, password);
         return(mUserDb.GetUser(name));
     }
 }