]> granicus.if.org Git - handbrake/commitdiff
WinGui:
authorsr55 <sr55.hb@outlook.com>
Mon, 16 Jul 2007 16:53:42 +0000 (16:53 +0000)
committersr55 <sr55.hb@outlook.com>
Mon, 16 Jul 2007 16:53:42 +0000 (16:53 +0000)
- Files for last checkin

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@697 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/C#/Functions/CLI.cs [new file with mode: 0644]
win/C#/Functions/Update.cs [new file with mode: 0644]

diff --git a/win/C#/Functions/CLI.cs b/win/C#/Functions/CLI.cs
new file mode 100644 (file)
index 0000000..3ed958d
--- /dev/null
@@ -0,0 +1,47 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.Threading;\r
+using System.Diagnostics;\r
\r
+\r
+namespace Handbrake.Functions\r
+{\r
+    class CLI\r
+    {\r
+        public Process runCli(object s, string query, bool stderr, bool stdout, bool useShellExec, bool noWindow)\r
+        {\r
+            Process hbProc = new Process();\r
+            hbProc.StartInfo.FileName = "hbcli.exe";\r
+            hbProc.StartInfo.Arguments = query;\r
+            hbProc.StartInfo.RedirectStandardOutput = stdout;\r
+            hbProc.StartInfo.RedirectStandardError = stderr;\r
+            hbProc.StartInfo.UseShellExecute = useShellExec;\r
+            hbProc.StartInfo.CreateNoWindow = noWindow;\r
+            hbProc.Start();     \r
+\r
+            // Set the process Priority\r
+            switch (Properties.Settings.Default.processPriority)\r
+            {\r
+                case "Realtime":\r
+                    hbProc.PriorityClass = ProcessPriorityClass.RealTime;\r
+                    break;\r
+                case "High":\r
+                    hbProc.PriorityClass = ProcessPriorityClass.High;\r
+                    break;\r
+                case "Above Normal":\r
+                    hbProc.PriorityClass = ProcessPriorityClass.AboveNormal;\r
+                    break;\r
+                case "Normal":\r
+                    hbProc.PriorityClass = ProcessPriorityClass.Normal;\r
+                    break;\r
+                case "Low":\r
+                    hbProc.PriorityClass = ProcessPriorityClass.Idle;\r
+                    break;\r
+                default:\r
+                    hbProc.PriorityClass = ProcessPriorityClass.BelowNormal;\r
+                    break;\r
+            }\r
+            return hbProc;\r
+        }\r
+    }\r
+}\r
diff --git a/win/C#/Functions/Update.cs b/win/C#/Functions/Update.cs
new file mode 100644 (file)
index 0000000..30a7c0d
--- /dev/null
@@ -0,0 +1,10 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.Text;\r
+\r
+namespace Handbrake.Functions\r
+{\r
+    class Update\r
+    {\r
+    }\r
+}\r