From 5c878c4eab2f01acc386165fca26d2f3ef943b77 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sat, 25 Aug 2012 14:05:56 +0000 Subject: WinGui: General Tidyup of the Services Library API. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4915 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../Services/QueueProcessor.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs') diff --git a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs index f90aa0ef4..bbb085916 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs @@ -13,8 +13,6 @@ namespace HandBrake.ApplicationServices.Services using System.Diagnostics; using System.Windows.Forms; - using Caliburn.Micro; - using HandBrake.ApplicationServices.EventArgs; using HandBrake.ApplicationServices.Model; using HandBrake.ApplicationServices.Services.Interfaces; @@ -28,7 +26,7 @@ namespace HandBrake.ApplicationServices.Services /// /// The User Setting Service /// - private static IUserSettingService userSettingService = IoC.Get(); + private readonly IUserSettingService userSettingService; /// /// Initializes a new instance of the class. @@ -39,11 +37,15 @@ namespace HandBrake.ApplicationServices.Services /// /// The encode Service. /// + /// + /// The user Setting Service. + /// /// /// Services are not setup /// - public QueueProcessor(IQueueManager queueManager, IEncode encodeService) + public QueueProcessor(IQueueManager queueManager, IEncode encodeService, IUserSettingService userSettingService) { + this.userSettingService = userSettingService; this.QueueManager = queueManager; this.EncodeService = encodeService; @@ -278,7 +280,7 @@ namespace HandBrake.ApplicationServices.Services /// Send a file to a 3rd party application after encoding has completed. /// /// The file path - private static void SendToApplication(string file) + private void SendToApplication(string file) { if (userSettingService.GetUserSetting(ASUserSettingConstants.SendFile) && !string.IsNullOrEmpty(userSettingService.GetUserSetting(ASUserSettingConstants.SendFileTo))) { @@ -291,7 +293,7 @@ namespace HandBrake.ApplicationServices.Services /// /// Perform an action after an encode. e.g a shutdown, standby, restart etc. /// - private static void Finish() + private void Finish() { // Growl if (userSettingService.GetUserSetting(ASUserSettingConstants.GrowlQueue)) -- cgit v1.2.3