private string ChoosePrivateRoom() { var options = new string[] { "Start private room", "Connect to private room" }; var command = MenuLibrary.InputMenuItemNumber("Private room Menu", options); if (command == 1) { return(null); } else { return(MenuLibrary.InputStringValue("room number")); } }
private async Task ExecuteRegistrationAsync() { _logger.LogInformation("class AuthorizationMenu. ExecuteRegistrationAsync()"); MenuLibrary.Clear(); while (true) { MenuLibrary.WriteLineColor("\nRegistration\n", ConsoleColor.Yellow); string login = MenuLibrary.InputStringValue("login"); string password = MenuLibrary.InputStringValue("password"); _logger.LogInformation("Entered the login and the password"); var response = await _userClient.RegistrationAsync(login, password); _logger.LogInformation("REQUEST: Sent the register request to the server"); if (await ResponseHandlerAsync(response, "registration")) { return; } } }