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();
device.Setup()
Moderator: Alex
Re: device.Setup()
Hello,
Setup dialog can be shown only when device is opened. Setup dialog closes automatically when device closes.
Here is a step sequence which you need do for setup the device:
Setup dialog can be shown only when device is opened. Setup dialog closes automatically when device closes.
Here is a step sequence which you need do for setup the device:
- Call the Setup method
- Change the device settings in the setup dialog
- Close the setup dialog
- Acquire image(s) from the device with or without UI if necessary
- Close the device
Re: device.Setup()
I understand But there is no event or way of knowing when the setup dialog is closed.
Re: device.Setup()
You need to subscribe to the StateChanged event of the Device class if you want to know when device is closed.I understand But there is no event or way of knowing when the setup dialog is closed.
Device is enabled when the setup dialog is opened, device is opened when the setup dialog is closed.
Best regards, Alexander