From 9e80492bd66c7b80fb89973d4f4636cc729e99b1 Mon Sep 17 00:00:00 2001 From: sr55 Date: Thu, 22 Dec 2016 21:13:55 +0000 Subject: WinGui: Change the status bar to show when it's doing a subtitle scan. --- .../HandBrakeWPF/Properties/Resources.Designer.cs | 13 +++++++++-- win/CS/HandBrakeWPF/Properties/Resources.resx | 7 ++++-- .../Encode/EventArgs/EncodeProgressEventArgs.cs | 11 +++++++++ win/CS/HandBrakeWPF/Services/Encode/LibEncode.cs | 1 + win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 26 +++++++++++++++++----- 5 files changed, 48 insertions(+), 10 deletions(-) (limited to 'win/CS/HandBrakeWPF') diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs index 465a52b2a..54a401bf4 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs +++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs @@ -712,7 +712,7 @@ namespace HandBrakeWPF.Properties { } /// - /// Looks up a localized string similar to Pending Jobs {7}. + /// Looks up a localized string similar to Pending Jobs {0}. /// public static string Main_JobsPending_addon { get { @@ -1090,7 +1090,7 @@ namespace HandBrakeWPF.Properties { } /// - /// Looks up a localized string similar to Encoding: Pass {0} of {1}, {2:00.00}%, FPS: {3:000.0}, Avg FPS: {4:000.0}, Time Remaining: {5}, Elapsed: {6:d\:hh\:mm\:ss}. + /// Looks up a localized string similar to Encoding: Pass {0} of {1}, {2:00.00}%, FPS: {3:000.0}, Avg FPS: {4:000.0}, Time Remaining: {5}, Elapsed: {6:d\:hh\:mm\:ss} {7}. /// public static string MainViewModel_EncodeStatusChanged_StatusLabel { get { @@ -1098,6 +1098,15 @@ namespace HandBrakeWPF.Properties { } } + /// + /// Looks up a localized string similar to Processing Pass {0} of {1}, (Subtitle Scan) {2:00.00}%, Scan Time Remaining: {3}, Elapsed: {4:d\:hh\:mm\:ss}. + /// + public static string MainViewModel_EncodeStatusChanged_SubScan_StatusLabel { + get { + return ResourceManager.GetString("MainViewModel_EncodeStatusChanged_SubScan_StatusLabel", resourceCulture); + } + } + /// /// Looks up a localized string similar to Low Disk Space. /// diff --git a/win/CS/HandBrakeWPF/Properties/Resources.resx b/win/CS/HandBrakeWPF/Properties/Resources.resx index c4b66797a..161b55a8f 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.resx +++ b/win/CS/HandBrakeWPF/Properties/Resources.resx @@ -355,7 +355,7 @@ In order to use the QuickSync encoder, you must: There are jobs on the queue with the same destination path. Please choose a different path for this job. - Pending Jobs {7} + Pending Jobs {0} New Default Preset Set: {0} @@ -548,7 +548,7 @@ The Activity log may have further information. Are you sure you want to delete the preset: - Encoding: Pass {0} of {1}, {2:00.00}%, FPS: {3:000.0}, Avg FPS: {4:000.0}, Time Remaining: {5}, Elapsed: {6:d\:hh\:mm\:ss} + Encoding: Pass {0} of {1}, {2:00.00}%, FPS: {3:000.0}, Avg FPS: {4:000.0}, Time Remaining: {5}, Elapsed: {6:d\:hh\:mm\:ss} {7} A Preset must have a Name. Please fill out the Preset Name field. @@ -825,4 +825,7 @@ Your preset file will be archived and new one created. You will need to re-creat Please check that you have a valid destination directory. + + Processing Pass {0} of {1}, (Subtitle Scan) {2:00.00}%, Scan Time Remaining: {3}, Elapsed: {4:d\:hh\:mm\:ss} + \ No newline at end of file diff --git a/win/CS/HandBrakeWPF/Services/Encode/EventArgs/EncodeProgressEventArgs.cs b/win/CS/HandBrakeWPF/Services/Encode/EventArgs/EncodeProgressEventArgs.cs index 5d3d12791..940be6568 100644 --- a/win/CS/HandBrakeWPF/Services/Encode/EventArgs/EncodeProgressEventArgs.cs +++ b/win/CS/HandBrakeWPF/Services/Encode/EventArgs/EncodeProgressEventArgs.cs @@ -59,5 +59,16 @@ namespace HandBrakeWPF.Services.Encode.EventArgs /// [DataMember] public TimeSpan ElapsedTime { get; set; } + + /// + /// Gets or sets PassId. + /// + /// + /// -1: Subtitle scan + /// 0: Encode + /// 1: Encode first pass + /// 2: Encode second pass + /// + public int PassId { get; set; } } } diff --git a/win/CS/HandBrakeWPF/Services/Encode/LibEncode.cs b/win/CS/HandBrakeWPF/Services/Encode/LibEncode.cs index ec0680fb1..58505659b 100644 --- a/win/CS/HandBrakeWPF/Services/Encode/LibEncode.cs +++ b/win/CS/HandBrakeWPF/Services/Encode/LibEncode.cs @@ -169,6 +169,7 @@ namespace HandBrakeWPF.Services.Encode Task = e.Pass, TaskCount = e.PassCount, ElapsedTime = DateTime.Now - this.startTime, + PassId = e.PassId }; this.InvokeEncodeStatusChanged(args); diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 359301296..9f7ad8cb3 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -2339,16 +2339,30 @@ namespace HandBrakeWPF.ViewModels { if (this.queueProcessor.EncodeService.IsEncoding) { - this.ProgramStatusLabel = - string.Format(Resources.MainViewModel_EncodeStatusChanged_StatusLabel + Resources.Main_JobsPending_addon, + string jobsPending = string.Format(Resources.Main_JobsPending_addon, this.queueProcessor.Count); + if (e.PassId == -1) + { + this.ProgramStatusLabel = string.Format(Resources.MainViewModel_EncodeStatusChanged_SubScan_StatusLabel, + e.Task, + e.TaskCount, + e.PercentComplete, + e.EstimatedTimeLeft, + e.ElapsedTime, + jobsPending); + } + else + { + this.ProgramStatusLabel = + string.Format(Resources.MainViewModel_EncodeStatusChanged_StatusLabel, e.Task, e.TaskCount, e.PercentComplete, - e.CurrentFrameRate, - e.AverageFrameRate, - e.EstimatedTimeLeft, + e.CurrentFrameRate, + e.AverageFrameRate, + e.EstimatedTimeLeft, e.ElapsedTime, - this.queueProcessor.Count); + jobsPending); + } if (lastEncodePercentage != percent && this.windowsSeven.IsWindowsSeven) { -- cgit v1.2.3