From e1def5ed25d0de1c1dbf8ecfa430ae8120a36205 Mon Sep 17 00:00:00 2001 From: sr55 Date: Thu, 17 Apr 2008 21:17:23 +0000 Subject: WinGui: - Number of code corrections + Code cleanup git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1427 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/C#/Properties/Settings.Designer.cs | 4 ++-- win/C#/Properties/Settings.settings | 4 ++-- win/C#/app.config | 4 ++-- win/C#/frmMain.Designer.cs | 10 ++++++---- win/C#/frmMain.cs | 28 ++++++++++++---------------- win/C#/frmMain.resx | 6 ++++++ 6 files changed, 30 insertions(+), 26 deletions(-) (limited to 'win/C#') diff --git a/win/C#/Properties/Settings.Designer.cs b/win/C#/Properties/Settings.Designer.cs index 623992303..530f45aa0 100644 --- a/win/C#/Properties/Settings.Designer.cs +++ b/win/C#/Properties/Settings.Designer.cs @@ -73,7 +73,7 @@ namespace Handbrake.Properties { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("0.9.2")] + [global::System.Configuration.DefaultSettingValueAttribute("0.9.3")] public string hb_version { get { return ((string)(this["hb_version"])); @@ -121,7 +121,7 @@ namespace Handbrake.Properties { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("2008021901")] + [global::System.Configuration.DefaultSettingValueAttribute("2008041701")] public int hb_build { get { return ((int)(this["hb_build"])); diff --git a/win/C#/Properties/Settings.settings b/win/C#/Properties/Settings.settings index 946b661fc..c6aa3a371 100644 --- a/win/C#/Properties/Settings.settings +++ b/win/C#/Properties/Settings.settings @@ -15,7 +15,7 @@ Checked - 0.9.2 + 0.9.3 Checked @@ -27,7 +27,7 @@ Checked - 2008021901 + 2008041701 0 diff --git a/win/C#/app.config b/win/C#/app.config index dd553eea8..32e36ee37 100644 --- a/win/C#/app.config +++ b/win/C#/app.config @@ -20,7 +20,7 @@ Checked - 0.9.2 + 0.9.3 Checked @@ -32,7 +32,7 @@ Checked - 2008021901 + 2008041701 0 diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs index 5603b437e..ad7f0cea8 100644 --- a/win/C#/frmMain.Designer.cs +++ b/win/C#/frmMain.Designer.cs @@ -37,7 +37,7 @@ namespace Handbrake this.components = new System.ComponentModel.Container(); System.Windows.Forms.Label Label38; System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); this.DVD_Save = new System.Windows.Forms.SaveFileDialog(); this.File_Save = new System.Windows.Forms.SaveFileDialog(); this.ToolTip = new System.Windows.Forms.ToolTip(this.components); @@ -621,9 +621,9 @@ namespace Handbrake // // number // - dataGridViewCellStyle1.Format = "N0"; - dataGridViewCellStyle1.NullValue = null; - this.number.DefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle2.Format = "N0"; + dataGridViewCellStyle2.NullValue = null; + this.number.DefaultCellStyle = dataGridViewCellStyle2; this.number.HeaderText = "Chapter Number"; this.number.MaxInputLength = 3; this.number.Name = "number"; @@ -2078,6 +2078,7 @@ namespace Handbrake this.lbl_RecomendedCrop.Size = new System.Drawing.Size(72, 12); this.lbl_RecomendedCrop.TabIndex = 4; this.lbl_RecomendedCrop.Text = "Select a Title"; + this.ToolTip.SetToolTip(this.lbl_RecomendedCrop, "Top / Bottom / Left / Right"); // // Label8 // @@ -2088,6 +2089,7 @@ namespace Handbrake this.Label8.Size = new System.Drawing.Size(70, 13); this.Label8.TabIndex = 2; this.Label8.Text = "Auto Crop:"; + this.ToolTip.SetToolTip(this.Label8, "Top / Bottom / Left / Right"); // // Label1 // diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index 541af041b..978d9b094 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -69,7 +69,7 @@ namespace Handbrake } //H264 Panel Loading - lblStatus.Text = "Loading H264 Panel"; + lblStatus.Text = "Loading H264 Panel ..."; Application.DoEvents(); setupH264Panel(); Thread.Sleep(100); @@ -135,9 +135,10 @@ namespace Handbrake updateWindow.Show(); } } - catch (Exception exc) + catch (Exception) { - MessageBox.Show(exc.ToString()); + // Don't want to have an exception messagebox displayed behind the splash screen, + // So, exception is ignored. Lets hope there are no bugs here :) } } private void splashTimer(object sender) @@ -283,9 +284,9 @@ namespace Handbrake Functions.QueryParser presetQuery = Functions.QueryParser.Parse(userDefaults); hb_common_func.presetLoader(this, presetQuery, "User Defaults "); } - catch (Exception exc) + catch (Exception) { - MessageBox.Show("Unable to load user Default Settings. \n\n" + exc.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand); + // Do Nothing. We don't want an error appearing behind the splash screen. } } @@ -351,7 +352,6 @@ namespace Handbrake Options.ShowDialog(); } - #endregion #region Presets Menu @@ -364,7 +364,7 @@ namespace Handbrake if (treeView_presets.Nodes.Count == 0) MessageBox.Show("Unable to load the presets.dat file. Please select \"Update Built-in Presets\" from the Presets Menu \nMake sure you are running the program in Admin mode if running on Vista. See Windows FAQ for details!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); else - MessageBox.Show("Presets have been updated", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Information); + MessageBox.Show("Presets have been updated!", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Information); } private void mnu_SelectDefault_Click(object sender, EventArgs e) { @@ -499,7 +499,7 @@ namespace Handbrake } private void drp_dvdtitle_Click(object sender, EventArgs e) { - if (drp_dvdtitle.Items.Count == 0) + if (drp_dvdtitle.Items.Count == 1) MessageBox.Show("There are no titles to select. Please scan the DVD by clicking the 'browse' button above before trying to select a title.", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } private void drp_dvdtitle_SelectedIndexChanged(object sender, EventArgs e) @@ -539,22 +539,22 @@ namespace Handbrake drp_track1Audio.Items.Add("Automatic"); drp_track1Audio.Items.Add("None"); drp_track1Audio.Items.AddRange(selectedTitle.AudioTracks.ToArray()); - drp_track1Audio.SelectedItem = 0; + drp_track1Audio.SelectedIndex = 0; drp_track2Audio.Items.Clear(); drp_track2Audio.Items.Add("None"); drp_track2Audio.Items.AddRange(selectedTitle.AudioTracks.ToArray()); - drp_track1Audio.SelectedItem = 0; + drp_track2Audio.SelectedIndex = 0; drp_track3Audio.Items.Clear(); drp_track3Audio.Items.Add("None"); drp_track3Audio.Items.AddRange(selectedTitle.AudioTracks.ToArray()); - drp_track1Audio.SelectedItem = 0; + drp_track3Audio.SelectedIndex = 0; drp_track4Audio.Items.Clear(); drp_track4Audio.Items.Add("None"); drp_track4Audio.Items.AddRange(selectedTitle.AudioTracks.ToArray()); - drp_track1Audio.SelectedItem = 0; + drp_track4Audio.SelectedIndex = 0; // Populate the Subtitles dropdown drp_subtitle.Items.Clear(); @@ -730,7 +730,6 @@ namespace Handbrake { try { - if ((int.Parse(text_width.Text) % 16) != 0) text_width.BackColor = Color.LightCoral; else @@ -820,7 +819,6 @@ namespace Handbrake text_right.Text = "0"; text_top.Text = "0"; text_bottom.Text = "0"; - } } private void check_vfr_CheckedChanged(object sender, EventArgs e) @@ -2188,8 +2186,6 @@ namespace Handbrake #endregion - - // This is the END of the road ------------------------------------------------------------------------------ } } \ No newline at end of file diff --git a/win/C#/frmMain.resx b/win/C#/frmMain.resx index e91100bb4..e9b8e49f4 100644 --- a/win/C#/frmMain.resx +++ b/win/C#/frmMain.resx @@ -149,6 +149,12 @@ Make sure you have selected a "Title" from the "Source" box above otherwise the list will not be populated with the correct amount of chapters. Note: Do not change any of the chapter numbers! + + True + + + True + 223, 15 -- cgit v1.2.3