From 78140d60db80df8b7855f7832b029f1382aeaa9a Mon Sep 17 00:00:00 2001 From: sr55 Date: Sat, 25 Nov 2017 21:01:48 +0000 Subject: WinGui: Fix the mini status display controller. --- .../HandBrakeWPF/Properties/Resources.Designer.cs | 11 +++++++++++ win/CS/HandBrakeWPF/Properties/Resources.resx | 5 +++++ win/CS/HandBrakeWPF/ViewModels/MiniViewModel.cs | 21 +++++++++++---------- win/CS/HandBrakeWPF/Views/MiniView.xaml | 7 ++++--- 4 files changed, 31 insertions(+), 13 deletions(-) (limited to 'win') diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs index 84c370a37..c30ec5f3a 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs +++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs @@ -1172,6 +1172,17 @@ 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}. + /// + public static string MiniViewModel_EncodeStatusChanged_StatusLabel { + get { + return ResourceManager.GetString("MiniViewModel_EncodeStatusChanged_StatusLabel", resourceCulture); + } + } + /// /// Looks up a localized string similar to No Additional Information. /// diff --git a/win/CS/HandBrakeWPF/Properties/Resources.resx b/win/CS/HandBrakeWPF/Properties/Resources.resx index 23b422da2..c841deee1 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.resx +++ b/win/CS/HandBrakeWPF/Properties/Resources.resx @@ -864,4 +864,9 @@ Remaining Time: {4} Please stop the current encode. If the problem persists, please restart HandBrake. + + 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} + \ No newline at end of file diff --git a/win/CS/HandBrakeWPF/ViewModels/MiniViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MiniViewModel.cs index 64809bbf4..3e5fb83c1 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MiniViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MiniViewModel.cs @@ -193,16 +193,17 @@ namespace HandBrakeWPF.ViewModels /// private void EncodeService_EncodeStatusChanged(object sender, EncodeProgressEventArgs e) { - this.Task = queueProcessor.LastProcessedJob.ScannedSourcePath; - - // {0:00.00}% FPS: {1:000.0} Avg FPS: {2:000.0} Time Remaining: {3} Elapsed: {4:hh\:mm\:ss} - this.Progress = string.Format( - Resources.MainViewModel_EncodeStatusChanged_StatusLabel, - e.PercentComplete, - e.CurrentFrameRate, - e.AverageFrameRate, - e.EstimatedTimeLeft, - e.ElapsedTime); + this.Task = this.queueProcessor.LastProcessedJob.ScannedSourcePath; + + this.Progress = + string.Format(Resources.MiniViewModel_EncodeStatusChanged_StatusLabel, + e.Task, + e.TaskCount, + e.PercentComplete, + e.CurrentFrameRate, + e.AverageFrameRate, + e.EstimatedTimeLeft, + e.ElapsedTime); } } } diff --git a/win/CS/HandBrakeWPF/Views/MiniView.xaml b/win/CS/HandBrakeWPF/Views/MiniView.xaml index a4abe239c..a90c0c3f3 100644 --- a/win/CS/HandBrakeWPF/Views/MiniView.xaml +++ b/win/CS/HandBrakeWPF/Views/MiniView.xaml @@ -6,9 +6,9 @@ SnapsToDevicePixels="True" UseLayoutRounding="True" Width="300" - Height="175" + Height="200" MinWidth="300" - MinHeight="175" + MinHeight="200" TextOptions.TextFormattingMode="Display" ShowActivated="True" ShowInTaskbar="True" WindowStyle="ToolWindow" x:Name="miniView" @@ -21,6 +21,7 @@ + @@ -29,6 +30,6 @@ -