/// <summary>Asynchronously looks for first available GigEVision camera device.</summary> GigEVision_DeviceDescriptor FindFirstAvailableDevice() { var devices = new List <GigEVision_DeviceDescriptor>(); GenICam.GigEVision_FindDevices(2000, 1, devices); if (!devices.Any()) { return(null); } return(devices.FirstOrDefault()); }
static bool FindFirstAvailableDevice(out GigEVision_DeviceDescriptor device) { var devices = new List <GigEVision_DeviceDescriptor>(); device = null; GenICam.GigEVision_FindDevices(800, 1, devices); if (devices == null || !devices.Any()) { return(false); } device = devices.First(); Console.WriteLine(string.Format("{0} {1} [{2}]", device.ManufacturerName, device.ModelName, device.IpAddress)); return(true); }