예제 #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();
            }
        }
예제 #2
0
        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));
            }
        }
예제 #3
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();
            }
        }