Example #1
0
        private void Shutdown()
        {
            if (m_sensor != null)
            {
                // detach event handlers
                m_sensor.DataReceived -= SensorRawDataReceived;

                m_sensor.TouchDown -= SensorTouchDown;
                m_sensor.TouchMove -= SensorTouchMove;
                m_sensor.TouchUp   -= SensorTouchUp;

                // start the sensor
                m_sensor.Stop();
            }

            System.Threading.Thread.Sleep(20);
        }
Example #2
0
        private void Shutdown()
        {
            if (m_sensor != null)
            {
                // detach event handlers
                m_sensor.TouchDown -= SensorTouchDown;
                m_sensor.TouchMove -= SensorTouchMove;
                m_sensor.TouchUp   -= SensorTouchUp;

                // stop the sensor
                m_sensor.Stop();
            }

            if (m_audioDevice != null)
            {
                m_audioDevice.Dispose();
                m_audioDevice = null;
            }

            Thread.Sleep(20);
        }