Ejemplo n.º 1
0
        private void ChangeIcon(TabItem target, NintrollerLib.ControllerType type)
        {
            string img = "ProController_black_24.png";

            switch (type)
            {
            case NintrollerLib.ControllerType.ProController:
                img = "ProController_black_24.png";
                break;

            case NintrollerLib.ControllerType.Wiimote:
                img = "wiimote_black_24.png";
                break;

            case NintrollerLib.ControllerType.Nunchuk:
            case NintrollerLib.ControllerType.NunchukB:
                img = "Wiimote+Nunchuck_black_24.png";
                break;

            case NintrollerLib.ControllerType.ClassicController:
                img = "Classic_black_24.png";
                break;

            case NintrollerLib.ControllerType.ClassicControllerPro:
                img = "ClassicPro_black_24.png";
                break;
            }

            var stack = target.Header as StackPanel;

            if (stack != null && stack.Children.Count > 0 && stack.Children[0].GetType() == typeof(Image))
            {
                ((Image)stack.Children[0]).Source = new BitmapImage(new Uri("../Images/Icons/" + img, UriKind.Relative));
            }
        }
Ejemplo n.º 2
0
 public Profile(NintrollerLib.ControllerType type)
 {
     profileType         = type;
     controllerMapKeys   = new List <string>();
     controllerMapValues = new List <string>();
     connType            = HolderType.XInput;
 }
Ejemplo n.º 3
0
 public abstract void AddMapping(NintrollerLib.ControllerType controller);