/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public HomeViewModel(ICustomDialogService dialogService, SettingsViewModel settingsViewModel) { _dialogService = dialogService; _videoCaptureManager = new VideoCaptureManager(CameraId); _videoCaptureManager.NewImageComplete += videoCaptureManager_OnNewImageComplete; _iotHubPublisher = new IotHubPublisher(IotHubHostName, DeviceId, SharedAccessKey); _faceDetectionConfigFilePath = Path.Combine(_configFileDirectory, _faceDetectionConfig); _eyeDetectionConfigFilePath = Path.Combine(_configFileDirectory, _eyeDetectionConfig); _timerFaceDetectionProcess = new DispatcherTimer(); _timerFaceDetectionProcess.Tick += new EventHandler(timerFaceDetectionProcess_tick); _timerFaceDetectionProcess.Interval = new TimeSpan(0, 0, 0, Properties.Settings.Default.FaceDetectionProcessInSeconds, 0); SettingsViewModel = settingsViewModel; DetectionMode = DetectionModeEnum.OpenCV; DetectionInfo = new DetectionInfo(); }
public void OnEnable() { manager = (VideoCaptureManager)target; videoCaptures = serializedObject.FindProperty("videoCaptures"); }