summaryrefslogtreecommitdiffstats
path: root/win/CS/frmQueue.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/frmQueue.cs')
-rw-r--r--win/CS/frmQueue.cs66
1 files changed, 64 insertions, 2 deletions
diff --git a/win/CS/frmQueue.cs b/win/CS/frmQueue.cs
index 6bc7081f5..94c7cebd0 100644
--- a/win/CS/frmQueue.cs
+++ b/win/CS/frmQueue.cs
@@ -47,6 +47,9 @@ namespace Handbrake
/// </summary>
private readonly frmMain mainWindow;
+ /// <summary>
+ /// The User setting service
+ /// </summary>
private readonly IUserSettingService userSettingService = new UserSettingService();
/// <summary>
@@ -137,6 +140,8 @@ namespace Handbrake
return;
}
+ this.queue.QueueManager.LastProcessedJob.ElaspedEncodeTime = e.ElapsedTime;
+
lbl_encodeStatus.Text =
string.Format(
"Encoding: Pass {0} of {1}, {2:00.00}%, FPS: {3:000.0}, Avg FPS: {4:000.0}, Time Remaining: {5}, Elapsed: {6:hh\\:mm\\:ss}",
@@ -299,6 +304,7 @@ namespace Handbrake
btn_pause.Visible = false;
btn_encode.Enabled = true;
+ this.RedrawQueue();
ResetEncodeText();
}
@@ -353,7 +359,9 @@ namespace Handbrake
chapters = chapters + " - " + parsed.EndPoint;
}
- ListViewItem item = new ListViewItem { Tag = queueItem, Text = title };
+ ListViewItem item = new ListViewItem
+ { Tag = queueItem, Text = EnumHelper<QueueItemStatus>.GetDescription(queueItem.Status) };
+ item.SubItems.Add(title);
item.SubItems.Add(chapters); // Chapters
item.SubItems.Add(queueItem.Source); // Source
item.SubItems.Add(queueItem.Destination); // Destination
@@ -389,6 +397,9 @@ namespace Handbrake
UpdateStatusLabel();
}
+ /// <summary>
+ /// Update the Display
+ /// </summary>
private void UpdateStatusLabel()
{
if (InvokeRequired)
@@ -397,7 +408,7 @@ namespace Handbrake
return;
}
- lbl_encodesPending.Text = string.Format("{0} encodes(s) pending", list_queue.Items.Count);
+ lbl_encodesPending.Text = string.Format("{0} encodes(s) pending", this.queue.QueueManager.Count);
}
/// <summary>
@@ -718,5 +729,56 @@ namespace Handbrake
{
userSettingService.SetUserSetting(UserSettingConstants.WhenCompleteAction, drp_completeOption.Text);
}
+
+ /// <summary>
+ /// Clear all completed items
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ private void mnuClearCompleted_Click(object sender, EventArgs e)
+ {
+ this.queue.QueueManager.ClearCompleted();
+ }
+
+ /// <summary>
+ /// Retry Job Menu Item
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ private void mnu_Retry_Click(object sender, EventArgs e)
+ {
+ if (list_queue.SelectedIndices.Count != 0)
+ {
+ lock (queue)
+ {
+ lock (list_queue)
+ {
+ QueueTask index = list_queue.SelectedItems[0].Tag as QueueTask;
+
+ try
+ {
+ queue.QueueManager.ResetJobStatusToWaiting(index);
+ }
+ catch (Exception)
+ {
+ MessageBox.Show(
+ "Can only retry a job if it is in an Error or Completed state.",
+ "Notice",
+ MessageBoxButtons.OK,
+ MessageBoxIcon.Information);
+ }
+ RedrawQueue();
+ }
+ }
+ }
+ }
}
} \ No newline at end of file