public void Dispose() { _timerCheckDCS.Stop(); _timerCheckDCS.Dispose(); _timerSample.Stop(); _timerSample.Dispose(); _joystick?.Dispose(); _audioThreshold?.Dispose(); _audioLimit?.Dispose(); }
private void AssignDevice(string deviceName) { if (_joystick != null) { _joystick.Dispose(); _joystick = null; } if (deviceName != null && Devices.Contains(deviceName)) { _joystick = new JoystickHelper(deviceName); } }