]> granicus.if.org Git - handbrake/commitdiff
WinGui: Replace the EncodeStart with QueueStart event to fix an issue where Preview...
authorsr55 <sr55.hb@outlook.com>
Wed, 20 Jun 2012 18:06:50 +0000 (18:06 +0000)
committersr55 <sr55.hb@outlook.com>
Wed, 20 Jun 2012 18:06:50 +0000 (18:06 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4762 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs

index 25dad1d4f9a2e8fa12a6fb10c55d6cc3a2afa2a9..a47b6c8c0bde80f78e69a6b928a47673caab0694 100644 (file)
@@ -185,10 +185,9 @@ namespace HandBrakeWPF.ViewModels
             this.scanService.ScanStared += this.ScanStared;\r
             this.scanService.ScanCompleted += this.ScanCompleted;\r
             this.scanService.ScanStatusChanged += this.ScanStatusChanged;\r
-\r
+            this.queueProcessor.JobProcessingStarted += this.QueueProcessorJobProcessingStarted;\r
             this.queueProcessor.QueueCompleted += this.QueueCompleted;\r
             this.queueProcessor.QueuePaused += this.QueuePaused;\r
-            this.queueProcessor.EncodeService.EncodeStarted += this.EncodeStarted;\r
             this.queueProcessor.EncodeService.EncodeStatusChanged += this.EncodeStatusChanged;\r
 \r
             this.Presets = this.presetService.Presets;\r
@@ -810,7 +809,7 @@ namespace HandBrakeWPF.ViewModels
 \r
             this.queueProcessor.QueueCompleted -= this.QueueCompleted;\r
             this.queueProcessor.QueuePaused -= this.QueuePaused;\r
-            this.queueProcessor.EncodeService.EncodeStarted -= this.EncodeStarted;\r
+            this.queueProcessor.JobProcessingStarted -= this.QueueProcessorJobProcessingStarted;\r
             this.queueProcessor.EncodeService.EncodeStatusChanged -= this.EncodeStatusChanged;\r
         }\r
 \r
@@ -1494,22 +1493,22 @@ namespace HandBrakeWPF.ViewModels
         }\r
 \r
         /// <summary>\r
-        /// Encode Started Handler\r
+        /// Handle the Queue Starting Event\r
         /// </summary>\r
         /// <param name="sender">\r
-        /// The Sender\r
+        /// The sender.\r
         /// </param>\r
         /// <param name="e">\r
-        /// The EventArgs\r
+        /// The e.\r
         /// </param>\r
-        private void EncodeStarted(object sender, EventArgs e)\r
+        void QueueProcessorJobProcessingStarted(object sender, HandBrake.ApplicationServices.EventArgs.QueueProgressEventArgs e)\r
         {\r
             Execute.OnUIThread(\r
-                () =>\r
-                {\r
-                    this.StatusLabel = "Preparing to encode ...";\r
-                    this.IsEncoding = true;\r
-                });\r
+               () =>\r
+               {\r
+                   this.StatusLabel = "Preparing to encode ...";\r
+                   this.IsEncoding = true;\r
+               });\r
 \r
             // TODO Handle Updating the UI\r
         }\r