Example #1
0
        /// <summary>
        /// Updates the cameras list with the cameras found in <paramref name="ctx"/>.
        /// </summary>
        /// <param name="ctx">The context to query the cameras from.</param>
        public void UpdateCameras(Context ctx)
        {
            foreach (var device in ctx.QueryDevices())
            {
                var serial = device.Info.GetInfo(CameraInfo.SerialNumber);
                if (Cameras.Exists(c => c.Serial == serial))
                {
                    continue;
                }

                Cameras.Add(new Camera(serial));
            }
        }