コード例 #1
0
 public override void Dispose()
 {
     if (nativeKeyboard != null)
     {
         nativeKeyboard.Unacquire();
         nativeKeyboard = null;
     }
     directInput = null;
     IsAvailable = false;
 }
コード例 #2
0
 /// <summary>
 /// Отключение
 /// </summary>
 public void Disconnect()
 {
     try
     {
         lock (_threadLock)
         {
             _quitThread = true;
         }
         _thread.Join();
         _device.Unacquire();
         _device.Dispose();
         _directInput.Dispose();
     }
     catch (Exception)
     {
     }
 }