示例#1
0
        private void handleDeviceStatusEvent(ref LEAP_DEVICE_STATUS_CHANGE_EVENT statusEvent)
        {
            var device = _devices.FindDeviceByHandle(statusEvent.device.handle);

            if (device == null)
            {
                return;
            }
            device.UpdateStatus(statusEvent.status);
        }
示例#2
0
        private void handleLostDevice(ref LEAP_DEVICE_EVENT deviceMsg)
        {
            Device lost = _devices.FindDeviceByHandle(deviceMsg.device.handle);

            if (lost != null)
            {
                _devices.Remove(lost);
                this.LeapDeviceLost.Dispatch(this, new DeviceEventArgs(lost));
            }
        }