Beispiel #1
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 #2
0
        public static void Init()
        {
            generalAppLogger = IoC.Get <ILog>();
            string logDir   = DirectoryUtilities.GetLogDirectory();
            string filename = string.Format("activity_log.{0}.txt", GeneralUtilities.ProcessId);
            string logFile  = Path.Combine(logDir, filename);

            generalAppLogger.ConfigureLogging(logFile);

            IoC.Get <ILogInstanceManager>().RegisterLoggerInstance(filename, generalAppLogger, true);


            HandBrakeUtils.MessageLogged += HandBrakeUtils_MessageLogged;
            HandBrakeUtils.ErrorLogged   += HandBrakeUtils_ErrorLogged;
        }
        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);
        }