diff options
author | sr55 <[email protected]> | 2008-12-17 00:11:23 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2008-12-17 00:11:23 +0000 |
commit | e3097f34b3f5ba278a90721d131b97890d92e006 (patch) | |
tree | 4b5542c3e02b5ed014bfc8ba7545a5d69669dbfc /win/C#/frmQueue.cs | |
parent | 997dbd7ebc391e35cdff807dbe18506160dbf94c (diff) |
WinGui:
- Some fixes in the new code which handles encoding across the Queue and MainWindow.
- Small UI tweaks on Activity Window and Generate Preview Window
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2039 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmQueue.cs')
-rw-r--r-- | win/C#/frmQueue.cs | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/win/C#/frmQueue.cs b/win/C#/frmQueue.cs index 86ae4b5bd..648deef89 100644 --- a/win/C#/frmQueue.cs +++ b/win/C#/frmQueue.cs @@ -81,6 +81,15 @@ namespace Handbrake {
if (queue.count() != 0)
{
+ // Setup or reset some values
+ btn_encode.Enabled = false;
+ btn_stop.Visible = true;
+ progressBar.Value = 0;
+ lbl_progressValue.Text = "0 %";
+ if (queue.count() == 0)
+ progressBar.Step = 100;
+ else
+ progressBar.Step = 100 / queue.count();
Thread theQ = new Thread(startProc);
theQ.IsBackground = true;
theQ.Start();
@@ -135,19 +144,16 @@ namespace Handbrake // Initializes the encode process
private void btn_encode_Click(object sender, EventArgs e)
{
- mainWindow.setLastAction("encode");
- mainWindow.setEncodeStatus(1);
-
if (queue.count() != 0)
{
btn_encode.Enabled = false;
- }
- cancel = false;
+ mainWindow.setLastAction("encode");
+ mainWindow.setEncodeStatus(1);
- // Start the encode
- try
- {
- if (queue.count() != 0)
+ cancel = false;
+
+ // Start the encode
+ try
{
// Setup or reset some values
btn_encode.Enabled = false;
@@ -162,10 +168,10 @@ namespace Handbrake theQ.IsBackground = true;
theQ.Start();
}
- }
- catch (Exception exc)
- {
- MessageBox.Show(exc.ToString());
+ catch (Exception exc)
+ {
+ MessageBox.Show(exc.ToString());
+ }
}
}
@@ -339,8 +345,8 @@ namespace Handbrake queue.write2disk("hb_queue_recovery.xml"); // Update the queue recovery file
redrawQueue();
- if (selected - 1 > 0)
- list_queue.Items[selected -1].Selected = true;
+ if (selected - 1 > 0)
+ list_queue.Items[selected - 1].Selected = true;
list_queue.Select();
}
@@ -355,7 +361,7 @@ namespace Handbrake queue.write2disk("hb_queue_recovery.xml"); // Update the queue recovery file
redrawQueue();
- if (selected +1 < list_queue.Items.Count)
+ if (selected + 1 < list_queue.Items.Count)
list_queue.Items[selected + 1].Selected = true;
list_queue.Select();
|