presense/Demo/UI/MainMenu.cs

31 lines
713 B
C#
Raw Permalink Normal View History

2024-10-18 13:23:16 +00:00
namespace Demo.UI
2024-10-14 12:10:53 +00:00
{
public class MainMenuUI
{
UserConsoleUI _userConsoleUI;
public MainMenuUI(UserUseCase userUseCase) {
_userConsoleUI = new UserConsoleUI(userUseCase);
2024-10-16 07:01:04 +00:00
DisplayMenu();
}
private void DisplayMenu() {
while (true)
{
switch (Console.ReadLine())
{
case "1": _userConsoleUI.DisplayAllUsers(); break;
case "2": _userConsoleUI.RemoveUserByGuid(Guid.Parse(Console.ReadLine())); break;
default: DisplayMenu();
break;
}
}
2024-10-14 12:10:53 +00:00
}
}
}