protected override void HandleInput() { var key = KeyboardHandler.GetDirection(); switch (key) { case KeyCommand.Down: Refresh = true; Offset = ++Offset % _menuActions.Count; break; case KeyCommand.Up: Refresh = true; Offset = Offset == 0 ? _menuActions.Count - 1 : --Offset % _menuActions.Count; break; case KeyCommand.Enter: Refresh = true; _menuActions[Offset].Item2(); Console.Clear(); break; case KeyCommand.Escape: Running = false; break; } }
protected override void HandleInput() { var key = KeyboardHandler.GetDirection(); switch (key) { case KeyCommand.Down: HandleDownPress(); break; case KeyCommand.Up: HandleUpPress(); break; case KeyCommand.Enter: RefreshData(); Refresh = true; break; case KeyCommand.Escape: Running = false; break; } }