示例#1
0
        public Form1()
        {
            InitializeComponent();
            pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;

            availableComPorts           = RobotHandler.getAllAvailablePorts();
            RobotSelector.DropDownStyle = ComboBoxStyle.DropDownList;
            RobotSelector.Items.AddRange(availableComPorts);


            deviceList = CamManager.GetCameras();
            videoDevices.DropDownStyle = ComboBoxStyle.DropDownList;
            detector = new Detector(1.7);
            foreach (FilterInfo device in deviceList)
            {
                videoDevices.Items.Add(device.Name);
            }
        }
示例#2
0
 private void StartCamera()
 {
     camManager?.CloseCam();
     camManager = new CamManager(deviceList[videoDevices.SelectedIndex], OnFrame);
     camManager.OpenCam();
 }