Exemple #1
0
 private void RebuildMapForNewDevice(IHOTASDevice device, IHOTASDevice newDevice)
 {
     newDevice.ApplyButtonMap(device.ButtonMap.ToObservableCollection());
     newDevice.SetModeProfile(device.ModeProfiles);
     newDevice.SetModeActivation(ModeProfileActivationButtons);
     Devices.Add(newDevice);
 }
Exemple #2
0
        public void ListenToDevice(IHOTASDevice device)
        {
            device.ButtonPressed          += Device_ButtonPressed;
            device.AxisChanged            += Device_AxisChanged;
            device.KeystrokeDownSent      += Device_KeystrokeDownSent;
            device.KeystrokeUpSent        += Device_KeystrokeUpSent;
            device.MacroStarted           += Device_MacroStarted;
            device.MacroCancelled         += Device_MacroCancelled;
            device.ModeProfileSelected    += Device_ModeProfileSelected;
            device.ShiftReleased          += Device_ShiftReleased;
            device.LostConnectionToDevice += Device_LostConnectionToDevice;

            device.SetModeActivation(ModeProfileActivationButtons);
            device.ListenAsync();
        }