summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2013-11-19 22:41:36 +0000
committersr55 <[email protected]>2013-11-19 22:41:36 +0000
commitf0dbe6e2a2af173e60a20da86c78692757e69112 (patch)
tree5c7e67c77449b3839654e2d34e1105faec5ed114 /win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs
parent830bb18b173a1c68720eb0df2ed860daea7d4c7e (diff)
WinGui: Finish off moving the User Settings service to the UI Layer.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5898 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs23
1 files changed, 12 insertions, 11 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs
index 1ade60d74..43c11a9bf 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs
@@ -42,14 +42,14 @@ namespace HandBrake.ApplicationServices.Services
private readonly BindingList<QueueTask> queue = new BindingList<QueueTask>();
/// <summary>
- /// The User Setting Service
+ /// HandBrakes Queue file with a place holder for an extra string.
/// </summary>
- private readonly IUserSettingService userSettingService;
+ private readonly string queueFile;
/// <summary>
- /// HandBrakes Queue file with a place holder for an extra string.
+ /// The clear completed.
/// </summary>
- private readonly string queueFile;
+ private bool clearCompleted;
#endregion
@@ -61,15 +61,11 @@ 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(IEncodeServiceWrapper encodeService, IUserSettingService userSettingService)
+ public QueueProcessor(IEncodeServiceWrapper encodeService)
{
- 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.
@@ -436,13 +432,18 @@ namespace HandBrake.ApplicationServices.Services
/// Starts encoding the first job in the queue and continues encoding until all jobs
/// have been encoded.
/// </summary>
- public void Start()
+ /// <param name="isClearCompleted">
+ /// The is Clear Completed.
+ /// </param>
+ public void Start(bool isClearCompleted)
{
if (this.IsProcessing)
{
throw new Exception("Already Processing the Queue");
}
+ clearCompleted = isClearCompleted;
+
this.EncodeService.EncodeCompleted -= this.EncodeServiceEncodeCompleted;
this.EncodeService.EncodeCompleted += this.EncodeServiceEncodeCompleted;
@@ -472,7 +473,7 @@ namespace HandBrake.ApplicationServices.Services
this.LastProcessedJob.Status = QueueItemStatus.Completed;
// Clear the completed item of the queue if the setting is set.
- if (this.userSettingService.GetUserSetting<bool>(ASUserSettingConstants.ClearCompletedFromQueue))
+ if (clearCompleted)
{
this.ClearCompleted();
}