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); } }
private void StartCamera() { camManager?.CloseCam(); camManager = new CamManager(deviceList[videoDevices.SelectedIndex], OnFrame); camManager.OpenCam(); }