Beispiel #1
0
 public LibScan(ILog logService, IUserSettingService userSettingService, ILogInstanceManager logInstanceManager)
 {
     this.log = logService;
     this.userSettingService = userSettingService;
     this.logInstanceManager = logInstanceManager;
     this.IsScanning         = false;
 }
 public LogViewModel(IErrorService errorService, ILogInstanceManager logInstanceManager, IQueueService queueService)
 {
     this.errorService       = errorService;
     this.logInstanceManager = logInstanceManager;
     this.queueService       = queueService;
     this.Title = Resources.LogViewModel_Title;
 }
        public StaticPreviewViewModel(IScan scanService, IUserSettingService userSettingService, IErrorService errorService, ILog logService, ILogInstanceManager logInstanceManager, IPortService portService)
        {
            this.scanService = scanService;
            this.selectedPreviewImage = 1;
            this.Title = Resources.Preview;
            this.PreviewNotAvailable = true;

            // Live Preview
            this.userSettingService = userSettingService;
            this.errorService = errorService;
            this.logService = logService;
            this.logInstanceManager = logInstanceManager;
            this.portService = portService;

            this.Title = "Preview";
            this.Percentage = "0.00%";
            this.PercentageValue = 0;
            this.Duration = 30;
            this.CanPlay = true;

            this.useSystemDefaultPlayer = userSettingService.GetUserSetting<bool>(UserSettingConstants.DefaultPlayer);
            this.Duration = userSettingService.GetUserSetting<int>(UserSettingConstants.LastPreviewDuration);
            this.previewRotateFlip = userSettingService.GetUserSetting<bool>(UserSettingConstants.PreviewRotationFlip);
            this.NotifyOfPropertyChange(() => this.previewRotateFlip); // Don't want to trigger an Update, so setting the backing variable.
        }
Beispiel #4
0
 public LogViewModel(IErrorService errorService, ILogInstanceManager logInstanceManager)
 {
     this.errorService       = errorService;
     this.logInstanceManager = logInstanceManager;
     this.Title           = Resources.LogViewModel_Title;
     this.selectedLogFile = logInstanceManager.ApplicationAndScanLog;
 }
Beispiel #5
0
 public LibEncode(IHbFunctionsProvider hbFunctionsProvider, IUserSettingService userSettingService, ILogInstanceManager logInstanceManager, int encodeCounter) : base(userSettingService)
 {
     this.userSettingService  = userSettingService;
     this.logInstanceManager  = logInstanceManager;
     this.hbFunctionsProvider = hbFunctionsProvider;
     this.encodeCounter       = encodeCounter;
 }
Beispiel #6
0
 public LibEncode(IUserSettingService userSettingService, ILogInstanceManager logInstanceManager, int encodeCounter, IPortService portService)
 {
     this.userSettingService = userSettingService;
     this.logInstanceManager = logInstanceManager;
     this.encodeCounter      = encodeCounter;
     this.portService        = portService;
     this.encodeTaskFactory  = new EncodeTaskFactory(this.userSettingService);
 }
Beispiel #7
0
 public LibEncode(IHbFunctionsProvider hbFunctionsProvider, IUserSettingService userSettingService, ILogInstanceManager logInstanceManager, int encodeCounter, IPortService portService) : base(userSettingService)
 {
     this.userSettingService  = userSettingService;
     this.logInstanceManager  = logInstanceManager;
     this.hbFunctionsProvider = hbFunctionsProvider;
     this.encodeCounter       = encodeCounter;
     this.portService         = portService;
     this.encodeTaskFactory   = new EncodeTaskFactory(this.userSettingService, hbFunctionsProvider.GetHbFunctionsWrapper());
 }
Beispiel #8
0
        public QueueService(IUserSettingService userSettingService, ILog logService, IErrorService errorService, ILogInstanceManager logInstanceManager, IHbFunctionsProvider hbFunctionsProvider)
        {
            this.userSettingService  = userSettingService;
            this.logService          = logService;
            this.errorService        = errorService;
            this.logInstanceManager  = logInstanceManager;
            this.hbFunctionsProvider = hbFunctionsProvider;

            // If this is the first instance, just use the main queue file, otherwise add the instance id to the filename.
            this.queueFile = string.Format("{0}{1}.json", QueueRecoveryHelper.QueueFileName, GeneralUtilities.ProcessId);

            this.allowedInstances        = this.userSettingService.GetUserSetting <int>(UserSettingConstants.SimultaneousEncodes);
            this.processIsolationEnabled = this.userSettingService.GetUserSetting <bool>(UserSettingConstants.ProcessIsolationEnabled);
        }
Beispiel #9
0
        public QueueService(IUserSettingService userSettingService, ILog logService, IErrorService errorService, ILogInstanceManager logInstanceManager, IPortService portService)
        {
            this.userSettingService = userSettingService;
            this.logService         = logService;
            this.errorService       = errorService;
            this.logInstanceManager = logInstanceManager;
            this.portService        = portService;

            // If this is the first instance, just use the main queue file, otherwise add the instance id to the filename.
            this.queueFile = string.Format("{0}{1}.json", QueueRecoveryHelper.QueueFileName, GeneralUtilities.ProcessId);

            this.allowedInstances        = this.userSettingService.GetUserSetting <int>(UserSettingConstants.SimultaneousEncodes);
            this.processIsolationEnabled = this.userSettingService.GetUserSetting <bool>(UserSettingConstants.ProcessIsolationEnabled);

            this.encodeTaskFactory = new EncodeTaskFactory(this.userSettingService);

            this.hardwareEncoderResourceManager.Init();
        }
        public StaticPreviewViewModel(IScan scanService, IUserSettingService userSettingService, IErrorService errorService, ILog logService, ILogInstanceManager logInstanceManager, IPortService portService)
        {
            this.scanService          = scanService;
            this.selectedPreviewImage = 1;
            this.Title = Resources.Preview;
            this.PreviewNotAvailable = true;

            // Live Preview
            this.userSettingService = userSettingService;
            this.errorService       = errorService;
            this.logService         = logService;
            this.logInstanceManager = logInstanceManager;
            this.portService        = portService;

            this.Title           = "Preview";
            this.Percentage      = "0.00%";
            this.PercentageValue = 0;
            this.Duration        = 30;
            this.CanPlay         = true;

            this.useSystemDefaultPlayer     = userSettingService.GetUserSetting <bool>(UserSettingConstants.DefaultPlayer);
            this.showPictureSettingControls = userSettingService.GetUserSetting <bool>(UserSettingConstants.PreviewShowPictureSettingsOverlay);
            this.Duration = userSettingService.GetUserSetting <int>(UserSettingConstants.LastPreviewDuration);
        }
Beispiel #11
0
 public ActiveJob(QueueTask task, IHbFunctionsProvider hbFunctionsProvider, IUserSettingService userSettingService, ILogInstanceManager logInstanceManager, int jobId, IPortService portService)
 {
     this.job           = task;
     this.encodeService = new LibEncode(hbFunctionsProvider, userSettingService, logInstanceManager, jobId, portService);
 }
        public StaticPreviewViewModel(IScan scanService, IUserSettingService userSettingService, IErrorService errorService, IHbFunctionsProvider hbFunctionsProvider, ILog logService, ILogInstanceManager logInstanceManager)
        {
            this.scanService          = scanService;
            this.selectedPreviewImage = 1;
            this.Title = Resources.Preview;
            this.PreviewNotAvailable = true;

            // Live Preview
            this.userSettingService = userSettingService;
            this.errorService       = errorService;
            this.encodeService      = new LibEncode(hbFunctionsProvider, userSettingService, logInstanceManager, 0); // Preview needs a separate instance rather than the shared singleton. This could maybe do with being refactored at some point

            this.Title           = "Preview";
            this.Percentage      = "0.00%";
            this.PercentageValue = 0;
            this.Duration        = 30;
            this.CanPlay         = true;

            this.useSystemDefaultPlayer = userSettingService.GetUserSetting <bool>(UserSettingConstants.DefaultPlayer);
            this.Duration          = userSettingService.GetUserSetting <int>(UserSettingConstants.LastPreviewDuration);
            this.previewRotateFlip = userSettingService.GetUserSetting <bool>(UserSettingConstants.PreviewRotationFlip);
            this.NotifyOfPropertyChange(() => this.previewRotateFlip); // Don't want to trigger an Update, so setting the backing variable.
        }