Exemplo n.º 1
0
 /// <summary>
 /// Connects the AerionInput main instance with a plugged NDOF-device by
 /// passing a predicate.
 /// Instructs m_IHidDevice to handle incoming data and sets the global Type of
 /// the device.
 /// </summary>
 /// <returns>true if device is connected</returns>
 private bool ConnectSpacePilot()
 {
     if ((m_IHidDevice = m_HidControl.GetDeviceByPredicate(new Predicate <IHidDeviceInfo>(IsSpacePilot))) != null)
     {
         Console.Out.WriteLine("SpacePilot connected");
         m_IHidDevice.StartInPipeThread();
         m_Type = c_SpacePilotDeviceType;
         return(true);
     }
     else
     {
         return(false);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Connects the AerionInput main instance with a plugged NDOF-device by
 /// passing a predicate.
 /// Instructs m_IHidDevice to handle incoming data and sets the global Type of
 /// the device.
 /// </summary>
 /// <returns>true if device is connected</returns>
 private bool ConnectSpaceTraveler()
 {
     if ((m_IHidDevice = m_HidControl.GetDeviceByPredicate(new Predicate<IHidDeviceInfo>(IsSpaceTraveler))) != null)
     {
         Console.Out.WriteLine("SpaceTraveler connected");
         m_IHidDevice.StartInPipeThread();
         m_Type = c_SpaceTravelerDeviceType;
         return true;
     }
     else return false;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Connects the AerionInput main instance with a plugged NDOF-device by
 /// passing a predicate.
 /// Instructs m_IHidDevice to handle incoming data and sets the global Type of
 /// the device.
 /// </summary>
 /// <returns>true if device is connected</returns>
 private bool ConnectAerion()
 {
     if ((m_IHidDevice = m_HidControl.GetDeviceByPredicate(new Predicate<IHidDeviceInfo>(IsAerion))) != null)
     {
         Console.Out.WriteLine("Aerion connected");
         m_IHidDevice.StartInPipeThread();
         m_Type = c_AerionDeviceType;
         return true;
     }
     else return false;
 }