summaryrefslogtreecommitdiffstats
path: root/win/C#/frmMain.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2007-07-16 16:52:58 +0000
committersr55 <[email protected]>2007-07-16 16:52:58 +0000
commit2595cd0693e666366e824fdbbfe45adade38a08e (patch)
tree44c61ec26d8a22cfc7ecfd1cf9724c22518ba696 /win/C#/frmMain.cs
parent5e8776b2f2e87120efaae2ed509bce845c5de94c (diff)
WinGui:
- CLI process handling code moved into its own class. Reduces code replication. Returns hbProc git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@696 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmMain.cs')
-rw-r--r--win/C#/frmMain.cs37
1 files changed, 5 insertions, 32 deletions
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index 5361a3489..234af0aa4 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -603,38 +603,10 @@ namespace Handbrake
query = QueryEditorText.Text;
}
- hbProc = new System.Diagnostics.Process();
- hbProc.StartInfo.FileName = "hbcli.exe";
- 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;
- }
+ Functions.CLI process = new Functions.CLI();
+ Process hbProc = process.runCli(this, query, false, false, false, false);
ThreadPool.QueueUserWorkItem(procMonitor);
- // TODO: Need to write a bit of code here to do process monitoring.
}
private void procMonitor(object state)
@@ -744,9 +716,10 @@ namespace Handbrake
text_width.BackColor = Color.LightGreen;
}
}
-
+
// There is a bug here *******************************************************************
- if (!lbl_Aspect.Text.Equals("Select a Title")){
+ if (lbl_Aspect.Text != "Select a Title")
+ {
int height = int.Parse(text_width.Text) / int.Parse(lbl_Aspect.Text);
MessageBox.Show("test");
int mod16 = height % 16;