示例#1
0
        void device_ExtensionChange(object sender, NintrollerExtensionEventArgs e)
        {
            DeviceType = e.controllerType;

            if (holder != null)
            {
                holder.AddMapping(DeviceType);
            }

            Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Background,
                                                       new Action(() => UpdateIcon(DeviceType)
                                                                  ));
        }
        void device_ExtensionChange(object sender, NintrollerExtensionEventArgs e)
        {
            this.device.IsControllerTypeAmbiguous = false;
            if (holder != null)
            {
                holder.AddMapping(e.controllerType);
            }

            this.DeviceType = e.controllerType;
            Application.Current.Dispatcher.BeginInvoke(
                DispatcherPriority.Background,
                new Action(() => {
                UpdateIcon(DeviceType);
                this.SetNameIfNotConfigured(this.DeviceType.ToString());
            })
                );
        }
示例#3
0
        void device_ExtensionChange(object sender, NintrollerExtensionEventArgs e)
        {
            DeviceType = e.controllerType;

            if (holder != null)
            {
                holder.AddMapping(DeviceType);
            }

            Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Background,
                                                       new Action(() =>
            {
                UpdateIcon(DeviceType);
                int playerNum = targetXDevice;
                Detatch();
                AssignToXinputPlayer(playerNum);
                UpdateIcon(DeviceType);
            }
                                                                  ));
        }