summaryrefslogtreecommitdiffstats
path: root/win/C#/Functions
diff options
context:
space:
mode:
authorsr55 <[email protected]>2008-11-12 15:57:39 +0000
committersr55 <[email protected]>2008-11-12 15:57:39 +0000
commitd99095dd075535212881be4a1d7544e9aca91b5b (patch)
tree34a8961821575de3493764de08099daf8aeb8909 /win/C#/Functions
parent507d870e33c46a7186c647a6d53288123fc60c74 (diff)
WinGui:
- Adds the CLI query to the top of every log file generated after an encode finishes. Note: CLI query will only display in the activity window after the CLI has exited. This can be sorted later. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1917 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Functions')
-rw-r--r--win/C#/Functions/Encode.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/win/C#/Functions/Encode.cs b/win/C#/Functions/Encode.cs
index f79f45a9b..0445392d0 100644
--- a/win/C#/Functions/Encode.cs
+++ b/win/C#/Functions/Encode.cs
@@ -107,6 +107,32 @@ namespace Handbrake.Functions
}
}
+ /// <summary>
+ /// Append the CLI query to the start of the log file.
+ /// </summary>
+ /// <param name="query"></param>
+ public void addCLIQueryToLog(string query)
+ {
+ string logPath = Path.Combine(Path.GetTempPath(), "hb_encode_log.dat");
+
+ StreamReader reader = new StreamReader(File.Open(logPath, FileMode.Open, FileAccess.Read));
+ String log = reader.ReadToEnd();
+ reader.Close();
+
+ StreamWriter writer = new StreamWriter(File.Create(logPath));
+
+ writer.Write("### CLI Query: " + query + "\n\n");
+ writer.Write("#########################################\n\n");
+ writer.WriteLine(log);
+ writer.Flush();
+ writer.Close();
+ }
+
+ /// <summary>
+ /// Save a copy of the log to the users desired location or a default location
+ /// if this feature is enabled in options.
+ /// </summary>
+ /// <param name="query"></param>
public void copyLog(string query)
{
// The user may wish to do something with the log.