OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Fri, 6 Jul 2007 16:11:06 +0000 (16:11 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Fri, 6 Jul 2007 16:11:06 +0000 (16:11 +0000)
- Another small change to hbcli execution that was missed.

git-svn-id: svn://localhost/HandBrake/trunk@655 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/Handbrake/frmQueue.vb

index a49b015..5c580d0 100644 (file)
@@ -88,7 +88,27 @@ Public Class frmQueue
         Else\r
             'Start the encode process\r
             Try\r
-                Shell("""" + ApplicationPath + "\hbcli.exe""" + list_queue.Items.Item(encodeItems))\r
+                Dim params As String = list_queue.Items.Item(encodeItems)\r
+                Dim proc As New System.Diagnostics.Process\r
+                proc = System.Diagnostics.Process.Start("""" + ApplicationPath + "\hbcli.exe""", params)\r
+\r
+                If My.Settings.Priority <> "Normal" Then\r
+                    Dim level As String\r
+                    level = My.Settings.Priority\r
+\r
+                    Select Case level\r
+                        Case "Realtime"\r
+                            proc.PriorityClass = ProcessPriorityClass.RealTime\r
+                        Case "High"\r
+                            proc.PriorityClass = ProcessPriorityClass.High\r
+                        Case "Above Normal"\r
+                            proc.PriorityClass = ProcessPriorityClass.AboveNormal\r
+                        Case "Below Normal"\r
+                            proc.PriorityClass = ProcessPriorityClass.BelowNormal\r
+                        Case "Low"\r
+                            proc.PriorityClass = ProcessPriorityClass.Idle\r
+                    End Select\r
+                End If\r
             Catch ex As Exception\r
                 MessageBox.Show("Unable to launch the encoder. Queue run failed.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand)\r
                 MessageBox.Show(ex.ToString)\r