From 63737375030dd596a52c7a9b73664aaa11977977 Mon Sep 17 00:00:00 2001 From: sr55 <sr55.hb@outlook.com> Date: Mon, 27 May 2013 18:28:54 +0000 Subject: WinGui: Continuation of previous fix to the queue event handling. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5521 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs index 3465fe273..65f67c43a 100644 --- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs @@ -379,6 +379,7 @@ namespace HandBrakeWPF.ViewModels this.queueProcessor.QueueChanged += this.QueueManager_QueueChanged; this.queueProcessor.EncodeService.EncodeStatusChanged += this.EncodeService_EncodeStatusChanged; this.queueProcessor.EncodeService.EncodeCompleted += EncodeService_EncodeCompleted; + this.queueProcessor.JobProcessingStarted += this.QueueProcessorJobProcessingStarted; this.JobsPending = string.Format("{0} jobs pending", this.queueProcessor.Count); this.JobStatus = "Queue Ready"; @@ -398,6 +399,7 @@ namespace HandBrakeWPF.ViewModels this.queueProcessor.QueueChanged -= this.QueueManager_QueueChanged; this.queueProcessor.EncodeService.EncodeStatusChanged -= this.EncodeService_EncodeStatusChanged; this.queueProcessor.EncodeService.EncodeCompleted -= EncodeService_EncodeCompleted; + this.queueProcessor.JobProcessingStarted -= this.QueueProcessorJobProcessingStarted; base.OnDeactivate(close); } @@ -416,6 +418,8 @@ namespace HandBrakeWPF.ViewModels { Caliburn.Micro.Execute.OnUIThread(() => { + + 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}", @@ -481,6 +485,22 @@ namespace HandBrakeWPF.ViewModels } } + /// <summary> + /// The queue processor job processing started. + /// </summary> + /// <param name="sender"> + /// The sender. + /// </param> + /// <param name="e"> + /// The QueueProgressEventArgs. + /// </param> + private void QueueProcessorJobProcessingStarted(object sender, QueueProgressEventArgs e) + { + this.JobStatus = "Queue Started"; + this.JobsPending = string.Format("{0} jobs pending", this.queueProcessor.Count); + this.IsEncoding = true; + } + #endregion } } \ No newline at end of file -- cgit v1.2.3