Ejemplo n.º 1
0
        private void listViewDevices_SelectedIndexChanged(object sender, EventArgs e)
        {
            string guid = DeviceGuid;

            if (String.IsNullOrEmpty(guid))
            {
                return;
            }

            Guid deviceGuid = new Guid(guid);

            _diListener.DeInitDevice();
            _diListener.InitDevice(deviceGuid);

            _device = _diListener.SelectedDevice;
        }
Ejemplo n.º 2
0
        private bool AcquireDevice()
        {
            if (_deviceList == null)
            {
                return(false);
            }

            foreach (DeviceInstance di in _deviceList)
            {
                if (_config.DeviceGUID.Equals(di.InstanceGuid.ToString(), StringComparison.OrdinalIgnoreCase))
                {
                    return(_diListener.InitDevice(di.InstanceGuid));
                }
            }

            return(false);
        }