diff options
author | sr55 <[email protected]> | 2011-05-08 11:00:16 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-05-08 11:00:16 +0000 |
commit | c2e751e3eb2ed19163c6c2a1318eab28bcbb921b (patch) | |
tree | 2a652aefd39b11c7442136052927df1b0e9b6191 /win/CS/HandBrake.ApplicationServices/Services/Encode.cs | |
parent | 3d7392c9e4f114408b2fd16bd848a2e10c36fa32 (diff) |
WinGui:
- Add Elapsed Encode Time the main window.
- Add Elapsed Queue Time to the queue window. (Note, Pausing the queue resets this currently)
- Fixed an issue with disabled controls on the audio panel after removing the last track which was passthru.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3973 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services/Encode.cs')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Services/Encode.cs | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs index 9232ea95e..5787ab8a8 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs @@ -28,11 +28,6 @@ namespace HandBrake.ApplicationServices.Services #region Private Variables
/// <summary>
- /// The User Setting Service
- /// </summary>
- private IUserSettingService userSettingService = new UserSettingService();
-
- /// <summary>
/// The Log Buffer
/// </summary>
private StringBuilder logBuffer;
@@ -67,6 +62,11 @@ namespace HandBrake.ApplicationServices.Services /// </summary>
StringBuilder header = GeneralUtilities.CreateCliLogHeader(null);
+ /// <summary>
+ /// The Start time of the current Encode;
+ /// </summary>
+ private DateTime startTime;
+
#endregion
/// <summary>
@@ -100,11 +100,6 @@ namespace HandBrake.ApplicationServices.Services #region Properties
/// <summary>
- /// Gets or sets The HB Process
- /// </summary>
- protected Process HbProcess { get; set; }
-
- /// <summary>
/// Gets a value indicating whether IsEncoding.
/// </summary>
public bool IsEncoding { get; private set; }
@@ -115,11 +110,16 @@ namespace HandBrake.ApplicationServices.Services public string ActivityLog
{
get
- {
+ {
return string.IsNullOrEmpty(this.logBuffer.ToString()) ? header + "No log data available..." : header + this.logBuffer.ToString();
}
}
+ /// <summary>
+ /// Gets or sets The HB Process
+ /// </summary>
+ protected Process HbProcess { get; set; }
+
#endregion
#region Public Methods
@@ -190,6 +190,8 @@ namespace HandBrake.ApplicationServices.Services this.HbProcess.Start();
+ this.startTime = DateTime.Now;
+
if (enableLogging)
{
this.HbProcess.ErrorDataReceived += HbProcErrorDataReceived;
@@ -529,18 +531,21 @@ namespace HandBrake.ApplicationServices.Services EstimatedTimeLeft = Converters.EncodeToTimespan(timeRemaining),
PercentComplete = percentComplete,
Task = currentTask,
- TaskCount = taskCount
+ TaskCount = taskCount,
+ ElapsedTime = DateTime.Now - this.startTime,
};
if (this.EncodeStatusChanged != null)
+ {
this.EncodeStatusChanged(this, eventArgs);
+ }
- if (windowsSeven.IsWindowsSeven)
+ if (this.windowsSeven.IsWindowsSeven)
{
int percent;
int.TryParse(Math.Round(percentComplete).ToString(), out percent);
- windowsSeven.SetTaskBarProgress(percent);
+ this.windowsSeven.SetTaskBarProgress(percent);
}
}
|