Hi,
I have just started using CVB and for my first program I thought to write some routines to discover cameras as well as displaying the images. For discovery and displaying the image I am using the very simplified routine below,
private Device _device;
private Device MyDevice
{
get
{
return _device;
}
set
{
if (!ReferenceEquals(value, _device))
{
display.Image = value.DeviceImage;
_device?.Dispose();
_device = value;
}
}
}
private void Test()
{
DiscoveryInformationList foundDevices = DeviceFactory.Discover();
if (foundDevices.Count > 0)
{
MyDevice = DeviceFactory.Open(foundDevices[0]);
}
}
Say I have 4 devices on the network which can be discovered. The issue I have is when I choose a device from the foundDevices list and assign it to MyDevice. If after this I try to discover the devices again, I will only see 3 devices remaining. If I assign this device to MyDevice, on the next discovery routine I will only see 2 devices. I expected to discover all 4 devices every time. What am I doing wrong or misunderstand ?
A good number of examples for C-Style API are available, however I have not seen many examples for .Net API. Where can I find more examples of .net API. My aim is to write code for using both Polimago’s tools.
Thanks.