Ejemplo n.º 1
0
        private void playBackPress(string key)
        {
            switch (key)
            {
            case "Q":
                Button1.PerformClick();
                break;

            case "W":
                Button2.PerformClick();
                break;

            case "E":
                Button3.PerformClick();
                break;

            case "R":
                Button4.PerformClick();
                break;

            case "A":
                Button5.PerformClick();
                break;

            case "S":
                Button6.PerformClick();
                break;

            case "D":
                Button7.PerformClick();
                break;

            case "F":
                Button8.PerformClick();
                break;

            case "Y":
                Button9.PerformClick();
                break;

            case "U":
                Button10.PerformClick();
                break;

            case "I":
                Button11.PerformClick();
                break;

            case "O":
                Button12.PerformClick();
                break;

            case "H":
                Button13.PerformClick();
                break;

            case "J":
                Button14.PerformClick();
                break;

            case "K":
                Button15.PerformClick();
                break;

            case "L":
                Button16.PerformClick();
                break;
            }
        }
Ejemplo n.º 2
0
        //stimulates button presses when key is hit *really wanted the buttons to visually depress but this didnt do it
        private void click_handle(object sender, System.Windows.Input.KeyEventArgs e)
        {
            Console.WriteLine("Argument is: " + e.Key.ToString());
            switch (e.Key)
            {
            case Key.Q:
                e.Handled = true;
                Button1.PerformClick();
                break;

            case Key.W:
                e.Handled = true;
                Button2.PerformClick();
                break;

            case Key.E:
                e.Handled = true;
                Button3.PerformClick();
                break;

            case Key.R:
                e.Handled = true;
                Button4.PerformClick();
                break;

            case Key.A:
                e.Handled = true;
                Button5.PerformClick();
                break;

            case Key.S:
                e.Handled = true;
                Button6.PerformClick();
                break;

            case Key.D:
                e.Handled = true;
                Button7.PerformClick();
                break;

            case Key.F:
                e.Handled = true;
                Button8.PerformClick();
                break;

            case Key.Y:
                e.Handled = true;
                Button9.PerformClick();
                break;

            case Key.U:
                e.Handled = true;
                Button10.PerformClick();
                break;

            case Key.I:
                e.Handled = true;
                Button11.PerformClick();
                break;

            case Key.O:
                e.Handled = true;
                Button12.PerformClick();
                break;

            case Key.H:
                e.Handled = true;
                Button13.PerformClick();
                break;

            case Key.J:
                e.Handled = true;
                Button14.PerformClick();
                break;

            case Key.K:
                e.Handled = true;
                Button15.PerformClick();
                break;

            case Key.L:
                e.Handled = true;
                Button16.PerformClick();
                break;

            case Key.LeftShift:
                e.Handled = true;
                if (isShift == 0)
                {
                    Loop();
                }
                else
                {
                    storeLoop();
                }
                break;
            }
        }