Advertisement
Guest User

Untitled

a guest
Sep 30th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.36 KB | None | 0 0
  1.         public static void registerMenu(out string email, out string username, out string password, out string phoneNumber, out string isAdmin)
  2.         {
  3.             do
  4.             {
  5.                 if (adminRegisterer == false)
  6.                 {
  7.                     isAdmin = "0";
  8.                 }
  9.                 else
  10.                 {
  11.                     isAdmin = "1";
  12.                 }
  13.                 string passwordConfirm;
  14.                 Console.Clear();
  15.                 Console.WriteLine("To the registration, please give the following informations.");
  16.  
  17.                 //felhasználói adatok bekérése
  18.                 Console.WriteLine("Email cím: ");
  19.                 email = Convert.ToString(Console.ReadLine());
  20.                 Console.WriteLine("Teljes név: ");
  21.                 username = Convert.ToString(Console.ReadLine());
  22.  
  23.                 //a két bekért jelszó egyezésének ellenőrzése
  24.                 bool actualCorrectionCheck = false;
  25.                 do
  26.                 {
  27.                     Console.WriteLine("Jelszó: ");
  28.                     password = Convert.ToString(Console.ReadLine());
  29.                     Console.WriteLine("Jelszó újra: ");
  30.                     passwordConfirm = Convert.ToString(Console.ReadLine());
  31.                     if (password != passwordConfirm)
  32.                     {
  33.                         Console.WriteLine("A két megadott jelszónak meg kell egyeznie!\nKérem adja meg újra!");
  34.                     }
  35.                     else
  36.                     {
  37.                         actualCorrectionCheck = true;
  38.                     }
  39.                 } while (actualCorrectionCheck == false);
  40.                
  41.                 phoneNumber = null;
  42.                 phoneNumber = phoneNumberCorrection(ref phoneNumber);
  43.  
  44.                 Console.Clear();
  45.                 Console.WriteLine("Successful registration!\n");
  46.                 Console.WriteLine("Registered account datas:");
  47.                 Console.WriteLine("Name: " + username);
  48.                 Console.WriteLine("Password: " + password);
  49.                 Console.WriteLine("Email: " + email);
  50.                 Console.WriteLine("Phone Number: " + phoneNumber + "\n");
  51.                 Console.WriteLine("Press any key to continue...");
  52.                 Console.ReadKey();
  53.                 Console.Clear();
  54.                 return;
  55.             } while (true);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement