diff options
author | sr55 <[email protected]> | 2019-07-16 21:49:07 +0100 |
---|---|---|
committer | sr55 <[email protected]> | 2019-07-16 21:49:07 +0100 |
commit | df8c5f83dead18a3a02220bb3052b6681626115e (patch) | |
tree | 75049d3498deb91400b5b4a2efa338de26d93b26 /win | |
parent | dd8f04643a07579efa2b3ad78b71feeb68d0db43 (diff) |
WinGui: Show Day long encodes in hours consistent with the other UIs
Diffstat (limited to 'win')
5 files changed, 19 insertions, 15 deletions
diff --git a/win/CS/HandBrake.Interop/Interop/HandBrakeInstance.cs b/win/CS/HandBrake.Interop/Interop/HandBrakeInstance.cs index c11340ee9..275f7ca29 100644 --- a/win/CS/HandBrake.Interop/Interop/HandBrakeInstance.cs +++ b/win/CS/HandBrake.Interop/Interop/HandBrakeInstance.cs @@ -1,5 +1,5 @@ // -------------------------------------------------------------------------------------------------------------------- -// <copyright file="HandBrakeInstance.cs" company="HandBrake Project (http://handbrake.fr)"> +// <copyright file="HandBrakeInstance.cs" company="HandBrake Project (https://handbrake.fr)"> // This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. // </copyright> // <summary> diff --git a/win/CS/HandBrake.Interop/Interop/Json/State/JsonState.cs b/win/CS/HandBrake.Interop/Interop/Json/State/JsonState.cs index 6f8513671..1dc52a953 100644 --- a/win/CS/HandBrake.Interop/Interop/Json/State/JsonState.cs +++ b/win/CS/HandBrake.Interop/Interop/Json/State/JsonState.cs @@ -1,5 +1,5 @@ // -------------------------------------------------------------------------------------------------------------------- -// <copyright file="JsonState.cs" company="HandBrake Project (http://handbrake.fr)"> +// <copyright file="JsonState.cs" company="HandBrake Project (https://handbrake.fr)"> // This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. // </copyright> // <summary> diff --git a/win/CS/HandBrake.Interop/Interop/Json/State/Working.cs b/win/CS/HandBrake.Interop/Interop/Json/State/Working.cs index 4e5060031..0b16b6afd 100644 --- a/win/CS/HandBrake.Interop/Interop/Json/State/Working.cs +++ b/win/CS/HandBrake.Interop/Interop/Json/State/Working.cs @@ -1,5 +1,5 @@ // -------------------------------------------------------------------------------------------------------------------- -// <copyright file="Working.cs" company="HandBrake Project (http://handbrake.fr)"> +// <copyright file="Working.cs" company="HandBrake Project (https://handbrake.fr)"> // This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. // </copyright> // <summary> diff --git a/win/CS/HandBrakeWPF/Instance/RemoteInstance.cs b/win/CS/HandBrakeWPF/Instance/RemoteInstance.cs index e7c077c52..c65a7f2af 100644 --- a/win/CS/HandBrakeWPF/Instance/RemoteInstance.cs +++ b/win/CS/HandBrakeWPF/Instance/RemoteInstance.cs @@ -187,7 +187,7 @@ namespace HandBrakeWPF.Instance fractionComplete: state.Working.Progress, currentFrameRate: state.Working.Rate, averageFrameRate: state.Working.RateAvg, - estimatedTimeLeft: new TimeSpan(state.Working.Hours, state.Working.Minutes, state.Working.Seconds), + estimatedTimeLeft: TimeSpan.FromSeconds(state.Working.ETASeconds), passId: state.Working.PassID, pass: state.Working.Pass, passCount: state.Working.PassCount, diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 8fc0dde59..2b9b88285 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -2494,15 +2494,19 @@ namespace HandBrakeWPF.ViewModels {
if (this.queueProcessor.EncodeService.IsEncoding)
{
+ string totalHrsLeft = string.Format("{0}:{1}:{2}", (int)e.EstimatedTimeLeft.TotalHours, e.EstimatedTimeLeft.Minutes, e.EstimatedTimeLeft.Seconds);
+ string elapsedTimeHrs = string.Format("{0}:{1}:{2}", (int)e.ElapsedTime.TotalHours, e.ElapsedTime.Minutes, e.ElapsedTime.Seconds);
string jobsPending = string.Format(Resources.Main_JobsPending_addon, this.queueProcessor.Count);
+
if (e.IsSubtitleScan)
{
- this.ProgramStatusLabel = string.Format(Resources.MainViewModel_EncodeStatusChanged_SubScan_StatusLabel,
+ this.ProgramStatusLabel = string.Format(
+ Resources.MainViewModel_EncodeStatusChanged_SubScan_StatusLabel,
e.Task,
e.TaskCount,
e.PercentComplete,
- e.EstimatedTimeLeft,
- e.ElapsedTime,
+ totalHrsLeft,
+ elapsedTimeHrs,
jobsPending);
}
else if (e.IsMuxing)
@@ -2511,30 +2515,30 @@ namespace HandBrakeWPF.ViewModels }
else if (e.IsSearching)
{
- this.ProgramStatusLabel = string.Format(Resources.MainView_ProgressStatusWithTask, Resources.MainView_Searching, e.PercentComplete, e.EstimatedTimeLeft, jobsPending);
+ this.ProgramStatusLabel = string.Format(Resources.MainView_ProgressStatusWithTask, Resources.MainView_Searching, e.PercentComplete, totalHrsLeft, jobsPending);
}
else
{
- this.ProgramStatusLabel =
- string.Format(Resources.MainViewModel_EncodeStatusChanged_StatusLabel,
+ this.ProgramStatusLabel = string.Format(
+ Resources.MainViewModel_EncodeStatusChanged_StatusLabel,
e.Task,
e.TaskCount,
e.PercentComplete,
e.CurrentFrameRate,
e.AverageFrameRate,
- e.EstimatedTimeLeft,
- e.ElapsedTime,
+ totalHrsLeft,
+ elapsedTimeHrs,
jobsPending);
}
- if (lastEncodePercentage != percent && this.windowsSeven.IsWindowsSeven)
+ if (this.lastEncodePercentage != percent && this.windowsSeven.IsWindowsSeven)
{
this.windowsSeven.SetTaskBarProgress(percent);
}
- lastEncodePercentage = percent;
+ this.lastEncodePercentage = percent;
this.ProgressPercentage = percent;
- this.NotifyOfPropertyChange(() => ProgressPercentage);
+ this.NotifyOfPropertyChange(() => this.ProgressPercentage);
if (this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowStatusInTitleBar))
{
|