OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Thu, 19 Jul 2007 12:29:35 +0000 (12:29 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Thu, 19 Jul 2007 12:29:35 +0000 (12:29 +0000)
- Updated the temporary encode progress variable with fps, avg fps and time remaining. Positioned it correctly.
- Added a few comments.

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

win/C#/frmMain.Designer.cs
win/C#/frmMain.cs

index 3d6431f..c3aad55 100644 (file)
@@ -170,7 +170,7 @@ namespace Handbrake
             this.btn_queue = new System.Windows.Forms.Button();\r
             this.btn_encode = new System.Windows.Forms.Button();\r
             this.Version = new System.Windows.Forms.Label();\r
-            this.tempEncodeLbl = new System.Windows.Forms.Label();\r
+            this.lbl_encode = new System.Windows.Forms.Label();\r
             Label38 = new System.Windows.Forms.Label();\r
             this.frmMainMenu.SuspendLayout();\r
             this.GroupBox1.SuspendLayout();\r
@@ -1284,7 +1284,7 @@ namespace Handbrake
             this.slider_videoQuality.Location = new System.Drawing.Point(129, 90);\r
             this.slider_videoQuality.Maximum = 100;\r
             this.slider_videoQuality.Name = "slider_videoQuality";\r
-            this.slider_videoQuality.Size = new System.Drawing.Size(167, 45);\r
+            this.slider_videoQuality.Size = new System.Drawing.Size(167, 42);\r
             this.slider_videoQuality.TabIndex = 6;\r
             this.slider_videoQuality.TickFrequency = 17;\r
             this.slider_videoQuality.Scroll += new System.EventHandler(this.slider_videoQuality_Scroll);\r
@@ -1663,7 +1663,7 @@ namespace Handbrake
             this.lbl_update.AutoSize = true;\r
             this.lbl_update.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
             this.lbl_update.ForeColor = System.Drawing.Color.Black;\r
-            this.lbl_update.Location = new System.Drawing.Point(86, 594);\r
+            this.lbl_update.Location = new System.Drawing.Point(91, 614);\r
             this.lbl_update.Name = "lbl_update";\r
             this.lbl_update.Size = new System.Drawing.Size(193, 13);\r
             this.lbl_update.TabIndex = 417;\r
@@ -1677,7 +1677,7 @@ namespace Handbrake
             this.btn_queue.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
             this.btn_queue.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
             this.btn_queue.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
-            this.btn_queue.Location = new System.Drawing.Point(404, 589);\r
+            this.btn_queue.Location = new System.Drawing.Point(407, 609);\r
             this.btn_queue.Name = "btn_queue";\r
             this.btn_queue.Size = new System.Drawing.Size(124, 22);\r
             this.btn_queue.TabIndex = 416;\r
@@ -1693,7 +1693,7 @@ namespace Handbrake
             this.btn_encode.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
             this.btn_encode.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
             this.btn_encode.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
-            this.btn_encode.Location = new System.Drawing.Point(535, 589);\r
+            this.btn_encode.Location = new System.Drawing.Point(538, 609);\r
             this.btn_encode.Name = "btn_encode";\r
             this.btn_encode.Size = new System.Drawing.Size(124, 22);\r
             this.btn_encode.TabIndex = 414;\r
@@ -1706,29 +1706,29 @@ namespace Handbrake
             // \r
             this.Version.BackColor = System.Drawing.Color.Transparent;\r
             this.Version.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.Version.Location = new System.Drawing.Point(13, 594);\r
+            this.Version.Location = new System.Drawing.Point(16, 614);\r
             this.Version.Name = "Version";\r
-            this.Version.Size = new System.Drawing.Size(141, 20);\r
+            this.Version.Size = new System.Drawing.Size(79, 20);\r
             this.Version.TabIndex = 415;\r
             this.Version.Text = "Version 2.3";\r
             // \r
-            // tempEncodeLbl\r
+            // lbl_encode\r
             // \r
-            this.tempEncodeLbl.AutoSize = true;\r
-            this.tempEncodeLbl.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.tempEncodeLbl.Location = new System.Drawing.Point(370, 19);\r
-            this.tempEncodeLbl.Name = "tempEncodeLbl";\r
-            this.tempEncodeLbl.Size = new System.Drawing.Size(115, 13);\r
-            this.tempEncodeLbl.TabIndex = 418;\r
-            this.tempEncodeLbl.Text = "Encoding started...";\r
-            this.tempEncodeLbl.Visible = false;\r
+            this.lbl_encode.AutoSize = true;\r
+            this.lbl_encode.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.lbl_encode.Location = new System.Drawing.Point(16, 589);\r
+            this.lbl_encode.Name = "lbl_encode";\r
+            this.lbl_encode.Size = new System.Drawing.Size(96, 13);\r
+            this.lbl_encode.TabIndex = 418;\r
+            this.lbl_encode.Text = "Encoding started...";\r
+            this.lbl_encode.Visible = false;\r
             // \r
             // frmMain\r
             // \r
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\r
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
-            this.ClientSize = new System.Drawing.Size(675, 621);\r
-            this.Controls.Add(this.tempEncodeLbl);\r
+            this.ClientSize = new System.Drawing.Size(675, 636);\r
+            this.Controls.Add(this.lbl_encode);\r
             this.Controls.Add(this.lbl_update);\r
             this.Controls.Add(this.btn_queue);\r
             this.Controls.Add(this.btn_encode);\r
@@ -1906,7 +1906,7 @@ namespace Handbrake
         internal System.Windows.Forms.Label Version;\r
         private System.Windows.Forms.Label lbl_chptWarn;\r
         internal System.Windows.Forms.SaveFileDialog DVD_Save;\r
-        private System.Windows.Forms.Label tempEncodeLbl;\r
+        private System.Windows.Forms.Label lbl_encode;\r
 \r
     }\r
 }
\ No newline at end of file
index b2dba36..0983635 100644 (file)
@@ -598,7 +598,7 @@ namespace Handbrake
         private void btn_encode_Click(object sender, EventArgs e)\r
         {\r
             String query = "";\r
-            tempEncodeLbl.Visible = true;\r
+            lbl_encode.Visible = true;\r
  \r
             if (QueryEditorText.Text == "")\r
             {\r
@@ -620,7 +620,7 @@ namespace Handbrake
                     new object[] { Sender, CurrentTask, TaskCount, PercentComplete, CurrentFps, AverageFps, TimeRemaining });\r
                 return;\r
             }\r
-            tempEncodeLbl.Text = string.Format("Encode Progress: {0}%", PercentComplete);\r
+            lbl_encode.Text = string.Format("Encode Progress: {0}%,       FPS: {1},       Avg FPS: {2},       Time Remaining: {3} ", PercentComplete, CurrentFps, AverageFps, TimeRemaining);\r
         }\r
 \r
         private void procMonitor(object state)\r
@@ -628,6 +628,8 @@ namespace Handbrake
             Functions.CLI process = new Functions.CLI();\r
             hbProc = process.runCli(this, (string)state, true, true, false, true);\r
 \r
+            MessageBox.Show("The encode process has now started.", "Status", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);\r
+\r
             Parsing.Parser encode = new Parsing.Parser(hbProc.StandardError.BaseStream);\r
             //TODO: prevent this event from being subscribed more than once\r
             encode.OnEncodeProgress += encode_OnEncodeProgress;\r
@@ -636,7 +638,7 @@ namespace Handbrake
                 encode.ReadLine();\r
             }\r
 \r
-            MessageBox.Show("The ncode process has now started.", "Status", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);\r
+            \r
             hbProc.WaitForExit();\r
             hbProc.Close();\r
             hbProc.Dispose();\r
@@ -736,6 +738,7 @@ namespace Handbrake
                 if (CheckPixelRatio.Checked)\r
                 {\r
                     text_width.Text = "";\r
+                    text_width.BackColor = Color.White;\r
                 }\r
                 else\r
                 {\r
@@ -781,6 +784,7 @@ namespace Handbrake
                 if (CheckPixelRatio.Checked)\r
                 {\r
                     text_height.Text = "";\r
+                    text_width.BackColor = Color.White;\r
                 }\r
                 else\r
                 {\r
@@ -1008,12 +1012,14 @@ namespace Handbrake
             if (drp_dvdtitle.Text != "Automatic")\r
             {\r
                 Parsing.Title selectedTitle = drp_dvdtitle.SelectedItem as Parsing.Title;\r
-                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
+                // Set the Aspect Ratio\r
+                lbl_Aspect.Text = selectedTitle.AspectRatio.ToString();\r
 \r
+                // Set the Recommended Cropping values\r
+                lbl_RecomendedCrop.Text = string.Format("{0}/{1}/{2}/{3}", selectedTitle.AutoCropDimensions[0], selectedTitle.AutoCropDimensions[1], selectedTitle.AutoCropDimensions[2], selectedTitle.AutoCropDimensions[3]);\r
+                \r
+                // Populate the Start chapter Dropdown\r
                 drop_chapterStart.Items.Clear();\r
                 drop_chapterStart.Items.AddRange(selectedTitle.Chapters.ToArray());\r
                 if (drop_chapterStart.Items.Count > 0)\r
@@ -1021,6 +1027,7 @@ namespace Handbrake
                     drop_chapterStart.Text = drop_chapterStart.Items[0].ToString();\r
                 }\r
 \r
+                // Populate the Final Chapter Dropdown\r
                 drop_chapterFinish.Items.Clear();\r
                 drop_chapterFinish.Items.AddRange(selectedTitle.Chapters.ToArray());\r
                 if (drop_chapterFinish.Items.Count > 0)\r
@@ -1028,6 +1035,7 @@ namespace Handbrake
                     drop_chapterFinish.Text = drop_chapterFinish.Items[drop_chapterFinish.Items.Count - 1].ToString();\r
                 }\r
 \r
+                // Populate the Audio Channels Dropdown\r
                 drp_audioChannels.Items.Clear();\r
                 drp_audioChannels.Items.Add("Automatic");\r
                 drp_audioChannels.Items.AddRange(selectedTitle.AudioTracks.ToArray());\r
@@ -1036,6 +1044,7 @@ namespace Handbrake
                     drp_audioChannels.Text = drp_audioChannels.Items[0].ToString();\r
                 }\r
 \r
+                // Populate the Subtitles dropdown\r
                 drp_subtitle.Items.Clear();\r
                 drp_subtitle.Items.Add("None");\r
                 drp_subtitle.Items.AddRange(selectedTitle.Subtitles.ToArray());\r