public void SelectInLoginMenu(List <Games> gameLibrary, List <Users> userList) { AdminMenus adminMenus = new AdminMenus(); ConsoleKeyInfo option; option = Console.ReadKey(true); if (option.Key == ConsoleKey.NumPad1) { Console.Clear(); adminMenus.MenuLogo(); LoginAccount(gameLibrary, userList); } else if (option.Key == ConsoleKey.NumPad2) { CreateUser(userList); Console.WriteLine("Account creation succesful!"); Thread.Sleep(500); Console.WriteLine("Logging in."); Thread.Sleep(1500); userMenus.AccountMenu(userList[userList.Count - 1].Library, userList, userList[userList.Count - 1], gameLibrary); } else if (option.Key == ConsoleKey.NumPad3) { Environment.Exit(0); } else { Console.WriteLine("Choose one of the 3 Options"); SelectInLoginMenu(gameLibrary, userList); } }
public void ShowMainTopBar(Users user) { Console.Clear(); AdminMenus adminMenus = new AdminMenus(); adminMenus.MenuLogo(); Console.WriteLine(layout.Button("1.Library", "2.Store", "3.Friends", $"4.{user.Username}", "5.Logout")); }
public void ChangeConsoleColor() { AdminMenus adminMenus = new AdminMenus(); Console.Clear(); Console.ForegroundColor = ConsoleColor.Gray; adminMenus.MenuLogo(); }
public void ShowLoginMenu(List <Games> gameLibrary, List <Users> userList) { Console.SetWindowSize(129, 27); AdminMenus adminMenus = new AdminMenus(); Console.Clear(); Console.ForegroundColor = ConsoleColor.Gray; adminMenus.MenuLogo(); Console.WriteLine(); Console.WriteLine(layout.Button("1.Login Account")); Console.WriteLine(layout.Button("2.Create Account")); Console.WriteLine(layout.Button("3.Exit")); SelectInLoginMenu(gameLibrary, userList); }
public void LoginAccount(List <Games> gameLibrary, List <Users> userList) { AdminMenus menuClass = new AdminMenus(); Console.Clear(); menuClass.MenuLogo(); Console.WriteLine(); Console.WriteLine("Login name:"); string username = Console.ReadLine(); Console.WriteLine(); if (username == "admin") { menuClass.ShowMenu(gameLibrary, userList); } else { CheckUserExists(username, userList, gameLibrary); } }