public override void Display() { var topLevel = DataService.Get(CurrentParentID); DisplayHelpers.Display(topLevel); base.Display(); }
public override void Display() { var topLevel = DataService.Get(CurrentParentID); DisplayHelpers.Display(topLevel, "Choose category to open"); var selectedId = Input.ReadInt(); var possibleIds = topLevel.Childs.Select(x => x.Id); if (possibleIds.Contains(selectedId)) { CurrentParentID = selectedId; } else { Output.DisplayPrompt("Item cannot be open"); } Program.NavigateTo <DisplayCategory>(); }