summaryrefslogtreecommitdiffstats
path: root/win/C#/frmQueue.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2007-07-14 15:57:19 +0000
committersr55 <[email protected]>2007-07-14 15:57:19 +0000
commitc4990502668af79ecb5ac2c2b859526027299eef (patch)
treef443651d5b0aa469fc842fd388405a22d0aa5f78 /win/C#/frmQueue.cs
parenta42691848dda319293e43b5d0e97514705a78870 (diff)
Win Gui:
- Fixed bug with chapter drop downs throwing errors when they shouldn't. - Chapter down down menus are now populated on title selection. (Audio and Subtitles still need to be done) - Process priority option now works. All encodes both single and queue will use the defined priority. - A few other small things. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@682 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmQueue.cs')
-rw-r--r--win/C#/frmQueue.cs26
1 files changed, 25 insertions, 1 deletions
diff --git a/win/C#/frmQueue.cs b/win/C#/frmQueue.cs
index 143533196..f555ffeaf 100644
--- a/win/C#/frmQueue.cs
+++ b/win/C#/frmQueue.cs
@@ -86,6 +86,30 @@ namespace Handbrake
hbProc.StartInfo.Arguments = query;
hbProc.StartInfo.UseShellExecute = false;
hbProc.Start();
+ // Set the process Priority
+ string priority = Properties.Settings.Default.processPriority;
+ switch (priority)
+ {
+ 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;
+ }
+
hbProc.WaitForExit();
hbProc.Close();
counter++;
@@ -95,7 +119,7 @@ namespace Handbrake
private void updateUIElements(int progressSplit)
{
- // This needs to be written so there is no cross-thread problems
+ // This needs to be written so there is no cross-thread problems ********************
thisWindow.list_queue.Items.Remove(0);
progressBar.Value = progressBar.Value + progressSplit;
progressBar.Update();