예제 #1
0
        public ScannerViewModel(IScannerService scannerService)
        {
            ScannedBacodeText = "From Scanner View Model";

            _scannerService = scannerService;
            _scannerService.OnBarcodeScanned += _scannerService_OnBarcodeScanned;
        }
예제 #2
0
        public ShellViewModel(IWindowManager wm, IScannerService scannerService)
        {
            this.scannerService = scannerService;
            IsProgressVisible = Visibility.Hidden;

            FetchScanners();
        }
예제 #3
0
        public ScanDocumentViewModel(IScannerService scannerService)
        {
            this.scannerService = scannerService;
            IsProgressVisible = Visibility.Hidden;

            FetchScanners();
            BackHomeCommand = new DelegateCommand(NavigateBack);
            ScanCommand = new DelegateCommand(Scan);
        }
예제 #4
0
 public UserService(IScannerService scannerService, IUserRepository userRepository, IDealerRepository dealerRepository, IEmailService emailService,
                    ILogger <UserService> logger)
 {
     _scannerService   = scannerService;
     _userRepository   = userRepository;
     _dealerRepository = dealerRepository;
     _emailService     = emailService;
     _logger           = logger;
 }
        static void Main(string[] args)
        {
            ConfigureApp();
            var serviceProvider = ConfigureServices();

            _scannerService = serviceProvider.GetService <IScannerService>();

            TaskScheduler.Run(RunCycle, 1);

            WaitForCancellation();
        }
예제 #6
0
        public MainWindow(ISignatureRepository signatureRepository, IScannerService scannerService)
        {
            _signatureRepository = signatureRepository;
            _scannerService      = scannerService;

            Application.Init();
            using (GuiBuilder = new Builder())
            {
                GuiBuilder.AddFromFile("GladeWindow/MainWindow.glade");
                GuiBuilder.Autoconnect(this);
                Window.Visible = true;
            }
        }
예제 #7
0
        public ScannerController(
            IMarketDataProvider marketDataProvider,
            IScannerService scannerService,
            ITimeProvider timeProvider)
        {
            _timeProvider       = timeProvider;
            _scannerService     = scannerService;
            _marketDataProvider = marketDataProvider;

            _scannerRequestsQueue = new ActionBlock <ScannerRequest>(
                async request => await ProcessRequest(request),
                new ExecutionDataflowBlockOptions()
            {
                MaxDegreeOfParallelism = 2
            });
        }
예제 #8
0
        public DocScanDocumentViewModel(IScannerService scannerService)
        {
            this.scannerService = scannerService;

            FetchScanners();
            BackHomeCommand = new DelegateCommand(NavigateBack);
            ScanCommand     = new DelegateCommand(Scan);
            PreviewCommand  = new DelegateCommand(Preview);
            ManageCommand   = new DelegateCommand(ManageImage);

            SelectedScanner = Scanners.FirstOrDefault();

            ResolutionsList = new ObservableCollection <Resolution>(Resolutions.List);

            Resolution = Resolutions.R300;
        }
        public DocScanDocumentViewModel(IScannerService scannerService)
        {
            this.scannerService = scannerService;

            FetchScanners();
            BackHomeCommand = new DelegateCommand(NavigateBack);
            ScanCommand = new DelegateCommand(Scan);
            PreviewCommand = new DelegateCommand(Preview);
            ManageCommand = new DelegateCommand(ManageImage);

            SelectedScanner = Scanners.FirstOrDefault();

            ResolutionsList = new ObservableCollection<Resolution>(Resolutions.List);

            Resolution = Resolutions.R300;
        }
예제 #10
0
        public StartViewModel() : base()
        {
            _scannerService          = DependencyService.Get <IScannerService>();
            _scannerService.Listener = this;
            _fileService             = DependencyService.Get <IFileService>();

            _oakCrossCorr = DependencyService.Get <IOakCrossCorr>();

            try
            {
                _scannerService.FindDevice();
            }
            catch (Exception exception)
            {
                ShowToastMessage.Send(exception.Message);
            }

            this.StartConnectionCommand    = new VisualCommand(this.StartConnection);
            this.AlcoholCommand            = new VisualCommand(this.Alcohol);
            this.OilCommand                = new VisualCommand(this.Oil);
            this.MilkCommand               = new VisualCommand(this.Milk);
            this.WaterCommand              = new VisualCommand(this.Water);
            this.TakePhotoCommand          = new VisualCommand(this.TakePhoto);
            this.ScanCommand               = new VisualCommand(this.Scan);
            this.StoreCommand              = new VisualCommand(this.Store);
            this.TestCommand               = new VisualCommand(this.Test);
            this.KeepInPhoneCommand        = new VisualCommand(this.KeepInPhone);
            this.TransferFileCommand       = new VisualCommand(this.TransferFile);
            this.Program1Command           = new VisualCommand(this.Program1);
            this.Program2Command           = new VisualCommand(this.Program2);
            this.Program3Command           = new VisualCommand(this.Program3);
            this.Program4Command           = new VisualCommand(this.Program4);
            this.Program5Command           = new VisualCommand(this.Program5);
            this.Program6Command           = new VisualCommand(this.Program6);
            this.Program7Command           = new VisualCommand(this.Program7);
            this.Program8Command           = new VisualCommand(this.Program8);
            this.RescanCommand             = new VisualCommand(this.Rescan);
            this.RetestCommand             = new VisualCommand(this.Retest);
            this.CloseCommand              = new VisualCommand(this.Close);
            this.CompareCommand            = new VisualCommand(this.Compare);
            this.CheckCommand              = new VisualCommand(this.Check);
            this.NextCommand               = new VisualCommand(this.Next);
            this.TestResultContinueCommand = new VisualCommand(this.TestResultContinue);
        }
예제 #11
0
        public TaskScheduler(ICacheService cacheService, ILogger <TaskScheduler> logger, IScannerService scannerService,
                             IUnitOfWork unitOfWork, IMetadataService metadataService, IBackupService backupService, ICleanupService cleanupService,
                             IWebHostEnvironment env)
        {
            _cacheService    = cacheService;
            _logger          = logger;
            _scannerService  = scannerService;
            _unitOfWork      = unitOfWork;
            _metadataService = metadataService;
            _backupService   = backupService;
            _cleanupService  = cleanupService;

            if (!env.IsDevelopment())
            {
                ScheduleTasks();
            }
            else
            {
                RecurringJob.RemoveIfExists("scan-libraries");
                RecurringJob.RemoveIfExists("backup");
                RecurringJob.RemoveIfExists("cleanup");
            }
        }
예제 #12
0
 public HomeController(IScannerService scannerService)
 {
     _scannerService = scannerService;
 }
예제 #13
0
 public MainViewModel(IScannerService scannerService) : base(scannerService)
 {
     ScannedBacodeText = "From Main View Model";
 }
 public ScannersController(IScannerService scanService, IScanJobService jobService, IDocumentService docService)
 {
     scannerService  = scanService;
     scanJobService  = jobService;
     documentService = docService;
 }
예제 #15
0
 public HomeController(IScannerService scannerService)
 {
     this.scannerService = scannerService;
 }
예제 #16
0
 public ScannerController(IScannerService scannerService, IDataTupleService tupleService, ITupleItemService itemService) : this(scannerService)
 {
     _tupleService = tupleService;
     _itemService  = itemService;
 }
예제 #17
0
 public StartSchedulerScanner(IScannerService scannerService)
 {
     _scannerService = scannerService;
 }
예제 #18
0
 public BaseViewModel(IScannerService scannerService)
 {
     _scannerService = scannerService;
     _scannerService.OnBarcodeScanned += _scannerService_OnBarcodeScanned;
 }