OSDN Git Service

WinGui:
authorbrianmario <brianmario@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Thu, 19 Jul 2007 03:59:18 +0000 (03:59 +0000)
committerbrianmario <brianmario@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Thu, 19 Jul 2007 03:59:18 +0000 (03:59 +0000)
minor update to encode process CLI call -- put it on it's own thread

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

win/C#/frmMain.cs

index 90062b1..e050a40 100644 (file)
@@ -608,18 +608,18 @@ namespace Handbrake
                 query = QueryEditorText.Text;\r
             }\r
 \r
-            Functions.CLI process = new Functions.CLI();\r
-            hbProc = process.runCli(this, query, false, false, false, false);\r
-          \r
-            ThreadPool.QueueUserWorkItem(procMonitor);\r
+            ThreadPool.QueueUserWorkItem(procMonitor, query);\r
         }\r
 \r
         private void procMonitor(object state)\r
         {\r
+            Functions.CLI process = new Functions.CLI();\r
+            hbProc = process.runCli(this, (string)state, false, false, false, false);\r
             MessageBox.Show("The encode process has now started.", "Status", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);\r
             hbProc.WaitForExit();\r
             hbProc.Close();\r
             hbProc.Dispose();\r
+            hbProc = null;\r
             MessageBox.Show("The encode process has now ended.", "Status", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);\r
         }\r
         \r
@@ -990,6 +990,9 @@ namespace Handbrake
                 lbl_Aspect.Text = selectedTitle.AspectRatio.ToString();\r
                 lbl_RecomendedCrop.Text = string.Format("{0}/{1}/{2}/{3}", selectedTitle.AutoCropDimensions[0], selectedTitle.AutoCropDimensions[1], selectedTitle.AutoCropDimensions[2], selectedTitle.AutoCropDimensions[3]);\r
 \r
+                text_width.Text = selectedTitle.Resolution.Width.ToString();\r
+                text_height.Text = selectedTitle.Resolution.Height.ToString();\r
+\r
                 drop_chapterStart.Items.Clear();\r
                 drop_chapterStart.Items.AddRange(selectedTitle.Chapters.ToArray());\r
                 if (drop_chapterStart.Items.Count > 0)\r