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