summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2013-01-26 16:05:48 +0000
committersr55 <[email protected]>2013-01-26 16:05:48 +0000
commit5aa8001465c0e94ac2470969613042bff221c6d4 (patch)
tree9095d88486ef17e2096b9a1338e218db93a0b404 /win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
parentd1bb73fbe199809f37ac17da3b104f9e2c97880f (diff)
WinGui: Numerous bug fixes to the services library.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5205 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs55
1 files changed, 32 insertions, 23 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
index a3998be21..4f344db08 100644
--- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
@@ -11,6 +11,7 @@ namespace HandBrakeWPF.ViewModels
{
using System;
using System.Collections.ObjectModel;
+ using System.ComponentModel;
using System.Windows;
using Caliburn.Micro;
@@ -30,6 +31,13 @@ namespace HandBrakeWPF.ViewModels
/// </summary>
public class QueueViewModel : ViewModelBase, IQueueViewModel
{
+ /*
+
+ * TODO FIX THE DRAP/DROP ADORNER!
+ */
+
+
+
#region Constants and Fields
/// <summary>
@@ -152,17 +160,6 @@ namespace HandBrakeWPF.ViewModels
}
/// <summary>
- /// Gets QueueJobs.
- /// </summary>
- public ObservableCollection<QueueTask> QueueJobs
- {
- get
- {
- return this.queueProcessor.Queue;
- }
- }
-
- /// <summary>
/// Gets or sets WhenDoneAction.
/// </summary>
public string WhenDoneAction
@@ -178,6 +175,17 @@ namespace HandBrakeWPF.ViewModels
}
}
+ /// <summary>
+ /// Gets the queue tasks.
+ /// </summary>
+ public BindingList<QueueTask> QueueTasks
+ {
+ get
+ {
+ return this.queueProcessor.Queue;
+ }
+ }
+
#endregion
#region Public Methods
@@ -270,8 +278,6 @@ namespace HandBrakeWPF.ViewModels
{
this.queueProcessor.Remove(task);
}
-
- this.JobsPending = string.Format("{0} jobs pending", this.queueProcessor.Count);
}
/// <summary>
@@ -408,16 +414,19 @@ namespace HandBrakeWPF.ViewModels
private void EncodeService_EncodeStatusChanged(
object sender, EncodeProgressEventArgs e)
{
- this.JobStatus =
- string.Format(
- "Encoding: Pass {0} of {1}, {2:00.00}%, FPS: {3:000.0}, Avg FPS: {4:000.0}, Time Remaining: {5}, Elapsed: {6:hh\\:mm\\:ss}",
- e.Task,
- e.TaskCount,
- e.PercentComplete,
- e.CurrentFrameRate,
- e.AverageFrameRate,
- e.EstimatedTimeLeft,
- e.ElapsedTime);
+ if (this.IsEncoding)
+ {
+ this.JobStatus =
+ string.Format(
+ "Encoding: Pass {0} of {1}, {2:00.00}%, FPS: {3:000.0}, Avg FPS: {4:000.0}, Time Remaining: {5}, Elapsed: {6:hh\\:mm\\:ss}",
+ e.Task,
+ e.TaskCount,
+ e.PercentComplete,
+ e.CurrentFrameRate,
+ e.AverageFrameRate,
+ e.EstimatedTimeLeft,
+ e.ElapsedTime);
+ }
}
/// <summary>