Пример #1
0
        /// <summary>
        /// Disconnect a connected device. Stop the HidDevice processing input data,
        /// and deregister from HidDevice.DeviceChange event handler. Save the config file.
        /// </summary>
        public void Disconnect()
        {
            lock (m_lock)
            {
                m_Sensor.DestroySensor();
                m_Keyboard.DestroyKeyboard();

                m_HidControl.DeviceChange -= m_HidControlEvents_DeviceChangeEventHandler;
                m_IHidDevice.StopInPipeThread();

                m_prefs.saveConfig();
            }
        }
Пример #2
0
        public void GiveBackDevice(IHidDevice HidDev)
        {
            if (HidDev != null)
            {
                try
                {
                    HidDev.StopInPipeThread();
                }
                finally
                {
                    HidDev = null;
                }

                EmitLogMessage(HidLogMessageType.Info, "Device checked in.");
            }
        }
Пример #3
0
        public void GiveBackDevice(IHidDevice HidDev)
        {
            if (HidDev != null)
            {
                try
                {
                    HidDev.StopInPipeThread();
                }
                finally
                {
                    HidDev = null;
                }

                EmitLogMessage(HidLogMessageType.Info, "Device checked in.");
            }
        }