summaryrefslogtreecommitdiffstats
path: root/win/C#/Functions
diff options
context:
space:
mode:
authorsr55 <[email protected]>2008-07-29 13:22:37 +0000
committersr55 <[email protected]>2008-07-29 13:22:37 +0000
commit9f9dfaa881dde27143fead985923350bcb4ee321 (patch)
tree740a1b535a64a412da6444a68a90bd3757fbdf96 /win/C#/Functions
parentc334dbfa9fb0cca851fe45c8fb9ba0a4c147ba2e (diff)
WinGui:
- Added option to start CLI minimized git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1590 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Functions')
-rw-r--r--win/C#/Functions/Encode.cs13
1 files changed, 4 insertions, 9 deletions
diff --git a/win/C#/Functions/Encode.cs b/win/C#/Functions/Encode.cs
index eb1263585..f2fb11440 100644
--- a/win/C#/Functions/Encode.cs
+++ b/win/C#/Functions/Encode.cs
@@ -30,11 +30,6 @@ namespace Handbrake.Functions
/// </summary>
/// <param name="s"></param>
/// <param name="query">The CLI Query</param>
- /// <param name="stderr">Rediect standard error</param>
- /// <param name="stdout">Redirect Standard output</param>
- /// <param name="useShellExec"> Use Shell Executable</param>
- /// <param name="noWindow">Display No Window</param>
- /// <returns>Returns a process</returns>
public Process runCli(object s, string query)
{
try
@@ -42,11 +37,11 @@ namespace Handbrake.Functions
string handbrakeCLIPath = Path.Combine(Application.StartupPath, "HandBrakeCLI.exe");
string logPath = Path.Combine(Path.GetTempPath(), "hb_encode_log.dat");
- string strCmdLine = String.Format(@" cmd /c """"{0}"" {1} 2>""{2}"" """, handbrakeCLIPath, query, logPath);
- //string arguments = String.Format(@"{0} 2>""{1}""", query, logPath);
+ string strCmdLine = String.Format(@" CMD /c """"{0}"" {1} 2>""{2}"" """, handbrakeCLIPath, query, logPath);
ProcessStartInfo cliStart = new ProcessStartInfo("CMD.exe", strCmdLine);
-
+ if (Properties.Settings.Default.cli_minimized == "Checked")
+ cliStart.WindowStyle = ProcessWindowStyle.Minimized;
hbProc = Process.Start(cliStart);
// Set the process Priority
@@ -74,7 +69,7 @@ namespace Handbrake.Functions
}
catch (Exception exc)
{
- MessageBox.Show("Internal Software Error. Please Restart the Program. Error Information: \n\n" + exc.ToString());
+ MessageBox.Show("An error occured in runCli()\n Error Information: \n\n" + exc.ToString());
}
return hbProc;
}