protected override void OnKeyPressed(ConsoleKeyInfo pressedKey) { if (pressedKey.IsKeyUp()) { DecrementIndex(); } if (pressedKey.IsKeyDown()) { IncrementIndex(); } if (pressedKey.IsKeyLeft()) { OnKeyLeft(); } if (pressedKey.IsKeyRight()) { OnKeyRight(); } if (pressedKey.IsEnter()) { InstallSelectedVersion(); } }
protected override void OnKeyPressed(ConsoleKeyInfo pressedKey) { if (pressedKey.IsKeyDown() || pressedKey.IsKeyUp()) { _shouldRun = !_shouldRun; } if (pressedKey.IsEnter()) { if (_shouldRun) { Context.ConfigSelector.Run(); } Context.ChangeState(new TestVersionSelected(0)); } }
protected override void OnKeyPressed(ConsoleKeyInfo pressedKey) { if (pressedKey.IsKeyUp()) { DecrementIndex(); } if (pressedKey.IsKeyDown()) { IncrementIndex(); } if (pressedKey.IsKeyRight()) { Context.ChangeState(new DefinedConfigExpanded(SelectedIndex)); } if (pressedKey.IsEnter()) { ChangeConfig(); } }