private async Task RenderSelectedScreen(string selection)
        {
            ConsoleWrapper.ClearScreen();
            int.TryParse(selection, out var selectionAsNumber);

            var indexOfSelection = selectionAsNumber - 1;
            var screenToActivate = Screens.ElementAt(indexOfSelection);

            await screenToActivate.Activated();
        }
Beispiel #2
0
        private void ShowPreviousScreen()
        {
            int screenIdx = Screens.IndexOf(CurrentScreen);

            if (screenIdx < 1)
            {
                LogTo.Error("ShowPreviousScreen called with invalid CurrentScreen: Screens.IndexOf(CurrentScreen) < 1");
                return;
            }

            ShowScreen(Screens.ElementAt(screenIdx - 1));
        }