Exemple #1
0
        // Add new camera to the collection and run it
        public bool Add(Camera camera)
        {
            // create video source
            if (camera.CreateVideoSource())
            {
                // add to the pool
                InnerList.Add(camera);

                camera.Start();
                return true;
            }
            return false;
        }
        // Add new camera to the collection and run it
        public bool Add(Camera camera)
        {
            // create video source
            if (camera.CreateVideoSource())
            {
                // add to the pool
                InnerList.Add(camera);

                camera.Start();
                return(true);
            }
            return(false);
        }
Exemple #3
0
        private void xCamSelect_Click(object sender, EventArgs e)
        {
            Program.Settings.Cam1.CamIndex = XCam_comboBox.SelectedIndex;

            while (camera.Active)
            {
                camera.SignalToStop();
                Thread.Sleep(50);
                camera.Active = false;
            }


            List <string> Monikers = camera.GetMonikerStrings();

            if (xCamera)
            {
                Program.Settings.Cam1.CamMoniker = Monikers[XCam_comboBox.SelectedIndex];
                AppSettings <Program.MySettings> .Save(Program.Settings);
            }
            else
            {
                Program.Settings.Cam2.CamMoniker = Monikers[XCam_comboBox.SelectedIndex];
                AppSettings <Program.MySettings> .Save(Program.Settings);
            }

            camera.MonikerString = Monikers[XCam_comboBox.SelectedIndex];

            camera.Active = true;

            camera.Start("DownCamera", Monikers[XCam_comboBox.SelectedIndex]);

            if (!camera.ReceivingFrames)
            {
                MessageBox.Show("Camera being used by another process");
            }
        }