diff options
author | sr55 <[email protected]> | 2012-08-25 14:05:56 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-08-25 14:05:56 +0000 |
commit | 5c878c4eab2f01acc386165fca26d2f3ef943b77 (patch) | |
tree | 5e7a7257147ad1f074297dcd28af691a554cae97 /win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs | |
parent | cbe5f09e69c95df3be3b38de06c2b7bd6b5bd949 (diff) |
WinGui: General Tidyup of the Services Library API.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4915 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs | 14 |
1 files changed, 8 insertions, 6 deletions
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 /// <summary>
/// The User Setting Service
/// </summary>
- private static IUserSettingService userSettingService = IoC.Get<IUserSettingService>();
+ private readonly IUserSettingService userSettingService;
/// <summary>
/// Initializes a new instance of the <see cref="QueueProcessor"/> class.
@@ -39,11 +37,15 @@ namespace HandBrake.ApplicationServices.Services /// <param name="encodeService">
/// The encode Service.
/// </param>
+ /// <param name="userSettingService">
+ /// The user Setting Service.
+ /// </param>
/// <exception cref="ArgumentNullException">
/// Services are not setup
/// </exception>
- 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.
/// </summary>
/// <param name="file"> The file path</param>
- private static void SendToApplication(string file)
+ private void SendToApplication(string file)
{
if (userSettingService.GetUserSetting<bool>(ASUserSettingConstants.SendFile) && !string.IsNullOrEmpty(userSettingService.GetUserSetting<string>(ASUserSettingConstants.SendFileTo)))
{
@@ -291,7 +293,7 @@ namespace HandBrake.ApplicationServices.Services /// <summary>
/// Perform an action after an encode. e.g a shutdown, standby, restart etc.
/// </summary>
- private static void Finish()
+ private void Finish()
{
// Growl
if (userSettingService.GetUserSetting<bool>(ASUserSettingConstants.GrowlQueue))
|