/// <summary>
 /// Constructor
 /// </summary>
 public MetadataApiController()
 {
     globalConfiguration = new Common.Config.GlobalConfiguration();
     fileService         = new FileService(globalConfiguration.GetMetadataConfiguration());
     metadataService     = new MetadataService(fileService);
     previewService      = new PreviewService(globalConfiguration.GetMetadataConfiguration(), fileService);
 }
Exemple #2
0
 public USBMode(AndroidPortReverser portReverser, IObservable <int> port, PreviewService previewService)
 {
     _portReverser   = portReverser;
     _port           = port;
     _previewService = previewService;
     _port.ObserveOn(NewThreadScheduler.Default).Subscribe(EnableUsbMode);
 }
 public VideoController(
     VideoService videoService,
     PreviewService previewService)
 {
     this.videoService   = videoService;
     this.previewService = previewService;
 }
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            PreviewService.previewSetup();
            CortexCore.DecoderSetup();

            if (ConnectionService.ConnectCamera())
            {
                PreviewService.startPreview(previewFPS.HIGH);
            }
        }
Exemple #5
0
 async void PokaPreview()
 {
     if (_outputCanvasContext != null)
     {
         try {
             _preview_service = new PreviewService(_outputCanvasContext, Screen.pres, _canvasReference, skalaCanvasWzgledemEkranu);
             await _preview_service.drawAllPages();
         } catch { }
     }
 }
 private void Btn_scanOnce_Click(object sender, RoutedEventArgs e)
 {
     PreviewService.stopPreview();
     CortexCore.Decode_async(PreviewService.imgOriginal.ToBitmap());
     //PreviewService.imgOriginal.Draw(CortexCore.BondRec, new Bgr(0, 0, 255), 3);
     //if (mMessageBox.Show("" + CortexCore.ResultString) == mDialogResult.yes)
     //{
     //    PreviewService.startPreview(previewFPS.HIGH);
     //    CortexCore.mCortexDecoder.ResetResult();
     //}
 }
        public void InitializeTest()
        {
            Stubs.Initialize();
            Stubs.PreviewRepository.Add(new Preview());
            Stubs.PreviewRepository.Add(new Preview());
            Stubs.PreviewRepository.Add(new Preview());
            Stubs.PreviewRepository.Add(new Preview());
            Stubs.UnitOfWork.Commit();

            m_target = new PreviewService();
        }
Exemple #8
0
        public static void Main(string[] argsArray)
        {
            Thread.CurrentThread.SetInvariantCulture();

            // This is required to get all required build tools in path
            // See https://github.com/fusetools/Fuse/issues/4245 for details
            if (Platform.OperatingSystem == OS.Mac)
            {
                Environment.SetEnvironmentVariable("PATH", "/usr/local/bin:" + Environment.GetEnvironmentVariable("PATH"));
            }

            var argumentList = argsArray.ToList();
            var fuse         = FuseApi.Initialize("Designer", argumentList);
            var shell        = new Shell();
            var errors       = new ReplaySubject <Exception>(1);

            if (!Application.InitializeAsDocumentApp(argumentList, "Fusetools.Fuse"))
            {
                return;
            }

            // Initialize console redirection early to show output during startup in debug window
            ConsoleOutputWindow.InitializeConsoleRedirection();

            UserSettings.Settings = PersistentSettings.Load(
                usersettingsfile: fuse.UserDataDir / new FileName("designer-config.json"),
                onError: errors.OnNext);

            var daemon = fuse.ConnectOrSpawnAsync("Designer").ToObservable().Switch();

            //var previewPlatform = Platform.OperatingSystem == OS.Mac
            //	? (IPlatform)new MacPlatform(fuse.MonoExe.Value.NativePath)
            //	: (IPlatform)new WindowsPlatform();

            var previewService = new PreviewService();

            Application.Terminating += previewService.Dispose;

            var openProject = new OpenProject(
                previewService,
                shell, fuse, daemon,
                errors);

            var createProject = new CreateProject(fuse);
            var splashWindow  = new Dashboard(createProject, fuse);


            Application.CreateDocumentWindow = document => openProject.Execute(document, argumentList.ToArray());

            Application.LaunchedWithoutDocuments = splashWindow.Show;

            Application.Run();
        }
Exemple #9
0
 private static void decodeRoutine_WorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     MainWindow.main.busyWindow.Visibility = System.Windows.Visibility.Collapsed;
     PreviewService.imgOriginal.Draw(CortexCore.BondRec, new Bgr(0, 0, 255), 3);
     if (ResultString != "NULL")
     {
         MainWindow.player.Play();
     }
     if (mMessageBox.Show("" + CortexCore.ResultString) == mDialogResult.yes)
     {
         PreviewService.startPreview(previewFPS.HIGH);
         CortexCore.mCortexDecoder.ResetResult();
     }
 }
Exemple #10
0
        public OpenProject(
            PreviewService previewService,
            IShell shell,
            IFuse fuse,
            IMessagingService daemon,
            IObservable <Exception> errors)
        {
            _previewService = previewService;
            _shell          = shell;
            _fuse           = fuse;
            _daemon         = daemon;
            _errors         = errors;

            var doneLoading = _mainWindowFocused.FirstAsync();

            _setupGuide = new SetupGuide(fuse, doneLoading);

            RespondToFocusRequests.Start(_daemon, _projectsOpen);
        }
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            this.WindowState         = WindowState.Maximized;
            this.MainPageArea.Width  = SystemParameters.PrimaryScreenWidth;
            this.MainPageArea.Height = SystemParameters.PrimaryScreenHeight;

            Panel_stop.Visibility = Visibility.Collapsed;

            PreviewService.previewSetup();
            ImageProcessService.ImgProcessSetup();

            /// Load Yolo Model
            GV.ML_Folders[(int)MLFolders.ML_YOLO_model] = Environment.CurrentDirectory + MLFolders.ML_YOLO_model.GetDescription();
            if (!Directory.Exists(GV.ML_Folders[(int)MLFolders.ML_YOLO_model]))
            {
                Directory.CreateDirectory(GV.ML_Folders[(int)MLFolders.ML_YOLO_model]);
            }

            mYolo.LoadModel(GV.ML_Folders[(int)MLFolders.ML_YOLO_model]);

            PreviewService.startPreview(PreviewService.previewFPS.HIGH);
        }
Exemple #12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="jogosdaqui.WebApi.Controllers.PreviewsController"/> class.
 /// </summary>
 public PreviewsController()
 {
     m_service = new PreviewService();
 }