From 57dc995028ba55fb514d29855bf0e01f1903791b Mon Sep 17 00:00:00 2001 From: sr55 Date: Tue, 9 Sep 2008 16:48:33 +0000 Subject: WinGui: - Allow users to manually import / export the queue. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1682 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/C#/Functions/Queue.cs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'win/C#/Functions') diff --git a/win/C#/Functions/Queue.cs b/win/C#/Functions/Queue.cs index dc2345358..d6c7978de 100644 --- a/win/C#/Functions/Queue.cs +++ b/win/C#/Functions/Queue.cs @@ -101,11 +101,15 @@ namespace Handbrake.Functions /// Writes the current queue to disk. hb_queue_recovery.dat /// This function is called after getNextItemForEncoding() /// - public void write2disk() + public void write2disk(string file) { try { - string tempPath = Path.Combine(Path.GetTempPath(), "hb_queue_recovery.dat"); + string tempPath = ""; + if (file == "hb_queue_recovery.dat") + tempPath = Path.Combine(Path.GetTempPath(), "hb_queue_recovery.dat"); + else + tempPath = file; using (StreamWriter writer = new StreamWriter(tempPath)) { foreach (string item in queue) @@ -125,11 +129,15 @@ namespace Handbrake.Functions /// /// Recover the queue from hb_queue_recovery.dat /// - public void recoverQueue() + public void recoverQueue(string file) { try { - string tempPath = Path.Combine(Path.GetTempPath(), "hb_queue_recovery.dat"); + string tempPath = ""; + if (file == "hb_queue_recovery.dat") + tempPath = Path.Combine(Path.GetTempPath(), "hb_queue_recovery.dat"); + else + tempPath = file; using (StreamReader reader = new StreamReader(tempPath)) { string queue_item = reader.ReadLine(); -- cgit v1.2.3