protected override void OnLoad(EventArgs e) { base.OnLoad(e); _pictureServiceClient = new PictureServiceClient("CustomBinding_IPictureService"); _pictureServiceClient.UploadImageCompleted += Client_UploadImageCompleted; _cameras = WebCamera.Devices(); LoadIntervals(); LoadCameraList(); }
private void ComboBoxCamera_SelectedIndexChanged(object sender, EventArgs e) { _selectedCamera?.StopWebCam(); // fire up the selected cam if (comboBoxCamera.SelectedIndex < 0 || comboBoxCamera.SelectedIndex >= _cameras.Length) { return; } _selectedCamera = _cameras[comboBoxCamera.SelectedIndex]; _selectedCamera.DisplayWebCam(pictureBoxImage); }