public void RegisterUserToExchange() { _consoleWriter.ClearConsole(); _consoleWriter.WriteMessage("##### CRYPTOCURRENCY EXCHANGE #####\n"); _consoleWriter.WriteMessage("# Register new user \n"); _consoleWriter.WriteMessage("State your name: "); string userName = _validateInput.ValidateName(); _consoleWriter.WriteMessage("Set your login: "******"Set your password: "******"User {newUser.Login} successfully registered!"); _validateInput.PauseLoop(); }
public void Run() { while (!_menu.Exit) { _menu.PrintMenu(); _menu.RunOption(); _consoleWriter.ClearConsole(); } }
public void RunExchange() { _consoleWriter.ClearConsole(); _consoleWriter.WriteMessage("##### DUMMY CRYPTOCURRENCY EXCHANGE #####\n"); _consoleWriter.WriteMessage("| Currency | Price |\n"); _exchangeRatesProvider.NewExchangeRatesEvent += WriteNewValues; while (_inputReader.ReadKey().Key != ConsoleKey.Escape) { } _exchangeRatesProvider.NewExchangeRatesEvent -= WriteNewValues; }
public void LogInUserToExchange() { _consoleWriter.ClearConsole(); _consoleWriter.WriteMessage("############# CRYPTOCURRENCY EXCHANGE #############\n"); _consoleWriter.WriteMessage("# Log in \n"); _consoleWriter.WriteMessage(" Login: "******" Password: "******"Wrong login or password."); _validateInput.PauseLoop(); return; } RunMainMenu(_showUser.ActiveUser); _mainMenu.Exit = false; }
private void PrintHeader() { _consoleWriter.ClearConsole(); _consoleWriter.WriteMessage("############# CRYPTOCURRENCY EXCHANGE #############\n"); _consoleWriter.WriteMessage("| Currency | Last Price |\n"); }
public void DisplayHeader() { _consoleWriter.ClearConsole(); _consoleWriter.WriteMessage("############# CRYPTOCURRENCY EXCHANGE #############\n"); _consoleWriter.WriteMessage($"# Logged in as: {_showUser.ActiveUser.Login}\n"); }