コード例 #1
0
        /// <summary>
        /// Gets the one and only instance of this class that is allowed to exist.
        /// </summary>
        /// <returns>Instance of Microcontroller class</returns>
        public static RatCamConfiguration GetInstance()
        {
            if (_instance == null)
            {
                lock (_instance_lock)
                {
                    if (_instance == null)
                    {
                        _instance = new RatCamConfiguration();
                    }
                }
            }

            return(_instance);
        }
コード例 #2
0
        public void RefreshCameraList()
        {
            //Get the booth pairings
            RatCamConfiguration configuration = RatCamConfiguration.GetInstance();

            //Populate the list of cameras
            List <FilterInfo> c  = CameraManager.GetInstance().RetrieveAvailableCameras();
            List <Camera>     c2 = new List <Camera>();

            foreach (var k in c)
            {
                Camera k2 = new Camera();
                k2.CameraInfo = k;
                k2.BoothName  = configuration.BoothPairings.Where(x => x.Value.Equals(k.MonikerString)).Select(x => x.Key).FirstOrDefault();
                c2.Add(k2);
            }

            _camera_list = c2;
        }