From: sr55 Date: Mon, 16 Jul 2007 16:53:42 +0000 (+0000) Subject: WinGui: X-Git-Tag: 0.9.0~144 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=be1d65b182b5dfa603bfbfd5b1e492d3c77f33b8;p=handbrake WinGui: - Files for last checkin git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@697 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/win/C#/Functions/CLI.cs b/win/C#/Functions/CLI.cs new file mode 100644 index 000000000..3ed958d50 --- /dev/null +++ b/win/C#/Functions/CLI.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Threading; +using System.Diagnostics; + + +namespace Handbrake.Functions +{ + class CLI + { + public Process runCli(object s, string query, bool stderr, bool stdout, bool useShellExec, bool noWindow) + { + Process hbProc = new Process(); + hbProc.StartInfo.FileName = "hbcli.exe"; + hbProc.StartInfo.Arguments = query; + hbProc.StartInfo.RedirectStandardOutput = stdout; + hbProc.StartInfo.RedirectStandardError = stderr; + hbProc.StartInfo.UseShellExecute = useShellExec; + hbProc.StartInfo.CreateNoWindow = noWindow; + hbProc.Start(); + + // Set the process Priority + switch (Properties.Settings.Default.processPriority) + { + case "Realtime": + hbProc.PriorityClass = ProcessPriorityClass.RealTime; + break; + case "High": + hbProc.PriorityClass = ProcessPriorityClass.High; + break; + case "Above Normal": + hbProc.PriorityClass = ProcessPriorityClass.AboveNormal; + break; + case "Normal": + hbProc.PriorityClass = ProcessPriorityClass.Normal; + break; + case "Low": + hbProc.PriorityClass = ProcessPriorityClass.Idle; + break; + default: + hbProc.PriorityClass = ProcessPriorityClass.BelowNormal; + break; + } + return hbProc; + } + } +} diff --git a/win/C#/Functions/Update.cs b/win/C#/Functions/Update.cs new file mode 100644 index 000000000..30a7c0df9 --- /dev/null +++ b/win/C#/Functions/Update.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Handbrake.Functions +{ + class Update + { + } +}