{\r
public partial class frmMain : Form\r
{\r
- private System.Diagnostics.Process hbProc;\r
+ private Process hbProc;\r
private Parsing.DVD thisDVD;\r
\r
// --------------------------------------------------------------\r
}\r
\r
Functions.CLI process = new Functions.CLI();\r
- Process hbProc = process.runCli(this, query, false, false, false, false);\r
-\r
+ hbProc = process.runCli(this, query, false, false, false, false);\r
+ \r
ThreadPool.QueueUserWorkItem(procMonitor);\r
}\r
\r
private void procMonitor(object state)\r
{\r
- //******* BUG HERE, hbProc is not getting passed in here.\r
MessageBox.Show("The encode process has now started.", "Status", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);\r
hbProc.WaitForExit();\r
hbProc.Close();\r
\r
private void text_width_TextChanged(object sender, EventArgs e)\r
{\r
+\r
try\r
{\r
- if (CheckPixelRatio.Checked) {\r
+ if (CheckPixelRatio.Checked)\r
+ {\r
text_width.Text = "";\r
- } else {\r
- if ((int.Parse(text_width.Text) % 16) != 0){\r
+ }\r
+ else\r
+ {\r
+ if ((int.Parse(text_width.Text) % 16) != 0)\r
+ {\r
text_width.BackColor = Color.LightCoral;\r
- }else {\r
+ }\r
+ else\r
+ {\r
text_width.BackColor = Color.LightGreen;\r
}\r
}\r
- \r
- // There is a bug here *******************************************************************\r
+\r
if (lbl_Aspect.Text != "Select a Title")\r
{\r
- int height = int.Parse(text_width.Text) / int.Parse(lbl_Aspect.Text);\r
- MessageBox.Show("test");\r
- int mod16 = height % 16;\r
+ double height = int.Parse(text_width.Text) / double.Parse(lbl_Aspect.Text);\r
+ double mod16 = height % 16;\r
height = height - mod16;\r
- text_height.Text = height.ToString();\r
+\r
+ if (text_width.Text == "")\r
+ {\r
+ text_height.Text = "";\r
+ text_width.BackColor = Color.White;\r
+ }\r
+ else\r
+ {\r
+ text_height.Text = height.ToString();\r
+ }\r
}\r
- \r
- } catch(Exception){\r
- // No need to alert the user if there is a problem here.\r
}\r
+ catch (Exception)\r
+ {\r
+ // No need to throw an error here.\r
+ }\r
+ \r
+ \r
}\r
\r
private void text_height_TextChanged(object sender, EventArgs e)\r