summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2007-07-19 12:29:35 +0000
committersr55 <[email protected]>2007-07-19 12:29:35 +0000
commitd8ae155206156c7310d2153ba06fe1aeeccb122b (patch)
tree4cc475d23725ab94bdf477200a13194dc2fa3afc
parente4adf35f39f2108514495b1e8be3f49b98edb6b9 (diff)
WinGui:
- Updated the temporary encode progress variable with fps, avg fps and time remaining. Positioned it correctly. - Added a few comments. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@718 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--win/C#/frmMain.Designer.cs38
-rw-r--r--win/C#/frmMain.cs23
2 files changed, 35 insertions, 26 deletions
diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs
index 3d6431f5f..c3aad5529 100644
--- a/win/C#/frmMain.Designer.cs
+++ b/win/C#/frmMain.Designer.cs
@@ -170,7 +170,7 @@ namespace Handbrake
this.btn_queue = new System.Windows.Forms.Button();
this.btn_encode = new System.Windows.Forms.Button();
this.Version = new System.Windows.Forms.Label();
- this.tempEncodeLbl = new System.Windows.Forms.Label();
+ this.lbl_encode = new System.Windows.Forms.Label();
Label38 = new System.Windows.Forms.Label();
this.frmMainMenu.SuspendLayout();
this.GroupBox1.SuspendLayout();
@@ -1284,7 +1284,7 @@ namespace Handbrake
this.slider_videoQuality.Location = new System.Drawing.Point(129, 90);
this.slider_videoQuality.Maximum = 100;
this.slider_videoQuality.Name = "slider_videoQuality";
- this.slider_videoQuality.Size = new System.Drawing.Size(167, 45);
+ this.slider_videoQuality.Size = new System.Drawing.Size(167, 42);
this.slider_videoQuality.TabIndex = 6;
this.slider_videoQuality.TickFrequency = 17;
this.slider_videoQuality.Scroll += new System.EventHandler(this.slider_videoQuality_Scroll);
@@ -1663,7 +1663,7 @@ namespace Handbrake
this.lbl_update.AutoSize = true;
this.lbl_update.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbl_update.ForeColor = System.Drawing.Color.Black;
- this.lbl_update.Location = new System.Drawing.Point(86, 594);
+ this.lbl_update.Location = new System.Drawing.Point(91, 614);
this.lbl_update.Name = "lbl_update";
this.lbl_update.Size = new System.Drawing.Size(193, 13);
this.lbl_update.TabIndex = 417;
@@ -1677,7 +1677,7 @@ namespace Handbrake
this.btn_queue.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn_queue.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_queue.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_queue.Location = new System.Drawing.Point(404, 589);
+ this.btn_queue.Location = new System.Drawing.Point(407, 609);
this.btn_queue.Name = "btn_queue";
this.btn_queue.Size = new System.Drawing.Size(124, 22);
this.btn_queue.TabIndex = 416;
@@ -1693,7 +1693,7 @@ namespace Handbrake
this.btn_encode.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn_encode.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_encode.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_encode.Location = new System.Drawing.Point(535, 589);
+ this.btn_encode.Location = new System.Drawing.Point(538, 609);
this.btn_encode.Name = "btn_encode";
this.btn_encode.Size = new System.Drawing.Size(124, 22);
this.btn_encode.TabIndex = 414;
@@ -1706,29 +1706,29 @@ namespace Handbrake
//
this.Version.BackColor = System.Drawing.Color.Transparent;
this.Version.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.Version.Location = new System.Drawing.Point(13, 594);
+ this.Version.Location = new System.Drawing.Point(16, 614);
this.Version.Name = "Version";
- this.Version.Size = new System.Drawing.Size(141, 20);
+ this.Version.Size = new System.Drawing.Size(79, 20);
this.Version.TabIndex = 415;
this.Version.Text = "Version 2.3";
//
- // tempEncodeLbl
+ // lbl_encode
//
- this.tempEncodeLbl.AutoSize = true;
- this.tempEncodeLbl.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.tempEncodeLbl.Location = new System.Drawing.Point(370, 19);
- this.tempEncodeLbl.Name = "tempEncodeLbl";
- this.tempEncodeLbl.Size = new System.Drawing.Size(115, 13);
- this.tempEncodeLbl.TabIndex = 418;
- this.tempEncodeLbl.Text = "Encoding started...";
- this.tempEncodeLbl.Visible = false;
+ this.lbl_encode.AutoSize = true;
+ this.lbl_encode.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lbl_encode.Location = new System.Drawing.Point(16, 589);
+ this.lbl_encode.Name = "lbl_encode";
+ this.lbl_encode.Size = new System.Drawing.Size(96, 13);
+ this.lbl_encode.TabIndex = 418;
+ this.lbl_encode.Text = "Encoding started...";
+ this.lbl_encode.Visible = false;
//
// frmMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(675, 621);
- this.Controls.Add(this.tempEncodeLbl);
+ this.ClientSize = new System.Drawing.Size(675, 636);
+ this.Controls.Add(this.lbl_encode);
this.Controls.Add(this.lbl_update);
this.Controls.Add(this.btn_queue);
this.Controls.Add(this.btn_encode);
@@ -1906,7 +1906,7 @@ namespace Handbrake
internal System.Windows.Forms.Label Version;
private System.Windows.Forms.Label lbl_chptWarn;
internal System.Windows.Forms.SaveFileDialog DVD_Save;
- private System.Windows.Forms.Label tempEncodeLbl;
+ private System.Windows.Forms.Label lbl_encode;
}
} \ No newline at end of file
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index b2dba365a..0983635de 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -598,7 +598,7 @@ namespace Handbrake
private void btn_encode_Click(object sender, EventArgs e)
{
String query = "";
- tempEncodeLbl.Visible = true;
+ lbl_encode.Visible = true;
if (QueryEditorText.Text == "")
{
@@ -620,7 +620,7 @@ namespace Handbrake
new object[] { Sender, CurrentTask, TaskCount, PercentComplete, CurrentFps, AverageFps, TimeRemaining });
return;
}
- tempEncodeLbl.Text = string.Format("Encode Progress: {0}%", PercentComplete);
+ lbl_encode.Text = string.Format("Encode Progress: {0}%, FPS: {1}, Avg FPS: {2}, Time Remaining: {3} ", PercentComplete, CurrentFps, AverageFps, TimeRemaining);
}
private void procMonitor(object state)
@@ -628,6 +628,8 @@ namespace Handbrake
Functions.CLI process = new Functions.CLI();
hbProc = process.runCli(this, (string)state, true, true, false, true);
+ MessageBox.Show("The encode process has now started.", "Status", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
+
Parsing.Parser encode = new Parsing.Parser(hbProc.StandardError.BaseStream);
//TODO: prevent this event from being subscribed more than once
encode.OnEncodeProgress += encode_OnEncodeProgress;
@@ -636,7 +638,7 @@ namespace Handbrake
encode.ReadLine();
}
- MessageBox.Show("The ncode process has now started.", "Status", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
+
hbProc.WaitForExit();
hbProc.Close();
hbProc.Dispose();
@@ -736,6 +738,7 @@ namespace Handbrake
if (CheckPixelRatio.Checked)
{
text_width.Text = "";
+ text_width.BackColor = Color.White;
}
else
{
@@ -781,6 +784,7 @@ namespace Handbrake
if (CheckPixelRatio.Checked)
{
text_height.Text = "";
+ text_width.BackColor = Color.White;
}
else
{
@@ -1008,12 +1012,14 @@ namespace Handbrake
if (drp_dvdtitle.Text != "Automatic")
{
Parsing.Title selectedTitle = drp_dvdtitle.SelectedItem as Parsing.Title;
- lbl_Aspect.Text = selectedTitle.AspectRatio.ToString();
- lbl_RecomendedCrop.Text = string.Format("{0}/{1}/{2}/{3}", selectedTitle.AutoCropDimensions[0], selectedTitle.AutoCropDimensions[1], selectedTitle.AutoCropDimensions[2], selectedTitle.AutoCropDimensions[3]);
- text_width.Text = selectedTitle.Resolution.Width.ToString();
- text_height.Text = selectedTitle.Resolution.Height.ToString();
+ // Set the Aspect Ratio
+ lbl_Aspect.Text = selectedTitle.AspectRatio.ToString();
+ // Set the Recommended Cropping values
+ lbl_RecomendedCrop.Text = string.Format("{0}/{1}/{2}/{3}", selectedTitle.AutoCropDimensions[0], selectedTitle.AutoCropDimensions[1], selectedTitle.AutoCropDimensions[2], selectedTitle.AutoCropDimensions[3]);
+
+ // Populate the Start chapter Dropdown
drop_chapterStart.Items.Clear();
drop_chapterStart.Items.AddRange(selectedTitle.Chapters.ToArray());
if (drop_chapterStart.Items.Count > 0)
@@ -1021,6 +1027,7 @@ namespace Handbrake
drop_chapterStart.Text = drop_chapterStart.Items[0].ToString();
}
+ // Populate the Final Chapter Dropdown
drop_chapterFinish.Items.Clear();
drop_chapterFinish.Items.AddRange(selectedTitle.Chapters.ToArray());
if (drop_chapterFinish.Items.Count > 0)
@@ -1028,6 +1035,7 @@ namespace Handbrake
drop_chapterFinish.Text = drop_chapterFinish.Items[drop_chapterFinish.Items.Count - 1].ToString();
}
+ // Populate the Audio Channels Dropdown
drp_audioChannels.Items.Clear();
drp_audioChannels.Items.Add("Automatic");
drp_audioChannels.Items.AddRange(selectedTitle.AudioTracks.ToArray());
@@ -1036,6 +1044,7 @@ namespace Handbrake
drp_audioChannels.Text = drp_audioChannels.Items[0].ToString();
}
+ // Populate the Subtitles dropdown
drp_subtitle.Items.Clear();
drp_subtitle.Items.Add("None");
drp_subtitle.Items.AddRange(selectedTitle.Subtitles.ToArray());