From 93f6c9c22d8d3ac46980a012511046b1f4202bc6 Mon Sep 17 00:00:00 2001 From: sr55 Date: Wed, 22 Apr 2009 12:27:37 +0000 Subject: WinGui: - Queue: Can now store unlimited number of audio tracks in presets. It is no longer limited to 4. - Activity Window: Fixed a bug where it was looking at the wrong class for checking the status of encoding. - Activity Window: Improved update / display performance dramatically by removing a List data structure. - Misc: Old code removed / code tweaks git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2349 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/C#/Functions/Encode.cs | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'win/C#/Functions/Encode.cs') diff --git a/win/C#/Functions/Encode.cs b/win/C#/Functions/Encode.cs index 1cd3de4ae..6c30828c2 100644 --- a/win/C#/Functions/Encode.cs +++ b/win/C#/Functions/Encode.cs @@ -16,20 +16,18 @@ namespace Handbrake.Functions { // DLL Imports [DllImport("user32.dll")] - public static extern void LockWorkStation(); + private static extern void LockWorkStation(); [DllImport("user32.dll")] - public static extern int ExitWindowsEx(int uFlags, int dwReason); + private static extern int ExitWindowsEx(int uFlags, int dwReason); // Declarations Process hbProc = new Process(); - Boolean encoding; /// /// Execute a HandBrakeCLI process. /// - /// /// The CLI Query - public Process runCli(object s, string query) + public Process runCli(string query) { try { @@ -42,7 +40,8 @@ namespace Handbrake.Functions if (Properties.Settings.Default.cli_minimized == "Checked") cliStart.WindowStyle = ProcessWindowStyle.Minimized; hbProc = Process.Start(cliStart); - encoding = true; + isEncoding = true; + currentQuery = query; // Set the process Priority if (hbProc != null) @@ -80,7 +79,8 @@ namespace Handbrake.Functions /// public void afterEncodeAction() { - encoding = false; + isEncoding = false; + currentQuery = String.Empty; // Do something whent he encode ends. switch (Properties.Settings.Default.CompletionOption) { @@ -132,9 +132,8 @@ namespace Handbrake.Functions /// Save a copy of the log to the users desired location or a default location /// if this feature is enabled in options. /// - /// /// - public void copyLog(string query, string destination) + public void copyLog(string destination) { // The user may wish to do something with the log. if (Properties.Settings.Default.saveLog == "Checked") @@ -169,10 +168,12 @@ namespace Handbrake.Functions /// /// Returns whether HandBrake is currently encoding or not. /// - public Boolean isEncoding - { - get { return encoding; } - } + public Boolean isEncoding { get; set; } + + /// + /// Returns the currently encoding query string + /// + public String currentQuery { get; set; } } } -- cgit v1.2.3