Beispiel #1
0
        private void typeOption_Click(object sender, RoutedEventArgs e)
        {
            switch (icon.ContextMenu.Items.IndexOf(sender))
            {
            case 0:
                device.ForceControllerType(ControllerType.Unknown);
                break;

            case 1:
                device.ForceControllerType(ControllerType.ProController);
                break;

            case 2:
                device.ForceControllerType(ControllerType.Wiimote);
                break;

            case 3:
                device.ForceControllerType(ControllerType.Nunchuk);
                break;

            case 4:
                device.ForceControllerType(ControllerType.ClassicController);
                break;

            case 5:
                device.ForceControllerType(ControllerType.ClassicControllerPro);
                break;

            default:
                break;
            }

            RefreshState();
        }
Beispiel #2
0
        private void typeBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (_nintroller == null)
            {
                return;
            }

            switch (typeBox.SelectedIndex)
            {
            case 0:
                _nintroller.ForceControllerType(ControllerType.Unknown);
                break;

            case 1:
                _nintroller.ForceControllerType(ControllerType.ProController);
                break;

            case 2:
                _nintroller.ForceControllerType(ControllerType.Wiimote);
                break;

            case 3:
                _nintroller.ForceControllerType(ControllerType.Nunchuk);
                break;

            case 4:
                _nintroller.ForceControllerType(ControllerType.ClassicController);
                break;

            case 5:
                _nintroller.ForceControllerType(ControllerType.ClassicControllerPro);
                break;

            default:
                break;
            }
        }