summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Services
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-08-15 13:05:50 +0000
committersr55 <[email protected]>2011-08-15 13:05:50 +0000
commitbb6b6007ea2111cac17ff5fff2f2105bb5b7e6e9 (patch)
treee952bee01b33c5bbb7dc600f724dcc10d25ad6aa /win/CS/HandBrake.ApplicationServices/Services
parent689e8917e82cae5d68341f5d618dba050ddfc0b9 (diff)
WinGui: Clear all option on the queue.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4173 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueManager.cs5
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/LibScan.cs6
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs13
3 files changed, 20 insertions, 4 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueManager.cs b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueManager.cs
index be87b3705..e53871d53 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueManager.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueManager.cs
@@ -69,6 +69,11 @@ namespace HandBrake.ApplicationServices.Services.Interfaces
void ClearCompleted();
/// <summary>
+ /// Clear down all Queue Items
+ /// </summary>
+ void Clear();
+
+ /// <summary>
/// Get the first job on the queue for processing.
/// This also removes the job from the Queue and sets the LastProcessedJob
/// </summary>
diff --git a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
index 854a561bd..33459a0dd 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
@@ -161,16 +161,14 @@ namespace HandBrake.ApplicationServices.Services
{
try
{
- // TODO Support Preview Count
-
IsScanning = true;
if (this.ScanStared != null)
this.ScanStared(this, new EventArgs());
if (title != 0)
- instance.StartScan(sourcePath.ToString(), 10, title);
+ instance.StartScan(sourcePath.ToString(), previewCount, title);
else
- instance.StartScan(sourcePath.ToString(), 10);
+ instance.StartScan(sourcePath.ToString(), previewCount);
}
catch (Exception exc)
{
diff --git a/win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs b/win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs
index da8ac5433..e2f81b7c5 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs
@@ -198,6 +198,19 @@ namespace HandBrake.ApplicationServices.Services
}
/// <summary>
+ /// Clear down all Queue Items
+ /// </summary>
+ public void Clear()
+ {
+ List<QueueTask> deleteList = this.queue.ToList();
+ foreach (QueueTask item in deleteList)
+ {
+ this.queue.Remove(item);
+ }
+ this.InvokeQueueChanged(EventArgs.Empty);
+ }
+
+ /// <summary>
/// Get the first job on the queue for processing.
/// This also removes the job from the Queue and sets the LastProcessedJob
/// </summary>