Ejemplo n.º 1
0
        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)
        {
            base.OnKeyPressed(pressedKey);

            if (pressedKey.IsKeyLeft())
            {
                Context.ChangeState(new DefinedConfigSelected(SelectedIndex));
            }
        }