/// <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(IEncodeServiceWrapper encodeService, IScanServiceWrapper scanService) { this.encodeService = encodeService; this.scanService = scanService; this.Title = "Log Viewer"; this.encodeLogIndex = 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(IEncodeServiceWrapper encodeService, IScanServiceWrapper scanService) { this.encodeService = encodeService; this.scanService = scanService; this.Title = "Log Viewer"; this.encodeLogIndex = 0; }
/// <summary> /// Initializes a new instance of the <see cref="InstantViewModel"/> class. /// </summary> /// <param name="userSettingService"> /// The user setting service. /// </param> /// <param name="scanService"> /// The scan service. /// </param> /// <param name="encodeService"> /// The encode service. /// </param> /// <param name="presetService"> /// The preset service. /// </param> /// <param name="errorService"> /// The error service. /// </param> /// <param name="shellViewModel"> /// The shell view model. /// </param> /// <param name="updateService"> /// The update service. /// </param> /// <param name="notificationService"> /// The notification service. /// </param> /// <param name="whenDoneService"> /// The when done service. /// </param> public InstantViewModel( IUserSettingService userSettingService, IScanServiceWrapper scanService, IEncodeServiceWrapper encodeService, IPresetService presetService, IErrorService errorService, IShellViewModel shellViewModel, IUpdateService updateService, INotificationService notificationService, IPrePostActionService whenDoneService) { this.userSettingService = userSettingService; this.scanService = scanService; this.encodeService = encodeService; this.presetService = presetService; this.errorService = errorService; this.shellViewModel = shellViewModel; this.updateService = updateService; this.queueProcessor = IoC.Get <IQueueProcessor>(); // Setup Properties this.TitleList = new BindingList <SelectionTitle>(); this.ScannedSource = new Source(); // Setup Events this.scanService.ScanStared += this.ScanStared; this.scanService.ScanCompleted += this.ScanCompleted; this.scanService.ScanStatusChanged += this.ScanStatusChanged; this.queueProcessor.JobProcessingStarted += this.QueueProcessorJobProcessingStarted; this.queueProcessor.QueueCompleted += this.QueueCompleted; this.queueProcessor.QueueChanged += this.QueueChanged; this.queueProcessor.EncodeService.EncodeStatusChanged += this.EncodeStatusChanged; this.Presets = this.presetService.Presets; this.CancelScanCommand = new CancelScanCommand(this.scanService); }
/// <summary> /// Initializes a new instance of the <see cref="MainViewModel"/> class. /// The viewmodel for HandBrakes main window. /// </summary> /// <param name="userSettingService"> /// The User Setting Service /// </param> /// <param name="scanService"> /// The scan Service. /// </param> /// <param name="encodeService"> /// The encode Service. /// </param> /// <param name="presetService"> /// The preset Service. /// </param> /// <param name="errorService"> /// The Error Service /// </param> /// <param name="shellViewModel"> /// The shell View Model. /// </param> /// <param name="updateService"> /// The update Service. /// </param> /// <param name="notificationService"> /// The notification Service. /// *** Leave in Constructor. *** /// </param> /// <param name="whenDoneService"> /// The when Done Service. /// *** Leave in Constructor. *** /// </param> public MainViewModel(IUserSettingService userSettingService, IScanServiceWrapper scanService, IEncodeServiceWrapper encodeService, IPresetService presetService, IErrorService errorService, IShellViewModel shellViewModel, IUpdateService updateService, INotificationService notificationService, IPrePostActionService whenDoneService) { this.scanService = scanService; this.encodeService = encodeService; this.presetService = presetService; this.errorService = errorService; this.shellViewModel = shellViewModel; this.updateService = updateService; this.userSettingService = userSettingService; this.queueProcessor = IoC.Get<IQueueProcessor>(); // Setup Properties this.WindowTitle = "HandBrake"; this.CurrentTask = new EncodeTask(); this.CurrentTask.PropertyChanged += this.CurrentTask_PropertyChanged; this.ScannedSource = new Source(); // Setup Events this.scanService.ScanStared += this.ScanStared; this.scanService.ScanCompleted += this.ScanCompleted; this.scanService.ScanStatusChanged += this.ScanStatusChanged; this.queueProcessor.JobProcessingStarted += this.QueueProcessorJobProcessingStarted; this.queueProcessor.QueueCompleted += this.QueueCompleted; this.queueProcessor.QueueChanged += this.QueueChanged; this.queueProcessor.EncodeService.EncodeStatusChanged += this.EncodeStatusChanged; this.userSettingService.SettingChanged += this.UserSettingServiceSettingChanged; this.Presets = this.presetService.Presets; this.CancelScanCommand = new CancelScanCommand(this.scanService); }
/// <summary> /// Initializes a new instance of the <see cref="CancelScanCommand"/> class. /// </summary> /// <param name="ssw"> /// The scan service wrapper. /// </param> public CancelScanCommand(IScanServiceWrapper ssw) { this.scanServiceWrapper = ssw; this.scanServiceWrapper.ScanStared += this.ScanServiceWrapperScanStared; this.scanServiceWrapper.ScanCompleted += this.ScanServiceWrapperScanCompleted; }
/// <summary> /// Initializes a new instance of the <see cref="CancelScanCommand"/> class. /// </summary> /// <param name="ssw"> /// The scan service wrapper. /// </param> public CancelScanCommand(IScanServiceWrapper ssw) { this.scanServiceWrapper = ssw; this.scanServiceWrapper.ScanStared += this.ScanServiceWrapperScanStared; this.scanServiceWrapper.ScanCompleted += this.ScanServiceWrapperScanCompleted; }