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; }
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); }