private void Chk_connectCam_Checked(object sender, RoutedEventArgs e) { if (!IsLoaded) { return; } switch (GV._camSelected) { case camType.WebCam: ConnectRoutine.connectWebCam(); break; case camType.PointGreyCam: ConnectRoutine.connectPointGreyCam(); break; } Panel_liveViewOptions.IsEnabled = true; }
/// <summary> /// GUI Operation /// </summary> #region <GUI operation> private void Radio_webcam_Checked(object sender, RoutedEventArgs e) { if (!Radio_webcam.IsLoaded) { return; } PreviewRoutine.StopPreview(); GV._camSelected = camType.WebCam; if (GV._camConnectAtStartup) //connect cam automatically { ConnectRoutine.connectWebCam(); //Chk_connectCam.IsEnabled = false; //disable chk box for connecting the camera } else { //Chk_connectCam.IsEnabled = true; Chk_connectCam.IsChecked = false; } saveProgramSetting(); }