Raspisanie/Zurnal/UI/MeinMenu.cs

33 lines
757 B
C#
Raw Permalink Normal View History

2024-10-23 08:39:09 +00:00
using Zurnal.Domain.UseCase;
namespace Zurnal.UI
2024-10-21 11:56:16 +00:00
{
public class MainMenuUI
{
UserConsoleUI _userConsoleUI;
public MainMenuUI(UserUseCase userUseCase)
{
_userConsoleUI = new UserConsoleUI(userUseCase);
DisplayMenu();
}
2024-11-11 11:41:23 +00:00
public void DisplayMenu()
2024-10-21 11:56:16 +00:00
{
while (true)
{
switch (Console.ReadLine())
{
case "1": _userConsoleUI.DisplayAllUsers(); break;
case "2": _userConsoleUI.RemoveUserByGuid(Guid.Parse(Console.ReadLine())); break;
default:
DisplayMenu();
break;
}
}
}
}
2024-11-11 11:41:23 +00:00
2024-10-21 11:56:16 +00:00
}