From: sr55 Date: Wed, 20 Jun 2012 18:06:50 +0000 (+0000) Subject: WinGui: Replace the EncodeStart with QueueStart event to fix an issue where Preview... X-Git-Tag: 0.9.9~549 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=31abfae6433980b30df5a7f11530e4a2bb2eac9c;p=handbrake WinGui: Replace the EncodeStart with QueueStart event to fix an issue where Preview window could interfere with the main window. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4762 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 25dad1d4f..a47b6c8c0 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -185,10 +185,9 @@ namespace HandBrakeWPF.ViewModels this.scanService.ScanStared += this.ScanStared; this.scanService.ScanCompleted += this.ScanCompleted; this.scanService.ScanStatusChanged += this.ScanStatusChanged; - + this.queueProcessor.JobProcessingStarted += this.QueueProcessorJobProcessingStarted; this.queueProcessor.QueueCompleted += this.QueueCompleted; this.queueProcessor.QueuePaused += this.QueuePaused; - this.queueProcessor.EncodeService.EncodeStarted += this.EncodeStarted; this.queueProcessor.EncodeService.EncodeStatusChanged += this.EncodeStatusChanged; this.Presets = this.presetService.Presets; @@ -810,7 +809,7 @@ namespace HandBrakeWPF.ViewModels this.queueProcessor.QueueCompleted -= this.QueueCompleted; this.queueProcessor.QueuePaused -= this.QueuePaused; - this.queueProcessor.EncodeService.EncodeStarted -= this.EncodeStarted; + this.queueProcessor.JobProcessingStarted -= this.QueueProcessorJobProcessingStarted; this.queueProcessor.EncodeService.EncodeStatusChanged -= this.EncodeStatusChanged; } @@ -1494,22 +1493,22 @@ namespace HandBrakeWPF.ViewModels } /// - /// Encode Started Handler + /// Handle the Queue Starting Event /// /// - /// The Sender + /// The sender. /// /// - /// The EventArgs + /// The e. /// - private void EncodeStarted(object sender, EventArgs e) + void QueueProcessorJobProcessingStarted(object sender, HandBrake.ApplicationServices.EventArgs.QueueProgressEventArgs e) { Execute.OnUIThread( - () => - { - this.StatusLabel = "Preparing to encode ..."; - this.IsEncoding = true; - }); + () => + { + this.StatusLabel = "Preparing to encode ..."; + this.IsEncoding = true; + }); // TODO Handle Updating the UI }