summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2007-07-18 19:50:00 +0000
committersr55 <[email protected]>2007-07-18 19:50:00 +0000
commit3aea9521c461a42e879958d88ba8ce8e6ee4d5ca (patch)
treeffda0356c0386638d2b8fc773a3d7061966611eb
parentb36c2befd3795caf8b54fabec67d071a5ccfd74f (diff)
WinGui:
- Changed the progress bar on frmReadDVD to a text value. Progress bar wasn't really needed here. - Few design tweaks to the frmReadDVD window. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@713 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--win/C#/frmMain.cs26
-rw-r--r--win/C#/frmOptions.cs4
-rw-r--r--win/C#/frmReadDVD.Designer.cs42
-rw-r--r--win/C#/frmReadDVD.cs9
4 files changed, 52 insertions, 29 deletions
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index 7f6ece4ea..90062b108 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -22,7 +22,12 @@ namespace Handbrake
// --------------------------------------------------------------
private frmDvdInfo dvdInfoWindow = new frmDvdInfo();
private frmQueue queueWindow = new frmQueue();
-
+
+ // --------------------------------------------------------------
+ // Stuff that needs doing on startup.
+ // - Load users default settings. (if required)
+ // - Do an update check (if required)
+ // --------------------------------------------------------------
public frmMain()
{
InitializeComponent();
@@ -119,7 +124,6 @@ namespace Handbrake
{
if (Properties.Settings.Default.updateStatus == "Checked")
{
-
try
{
String updateFile = Properties.Settings.Default.updateFile;
@@ -132,7 +136,6 @@ namespace Handbrake
lbl_update.Visible = true;
}
}
- // else fail displaying an error message.
catch (Exception)
{
// Silently ignore the error
@@ -140,7 +143,10 @@ namespace Handbrake
}
}
- #region The Menu Bar
+ // --------------------------------------------------------------
+ // The main Menu bar.
+ // --------------------------------------------------------------
+
#region File Menu
private void mnu_open_Click(object sender, EventArgs e)
@@ -498,7 +504,6 @@ namespace Handbrake
}
#endregion
- #endregion
// --------------------------------------------------------------
// Buttons on the main Window
@@ -617,8 +622,7 @@ namespace Handbrake
hbProc.Dispose();
MessageBox.Show("The encode process has now ended.", "Status", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
}
-
-
+
//---------------------------------------------------
// Items that require actions on frmMain
//---------------------------------------------------
@@ -1016,9 +1020,11 @@ namespace Handbrake
drp_subtitle.Text = drp_subtitle.Items[0].ToString();
}
}
- }
+ }
- // The Query Generation Function
+ //---------------------------------------------------
+ // The query Generation function.
+ //---------------------------------------------------
public string GenerateTheQuery()
{
string source = text_source.Text;
@@ -1317,8 +1323,6 @@ namespace Handbrake
return querySource+ queryDestination+ queryPictureSettings+ queryVideoSettings+ h264Settings+ queryAudioSettings+ queryAdvancedSettings+ verbose;
}
-
-
// This is the END of the road ------------------------------------------------------------------------------
}
} \ No newline at end of file
diff --git a/win/C#/frmOptions.cs b/win/C#/frmOptions.cs
index fc3d55a0a..66ae0a56d 100644
--- a/win/C#/frmOptions.cs
+++ b/win/C#/frmOptions.cs
@@ -74,8 +74,6 @@ namespace Handbrake
{
Properties.Settings.Default.Save(); // Small hack for Vista. Seems to work fine on XP without this
this.Close();
- }
-
-
+ }
}
} \ No newline at end of file
diff --git a/win/C#/frmReadDVD.Designer.cs b/win/C#/frmReadDVD.Designer.cs
index 40ab0fc33..0e361a20d 100644
--- a/win/C#/frmReadDVD.Designer.cs
+++ b/win/C#/frmReadDVD.Designer.cs
@@ -33,14 +33,15 @@ namespace Handbrake
this.btn_ok = new System.Windows.Forms.Button();
this.Label3 = new System.Windows.Forms.Label();
this.Label2 = new System.Windows.Forms.Label();
- this.scanProgress = new System.Windows.Forms.ProgressBar();
+ this.lbl_status = new System.Windows.Forms.Label();
+ this.lbl_progress = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// lbl_pressOk
//
this.lbl_pressOk.AutoSize = true;
this.lbl_pressOk.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.lbl_pressOk.Location = new System.Drawing.Point(216, 56);
+ this.lbl_pressOk.Location = new System.Drawing.Point(66, 61);
this.lbl_pressOk.Name = "lbl_pressOk";
this.lbl_pressOk.Size = new System.Drawing.Size(178, 13);
this.lbl_pressOk.TabIndex = 29;
@@ -53,7 +54,7 @@ namespace Handbrake
this.btn_ok.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn_ok.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_ok.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_ok.Location = new System.Drawing.Point(400, 52);
+ this.btn_ok.Location = new System.Drawing.Point(400, 56);
this.btn_ok.Name = "btn_ok";
this.btn_ok.Size = new System.Drawing.Size(61, 22);
this.btn_ok.TabIndex = 28;
@@ -82,27 +83,45 @@ namespace Handbrake
this.Label2.TabIndex = 26;
this.Label2.Text = "Status:";
//
- // scanProgress
+ // lbl_status
//
- this.scanProgress.Location = new System.Drawing.Point(22, 51);
- this.scanProgress.Name = "scanProgress";
- this.scanProgress.Size = new System.Drawing.Size(361, 23);
- this.scanProgress.TabIndex = 30;
- this.scanProgress.Visible = false;
+ this.lbl_status.AutoSize = true;
+ this.lbl_status.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lbl_status.Location = new System.Drawing.Point(66, 41);
+ this.lbl_status.Name = "lbl_status";
+ this.lbl_status.Size = new System.Drawing.Size(178, 13);
+ this.lbl_status.TabIndex = 31;
+ this.lbl_status.Text = "Processing.... Please Wait!";
+ this.lbl_status.Visible = false;
+ //
+ // lbl_progress
+ //
+ this.lbl_progress.AutoSize = true;
+ this.lbl_progress.Location = new System.Drawing.Point(365, 61);
+ this.lbl_progress.Name = "lbl_progress";
+ this.lbl_progress.Size = new System.Drawing.Size(29, 13);
+ this.lbl_progress.TabIndex = 32;
+ this.lbl_progress.Text = "{ % }";
+ this.lbl_progress.Visible = false;
//
// frmReadDVD
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(473, 86);
- this.Controls.Add(this.scanProgress);
+ this.Controls.Add(this.lbl_progress);
+ this.Controls.Add(this.lbl_status);
this.Controls.Add(this.lbl_pressOk);
this.Controls.Add(this.btn_ok);
this.Controls.Add(this.Label3);
this.Controls.Add(this.Label2);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+ this.MaximizeBox = false;
+ this.MaximumSize = new System.Drawing.Size(479, 111);
+ this.MinimumSize = new System.Drawing.Size(479, 111);
this.Name = "frmReadDVD";
+ this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Reading DVD...";
this.ResumeLayout(false);
@@ -116,6 +135,7 @@ namespace Handbrake
internal System.Windows.Forms.Button btn_ok;
internal System.Windows.Forms.Label Label3;
internal System.Windows.Forms.Label Label2;
- private System.Windows.Forms.ProgressBar scanProgress;
+ internal System.Windows.Forms.Label lbl_status;
+ private System.Windows.Forms.Label lbl_progress;
}
} \ No newline at end of file
diff --git a/win/C#/frmReadDVD.cs b/win/C#/frmReadDVD.cs
index c8103c348..f288201e2 100644
--- a/win/C#/frmReadDVD.cs
+++ b/win/C#/frmReadDVD.cs
@@ -34,8 +34,9 @@ namespace Handbrake
{
btn_ok.Enabled = false;
lbl_pressOk.Visible = false;
- scanProgress.Value = 0;
- scanProgress.Visible = true;
+ lbl_progress.Text = "0%";
+ lbl_progress.Visible = true;
+ lbl_status.Visible = true;
// throw cli call and parsing on it's own thread
ThreadPool.QueueUserWorkItem(startProc);
}
@@ -64,7 +65,7 @@ namespace Handbrake
hbProc = process.runCli(this, query, true, true, false, true);
Parsing.Parser readData = new Parsing.Parser(hbProc.StandardError.BaseStream);
- //hbProc.WaitForExit();
+ hbProc.WaitForExit();
hbProc.Close();
// Setup the parser
@@ -85,7 +86,7 @@ namespace Handbrake
{
progress = 100;
}
- this.scanProgress.Value = progress;
+ this.lbl_progress.Text = progress.ToString() + "%";
}
}