summaryrefslogtreecommitdiffstats
path: root/win/C#/frmQueue.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2008-09-09 16:48:33 +0000
committersr55 <[email protected]>2008-09-09 16:48:33 +0000
commit57dc995028ba55fb514d29855bf0e01f1903791b (patch)
treeaf53fdbaa3ec1dd3567d5e29008845974b464258 /win/C#/frmQueue.cs
parent38340006c9205d3fe61fa8e4bad54afcac64d282 (diff)
WinGui:
- Allow users to manually import / export the queue. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1682 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmQueue.cs')
-rw-r--r--win/C#/frmQueue.cs48
1 files changed, 33 insertions, 15 deletions
diff --git a/win/C#/frmQueue.cs b/win/C#/frmQueue.cs
index 1cf293033..670153c96 100644
--- a/win/C#/frmQueue.cs
+++ b/win/C#/frmQueue.cs
@@ -110,7 +110,7 @@ namespace Handbrake
btn_stop.Visible = true;
progressBar.Value = 0;
lbl_progressValue.Text = "0 %";
- progressBar.Step = 100 / queue.count();
+ progressBar.Step = 100 / queue.count();
Thread theQ = new Thread(startProc);
theQ.IsBackground = true;
theQ.Start();
@@ -279,7 +279,7 @@ namespace Handbrake
if (list_queue.SelectedIndices.Count != 0)
{
queue.moveUp(list_queue.SelectedIndices[0]);
- queue.write2disk(); // Update the queue recovery file
+ queue.write2disk("hb_queue_recovery.dat"); // Update the queue recovery file
redrawQueue();
}
}
@@ -290,7 +290,7 @@ namespace Handbrake
if (list_queue.SelectedIndices.Count != 0)
{
queue.moveDown(list_queue.SelectedIndices[0]);
- queue.write2disk(); // Update the queue recovery file
+ queue.write2disk("hb_queue_recovery.dat"); // Update the queue recovery file
redrawQueue();
}
}
@@ -301,16 +301,30 @@ namespace Handbrake
if (list_queue.SelectedIndices.Count != 0)
{
queue.remove(list_queue.SelectedIndices[0]);
- queue.write2disk(); // Update the queue recovery file
+ queue.write2disk("hb_queue_recovery.dat"); // Update the queue recovery file
redrawQueue();
}
}
- // Generate a batch file script to run the encode seperate of HandBrake
- private void btn_batch_Click(object sender, EventArgs e)
+
+ // Hide's the window from the users view.
+ private void btn_Close_Click(object sender, EventArgs e)
+ {
+ this.Hide();
+ }
+
+ // Hide's the window when the user tries to "x" out of the window instead of closing it.
+ protected override void OnClosing(CancelEventArgs e)
+ {
+ e.Cancel = true;
+ this.Hide();
+ base.OnClosing(e);
+ }
+
+ private void mnu_batch_Click(object sender, EventArgs e)
{
string queries = "";
- foreach (string query_item in queue.getQueue())
+ foreach (string query_item in queue.getQueue())
{
string fullQuery = '"' + Application.StartupPath.ToString() + "\\HandBrakeCLI.exe" + '"' + query_item;
@@ -321,6 +335,7 @@ namespace Handbrake
}
string strCmdLine = queries;
+ SaveFile.Filter = "Batch|.bat";
SaveFile.ShowDialog();
string filename = SaveFile.FileName;
@@ -344,19 +359,22 @@ namespace Handbrake
}
}
- // Hide's the window from the users view.
- private void btn_Close_Click(object sender, EventArgs e)
+ private void mnu_export_Click(object sender, EventArgs e)
{
- this.Hide();
+ SaveFile.Filter = "HandBrake Queue|*.queue";
+ SaveFile.ShowDialog();
+ if (SaveFile.FileName != String.Empty)
+ queue.write2disk(SaveFile.FileName);
}
- // Hide's the window when the user tries to "x" out of the window instead of closing it.
- protected override void OnClosing(CancelEventArgs e)
+ private void mnu_import_Click(object sender, EventArgs e)
{
- e.Cancel = true;
- this.Hide();
- base.OnClosing(e);
+ OpenFile.ShowDialog();
+ if (OpenFile.FileName != String.Empty)
+ queue.recoverQueue(OpenFile.FileName);
+ redrawQueue();
}
+
}
} \ No newline at end of file