public VideoFrameAnalyzerService(IEventAggregator eventAggregator, IVisualizationService visualizationService, IOpenCVService openCVService, IFaceService faceService)
 {
     _frameGrabber         = new FrameGrabber <LiveCameraResult>();
     _eventAggregator      = eventAggregator;
     _visualizationService = visualizationService;
     _openCVService        = openCVService;
     _faceService          = faceService;
     _localFaceDetector    = _openCVService.DefaultFrontalFaceDetector();
 }
        /// <summary>
        /// Creates a new instance.
        /// </summary>
        public DiagramToolApplication(IRoslynModelProvider roslynModelProvider, IHostUiServices hostUiServices)
        {
            _visualizationService = CreateVisualizationService(roslynModelProvider, hostUiServices);
            _diagramId            = _visualizationService.CreateDiagram(AppDefaults.MinZoom, AppDefaults.MaxZoom, AppDefaults.InitialZoom);

            RoslynModelService.HideTrivialBaseNodes = AppDefaults.HideTrivialBaseNodes;

            ApplicationUiService.ImageExportDpi           = Dpi.Dpi150;
            ApplicationUiService.DiagramNodeInvoked      += OnShowSourceRequested;
            ApplicationUiService.ShowModelItemsRequested += OnShowItemsRequestedAsync;
        }
Exemplo n.º 3
0
        public ShellViewModel(IEventAggregator eventAggregator, IVideoFrameAnalyzerService videoFrameAnalyzerService,
                              IVisualizationService visualizationService, IEmotionService emotionService, IFaceService faceService)
        {
            _eventAggregator           = eventAggregator;
            _videoFrameAnalyzerService = videoFrameAnalyzerService;
            _visualizationService      = visualizationService;
            _emotionService            = emotionService;
            _faceService = faceService;
            _videoFrameAnalyzerService.InitializeFrameGrabber();

            _timer = new DispatcherTimer(DispatcherPriority.Render);
            SetCurrentTime();
        }
        public DiagramToolApplication(
            [NotNull] IVisualizationService visualizationService,
            [NotNull] IRoslynWorkspaceProvider roslynWorkspaceProvider,
            [NotNull] IRoslynBasedModelService roslynBasedModelService,
            [NotNull] IHostUiService hostUiService)
        {
            var diagramId = visualizationService.CreateDiagram();

            DiagramService = visualizationService.GetDiagramService(diagramId);

            DiagramWindowService = (IDiagramWindowService)visualizationService.GetDiagramUiService(diagramId);
            DiagramWindowService.ImageExportDpi           = Dpi.Dpi150;
            DiagramWindowService.DiagramNodeInvoked      += OnShowSourceRequested;
            DiagramWindowService.ShowModelItemsRequested += OnShowItemsRequested;

            RoslynWorkspaceProvider = roslynWorkspaceProvider;
            RoslynBasedModelService = roslynBasedModelService;
            HostUiService           = hostUiService;
        }
Exemplo n.º 5
0
        public MainWindowViewModel([NotNull] IVisualizationService visualizationService)
        {
            SelectedDpi = 300;

            _testModelService = (ITestModelService)visualizationService.GetModelService();
            var diagramId = visualizationService.CreateDiagram(minZoom: 0.2, maxZoom: 5, initialZoom: 1);

            _diagramService = visualizationService.GetDiagramService(diagramId);
            _uiService      = (IWpfUiService)visualizationService.GetUiService(diagramId);

            _uiService.DiagramNodeInvoked      += i => Debug.WriteLine($"DiagramNodeInvoked: {i}");
            _uiService.ShowModelItemsRequested += OnShowModelItemsRequested;

            AddCommand             = new DelegateCommand(AddShapes);
            RemoveCommand          = new DelegateCommand(RemoveShapes);
            ZoomToContentCommand   = new DelegateCommand(ZoomToContent);
            CopyToClipboardCommand = new DelegateCommand(CopyToClipboardAsync);

            PopulateModel(_testModelService);
        }
Exemplo n.º 6
0
 public VisualizationController(IVisualizationService visualizationService, IBlobService blobService)
 {
     _visualizationService = visualizationService;
     _blobService          = blobService;
 }
 public VisualizationController(IVisualizationService visualizationService)
 {
     _visualizationService = visualizationService;
 }