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; }
private void Radio_PTcam_Checked(object sender, RoutedEventArgs e) { if (!Radio_PTcam.IsLoaded) { return; } PreviewRoutine.StopPreview(); GV._camSelected = camType.PointGreyCam; if (GV._camConnectAtStartup) { ConnectRoutine.connectPointGreyCam(); } else { Chk_connectCam.IsChecked = false; } saveProgramSetting(); }
public MainWindow() { //Static MainWindow mMainWindow = this; //Windows.main = this; DataContext = BindMngr; loadingScreen.Show(); InitializeComponent(); mTrainingWindow = new TrainingWindow(); // Setup background worker PreviewRoutine.previewSetup(); ConnectRoutine.connectionSetup(); ImageResizing.ImageResizingSetup(); ResNet.CNTK_ResNetSetup(); ZxingDecoder.DecoderSetup(); mTrainingWindow.TrainModelRoutineSetup(); OCR.OCRSetup(OCRMode.NUMBERS); // Create Directories GV.ML_Folders[(int)MLFolders.MLRoot] = Environment.CurrentDirectory + MLFolders.MLRoot.GetDescription(); GV.ML_Folders[(int)MLFolders.ML_CNTK] = Environment.CurrentDirectory + MLFolders.ML_CNTK.GetDescription(); GV.ML_Folders[(int)MLFolders.ML_CNTK_model] = Environment.CurrentDirectory + MLFolders.ML_CNTK_model.GetDescription(); GV.ML_Folders[(int)MLFolders.ML_YOLO] = Environment.CurrentDirectory + MLFolders.ML_YOLO.GetDescription(); GV.ML_Folders[(int)MLFolders.ML_YOLO_backup] = Environment.CurrentDirectory + MLFolders.ML_YOLO_backup.GetDescription(); GV.ML_Folders[(int)MLFolders.ML_YOLO_model] = Environment.CurrentDirectory + MLFolders.ML_YOLO_model.GetDescription(); GV.ML_Folders[(int)MLFolders.ML_YOLO_data] = Environment.CurrentDirectory + MLFolders.ML_YOLO_data.GetDescription(); GV.ML_Folders[(int)MLFolders.ML_YOLO_data_img] = Environment.CurrentDirectory + MLFolders.ML_YOLO_data_img.GetDescription(); foreach (string str in GV.ML_Folders) { if (str != null && !Directory.Exists(str)) { Directory.CreateDirectory(str); } } }
/// <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(); }