Beispiel #1
0
        /// <summary>
        /// Method that create a new webcam object and update the form
        /// </summary>
        private void initWebcamSetupGUI()
        {
            this.webcamClass = new Arsalis.WebcamLibrary.WebcamLibrary();

            if (this.webcamClass.WebcamListNames.Length == 0)
            {
                comboBox1.Items.Add("No webcam");
                select_webcam_button.Enabled = false;
                comboBox1.Enabled            = false;
                displayState();
            }
            else
            {
                for (int i = 0; i < this.webcamClass.WebcamListNames.Length; i++)
                {
                    comboBox1.Items.Add(this.webcamClass.WebcamListNames[i]);
                }
                this.label_top_value_read_only1.setLabel("min");
                this.label_top_value_read_only2.setLabel("default");
                this.label_top_value_read_only3.setLabel("max");
                this.label_top_value_read_only4.setLabel("flags");
                this.label_top_value_read_only5.setLabel("current value");
                this.label_top_value_read_only6.setLabel("current flag");
                this.label_top_value_read_only7.setLabel("New resolution");

                displayState();
            }
            comboBox1.SelectedIndex = 0;
        }
Beispiel #2
0
 public static void testGui(Arsalis.WebcamLibrary.WebcamLibrary test)
 {
     Console.WriteLine("Open GUI...");
     // create an instance of test CUI
     Arsalis.WebcamLibrary.Test.GUI testGUI = new GUI(test);
     // set GUI videoDevice to selected videoDevice of test webcam class
     //testGUI.OpenVideoSource(test.videoDeviceForCapture);
     testGUI.ShowDialog();
     //testGUI.CloseCurrentVideoSource();
     Console.WriteLine("Press any key to exit...");
     Console.ReadKey();
 }