protected override void WndProc(ref Message m) { if (m.Msg == 0x0219) { availableComPorts = RobotHandler.getAllAvailablePorts(); RobotSelector.Items.Clear(); RobotSelector.Items.AddRange(availableComPorts); } base.WndProc(ref m); }
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); } }