device.Setup()
Posted: Thu Oct 04, 2012 11:10 pm
Setup Opens and closes imediatly.
If I comment out the _deviceManager.Devices.Current.Close(); and _deviceManager.Close(); it stays open until I close it....Problem is, I'm leaving the device open and I don't want to.
//Scanner Settings
_deviceManager.Open();
if (_deviceManager.Devices.Count > 0)
{
if (_deviceManager.Devices.Select())
{
// get reference to current device
_device = _deviceManager.Devices.Current;
_device.Open();
_device.Setup();
}
_deviceManager.Devices.Current.Close();
}
else
MessageBox.Show("No Compliant Devices!");
// close the device manager
_deviceManager.Close();
If I comment out the _deviceManager.Devices.Current.Close(); and _deviceManager.Close(); it stays open until I close it....Problem is, I'm leaving the device open and I don't want to.
//Scanner Settings
_deviceManager.Open();
if (_deviceManager.Devices.Count > 0)
{
if (_deviceManager.Devices.Select())
{
// get reference to current device
_device = _deviceManager.Devices.Current;
_device.Open();
_device.Setup();
}
_deviceManager.Devices.Current.Close();
}
else
MessageBox.Show("No Compliant Devices!");
// close the device manager
_deviceManager.Close();