Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LogViewModel"/> class.
 /// </summary>
 /// <param name="encodeService">
 /// The encode service.
 /// </param>
 /// <param name="scanService">
 /// The scan service.
 /// </param>
 public LogViewModel(IEncode encodeService, IScan scanService)
 {
     this.encodeService  = encodeService;
     this.scanService    = scanService;
     this.Title          = "Log Viewer";
     this.encodeLogIndex = 0;
 }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="QueueProcessor"/> class.
        /// </summary>
        /// <param name="encodeService">
        /// The encode Service.
        /// </param>
        /// <exception cref="ArgumentNullException">
        /// Services are not setup
        /// </exception>
        public QueueProcessor(IEncode encodeService)
        {
            this.EncodeService = encodeService;

            // If this is the first instance, just use the main queue file, otherwise add the instance id to the filename.
            this.queueFile = string.Format("hb_queue_recovery{0}.xml", GeneralUtilities.ProcessId);
        }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LogViewModel"/> class.
 /// </summary>
 /// <param name="encodeService">
 /// The encode service.
 /// </param>
 /// <param name="scanService">
 /// The scan service.
 /// </param>
 public LogViewModel(IEncode encodeService, IScan scanService)
 {
     this.encodeService = encodeService;
     this.scanService = scanService;
     this.Title = "Log Viewer";
     this.encodeLogIndex = 0;
 }
Пример #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="QueueProcessor"/> class.
        /// </summary>
        /// <param name="encodeService">
        /// The encode Service.
        /// </param>
        /// <exception cref="ArgumentNullException">
        /// Services are not setup
        /// </exception>
        public QueueProcessor(IEncode encodeService)
        {
            this.EncodeService = encodeService;

            // If this is the first instance, just use the main queue file, otherwise add the instance id to the filename.
            this.queueFile = string.Format("hb_queue_recovery{0}.xml", GeneralUtilities.ProcessId);
        }
Пример #5
0
        public QueueService(IEncode encodeService, IUserSettingService userSettingService)
        {
            this.userSettingService = userSettingService;
            this.EncodeService      = encodeService;

            // 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);
        }
Пример #6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MiniViewModel"/> class.
        /// </summary>
        /// <param name="encodeService">
        /// The encode Service.
        /// </param>
        /// <param name="queueProcessor">
        /// The queue Processor.
        /// </param>
        public MiniViewModel(IEncode encodeService, IQueueProcessor queueProcessor)
        {
            this.encodeService  = encodeService;
            this.queueProcessor = queueProcessor;

            this.Task        = "Ready";
            this.Progress    = string.Empty;
            this.QueueStatus = string.Format("{0} jobs pending", this.queueProcessor.Count);
        }
Пример #7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MiniViewModel"/> class.
        /// </summary>
        /// <param name="encodeService">
        /// The encode Service.
        /// </param>
        /// <param name="queueProcessor">
        /// The queue Processor.
        /// </param>
        public MiniViewModel(IEncode encodeService, IQueueProcessor queueProcessor)
        {
            this.encodeService = encodeService;
            this.queueProcessor = queueProcessor;

            this.Task = "Ready";
            this.Progress = string.Empty;
            this.QueueStatus = string.Format("{0} jobs pending", this.queueProcessor.Count);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="StaticPreviewViewModel"/> class.
        /// </summary>
        /// <param name="scanService">
        /// The scan service.
        /// </param>
        /// <param name="userSettingService">
        /// The user Setting Service.
        /// </param>
        /// <param name="errorService">
        /// The error Service.
        /// </param>
        public StaticPreviewViewModel(IScan scanService, IUserSettingService userSettingService, IErrorService errorService)
        {
            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(); // Preview needs a seperate 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;

            UseSystemDefaultPlayer = userSettingService.GetUserSetting <bool>(UserSettingConstants.DefaultPlayer);
            this.Duration          = userSettingService.GetUserSetting <int>(UserSettingConstants.LastPreviewDuration);
        }
Пример #9
0
        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.
        }
Пример #10
0
        /// <summary>
        /// Initializes a new instance of the <see cref="StaticPreviewViewModel"/> class.
        /// </summary>
        /// <param name="scanService">
        /// The scan service.
        /// </param>
        /// <param name="userSettingService">
        /// The user Setting Service.
        /// </param>
        /// <param name="errorService">
        /// The error Service.
        /// </param>
        public StaticPreviewViewModel(IScan scanService, IUserSettingService userSettingService, IErrorService errorService)
        {
            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(); // Preview needs a seperate 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;

            UseSystemDefaultPlayer = userSettingService.GetUserSetting<bool>(UserSettingConstants.DefaultPlayer);
            this.Duration = userSettingService.GetUserSetting<int>(UserSettingConstants.LastPreviewDuration);
        }