diff options
author | sr55 <[email protected]> | 2008-04-24 15:25:02 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2008-04-24 15:25:02 +0000 |
commit | c9fd9179ac5c296609da5dc414819202ef992b98 (patch) | |
tree | 35a2360cafe2631e92740e5e82c74e7271b263f7 | |
parent | ee6bd3bd354cd235d49f91a0616f197d61743dd5 (diff) |
WinGui:
- Move some code that sets the available audio bit-rates into functions instead of just repeating the code.
- Fixed some issues with the Audio panel. All tracks are now visible by default, however they will remain disabled if a previous track is not selected.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1433 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | win/C#/Functions/Common.cs | 36 | ||||
-rw-r--r-- | win/C#/frmMain.Designer.cs | 78 | ||||
-rw-r--r-- | win/C#/frmMain.cs | 363 |
3 files changed, 108 insertions, 369 deletions
diff --git a/win/C#/Functions/Common.cs b/win/C#/Functions/Common.cs index b1408bb02..4cd18b5d0 100644 --- a/win/C#/Functions/Common.cs +++ b/win/C#/Functions/Common.cs @@ -334,15 +334,6 @@ namespace Handbrake.Functions mainWindow.drp_audbit_3.Enabled = false;
mainWindow.trackBar3.Enabled = false;
- mainWindow.drp_track3Audio.Visible = false;
- mainWindow.drp_audsr_3.Visible = false;
- mainWindow.drp_audmix_3.Visible = false;
- mainWindow.drp_audenc_3.Visible = false;
- mainWindow.drp_audbit_3.Visible = false;
- mainWindow.trackBar3.Visible = false;
- mainWindow.lbl_drc3.Visible = false;
- mainWindow.lbl_t3.Visible = false;
-
mainWindow.drp_track3Audio.Text = "None";
mainWindow.drp_audsr_3.Text = "";
mainWindow.drp_audmix_3.Text = "Automatic";
@@ -359,15 +350,6 @@ namespace Handbrake.Functions mainWindow.drp_audenc_3.Enabled = true;
mainWindow.drp_audbit_3.Enabled = true;
mainWindow.trackBar3.Enabled = true;
-
- mainWindow.drp_track3Audio.Visible = true;
- mainWindow.drp_audsr_3.Visible = true;
- mainWindow.drp_audmix_3.Visible = true;
- mainWindow.drp_audenc_3.Visible = true;
- mainWindow.drp_audbit_3.Visible = true;
- mainWindow.trackBar3.Visible = true;
- mainWindow.lbl_drc3.Visible = true;
- mainWindow.lbl_t3.Visible = true;
}
// Handle Track 4
@@ -380,15 +362,6 @@ namespace Handbrake.Functions mainWindow.drp_audbit_4.Enabled = false;
mainWindow.trackBar4.Enabled = false;
- mainWindow.drp_track4Audio.Visible = false;
- mainWindow.drp_audsr_4.Visible = false;
- mainWindow.drp_audmix_4.Visible = false;
- mainWindow.drp_audenc_4.Visible = false;
- mainWindow.drp_audbit_4.Visible = false;
- mainWindow.trackBar4.Visible = false;
- mainWindow.lbl_drc4.Visible = false;
- mainWindow.lbl_t4.Visible = false;
-
mainWindow.drp_track4Audio.Text = "None";
mainWindow.drp_audsr_4.Text = "";
mainWindow.drp_audmix_4.Text = "Automatic";
@@ -404,15 +377,6 @@ namespace Handbrake.Functions mainWindow.drp_audenc_4.Enabled = true;
mainWindow.drp_audbit_4.Enabled = true;
mainWindow.trackBar4.Enabled = true;
-
- mainWindow.drp_track4Audio.Visible = true;
- mainWindow.drp_audsr_4.Visible = true;
- mainWindow.drp_audmix_4.Visible = true;
- mainWindow.drp_audenc_4.Visible = true;
- mainWindow.drp_audbit_4.Visible = true;
- mainWindow.trackBar4.Visible = true;
- mainWindow.lbl_drc4.Visible = true;
- mainWindow.lbl_t4.Visible = true;
}
// Now lets start setting stuff
diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs index ad7f0cea8..e2e6df1fa 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 dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = 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);
@@ -81,6 +81,8 @@ namespace Handbrake this.drp_audbit_4 = new System.Windows.Forms.ComboBox();
this.drp_audenc_4 = new System.Windows.Forms.ComboBox();
this.drp_audmix_4 = new System.Windows.Forms.ComboBox();
+ this.lbl_RecomendedCrop = new System.Windows.Forms.Label();
+ this.Label8 = new System.Windows.Forms.Label();
this.DVD_Open = new System.Windows.Forms.FolderBrowserDialog();
this.File_Open = new System.Windows.Forms.OpenFileDialog();
this.ISO_Open = new System.Windows.Forms.OpenFileDialog();
@@ -179,8 +181,6 @@ namespace Handbrake this.check_detelecine = new System.Windows.Forms.CheckBox();
this.label4 = new System.Windows.Forms.Label();
this.drp_deInterlace_option = new System.Windows.Forms.ComboBox();
- this.lbl_RecomendedCrop = new System.Windows.Forms.Label();
- this.Label8 = new System.Windows.Forms.Label();
this.Label1 = new System.Windows.Forms.Label();
this.Label53 = new System.Windows.Forms.Label();
this.Label52 = new System.Windows.Forms.Label();
@@ -621,9 +621,9 @@ namespace Handbrake //
// number
//
- dataGridViewCellStyle2.Format = "N0";
- dataGridViewCellStyle2.NullValue = null;
- this.number.DefaultCellStyle = dataGridViewCellStyle2;
+ dataGridViewCellStyle3.Format = "N0";
+ dataGridViewCellStyle3.NullValue = null;
+ this.number.DefaultCellStyle = dataGridViewCellStyle3;
this.number.HeaderText = "Chapter Number";
this.number.MaxInputLength = 3;
this.number.Name = "number";
@@ -790,7 +790,6 @@ namespace Handbrake this.drp_audsr_3.TabIndex = 28;
this.drp_audsr_3.Text = "48";
this.ToolTip.SetToolTip(this.drp_audsr_3, "Set the Audio Sample Rate");
- this.drp_audsr_3.Visible = false;
//
// drp_audbit_3
//
@@ -814,7 +813,6 @@ namespace Handbrake this.drp_audbit_3.TabIndex = 29;
this.drp_audbit_3.Text = "160";
this.ToolTip.SetToolTip(this.drp_audbit_3, "Set the Audio Bit-Rate");
- this.drp_audbit_3.Visible = false;
//
// drp_audenc_3
//
@@ -832,7 +830,6 @@ namespace Handbrake this.drp_audenc_3.TabIndex = 26;
this.drp_audenc_3.Text = "AAC";
this.ToolTip.SetToolTip(this.drp_audenc_3, "Select an audio encoder.");
- this.drp_audenc_3.Visible = false;
this.drp_audenc_3.SelectedIndexChanged += new System.EventHandler(this.drp_audenc_3_SelectedIndexChanged);
//
// drp_audmix_3
@@ -853,7 +850,6 @@ namespace Handbrake this.drp_audmix_3.TabIndex = 27;
this.drp_audmix_3.Text = "Automatic";
this.ToolTip.SetToolTip(this.drp_audmix_3, "Please note: Some options require a 5.1 audio channel to be selected");
- this.drp_audmix_3.Visible = false;
this.drp_audmix_3.SelectedIndexChanged += new System.EventHandler(this.drp_audmix_3_SelectedIndexChanged);
//
// drp_audsr_4
@@ -873,7 +869,6 @@ namespace Handbrake this.drp_audsr_4.TabIndex = 36;
this.drp_audsr_4.Text = "48";
this.ToolTip.SetToolTip(this.drp_audsr_4, "Set the Audio Sample Rate");
- this.drp_audsr_4.Visible = false;
//
// drp_audbit_4
//
@@ -897,7 +892,6 @@ namespace Handbrake this.drp_audbit_4.TabIndex = 37;
this.drp_audbit_4.Text = "160";
this.ToolTip.SetToolTip(this.drp_audbit_4, "Set the Audio Bit-Rate");
- this.drp_audbit_4.Visible = false;
//
// drp_audenc_4
//
@@ -915,7 +909,6 @@ namespace Handbrake this.drp_audenc_4.TabIndex = 34;
this.drp_audenc_4.Text = "AAC";
this.ToolTip.SetToolTip(this.drp_audenc_4, "Select an audio encoder.");
- this.drp_audenc_4.Visible = false;
this.drp_audenc_4.SelectedIndexChanged += new System.EventHandler(this.drp_audenc_4_SelectedIndexChanged);
//
// drp_audmix_4
@@ -936,9 +929,31 @@ namespace Handbrake this.drp_audmix_4.TabIndex = 35;
this.drp_audmix_4.Text = "Automatic";
this.ToolTip.SetToolTip(this.drp_audmix_4, "Please note: Some options require a 5.1 audio channel to be selected");
- this.drp_audmix_4.Visible = false;
this.drp_audmix_4.SelectedIndexChanged += new System.EventHandler(this.drp_audmix_4_SelectedIndexChanged);
//
+ // lbl_RecomendedCrop
+ //
+ this.lbl_RecomendedCrop.AutoSize = true;
+ this.lbl_RecomendedCrop.BackColor = System.Drawing.Color.Transparent;
+ this.lbl_RecomendedCrop.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lbl_RecomendedCrop.Location = new System.Drawing.Point(116, 69);
+ this.lbl_RecomendedCrop.Name = "lbl_RecomendedCrop";
+ 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
+ //
+ this.Label8.AutoSize = true;
+ this.Label8.BackColor = System.Drawing.Color.Transparent;
+ this.Label8.Location = new System.Drawing.Point(13, 68);
+ this.Label8.Name = "Label8";
+ 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");
+ //
// DVD_Open
//
this.DVD_Open.Description = "Select the \"VIDEO_TS\" folder from your DVD Drive.";
@@ -1345,7 +1360,6 @@ namespace Handbrake this.lbl_drc4.Size = new System.Drawing.Size(19, 13);
this.lbl_drc4.TabIndex = 39;
this.lbl_drc4.Text = "1:";
- this.lbl_drc4.Visible = false;
//
// lbl_drc3
//
@@ -1357,7 +1371,6 @@ namespace Handbrake this.lbl_drc3.Size = new System.Drawing.Size(19, 13);
this.lbl_drc3.TabIndex = 31;
this.lbl_drc3.Text = "1:";
- this.lbl_drc3.Visible = false;
//
// lbl_drc2
//
@@ -1392,7 +1405,6 @@ namespace Handbrake this.trackBar4.Size = new System.Drawing.Size(49, 42);
this.trackBar4.TabIndex = 38;
this.trackBar4.TickFrequency = 10;
- this.trackBar4.Visible = false;
this.trackBar4.ValueChanged += new System.EventHandler(this.trackBar4_Scroll);
//
// drp_track4Audio
@@ -1405,7 +1417,6 @@ namespace Handbrake this.drp_track4Audio.Name = "drp_track4Audio";
this.drp_track4Audio.Size = new System.Drawing.Size(194, 20);
this.drp_track4Audio.TabIndex = 33;
- this.drp_track4Audio.Visible = false;
this.drp_track4Audio.SelectedIndexChanged += new System.EventHandler(this.drp_track4Audio_SelectedIndexChanged);
//
// lbl_t4
@@ -1418,7 +1429,6 @@ namespace Handbrake this.lbl_t4.Size = new System.Drawing.Size(19, 13);
this.lbl_t4.TabIndex = 32;
this.lbl_t4.Text = "4:";
- this.lbl_t4.Visible = false;
//
// trackBar3
//
@@ -1431,7 +1441,6 @@ namespace Handbrake this.trackBar3.Size = new System.Drawing.Size(49, 42);
this.trackBar3.TabIndex = 30;
this.trackBar3.TickFrequency = 10;
- this.trackBar3.Visible = false;
this.trackBar3.ValueChanged += new System.EventHandler(this.trackBar3_Scroll);
//
// drp_track3Audio
@@ -1444,7 +1453,6 @@ namespace Handbrake this.drp_track3Audio.Name = "drp_track3Audio";
this.drp_track3Audio.Size = new System.Drawing.Size(194, 20);
this.drp_track3Audio.TabIndex = 25;
- this.drp_track3Audio.Visible = false;
this.drp_track3Audio.SelectedIndexChanged += new System.EventHandler(this.drp_track3Audio_SelectedIndexChanged);
//
// lbl_t3
@@ -1457,7 +1465,6 @@ namespace Handbrake this.lbl_t3.Size = new System.Drawing.Size(19, 13);
this.lbl_t3.TabIndex = 24;
this.lbl_t3.Text = "3:";
- this.lbl_t3.Visible = false;
//
// trackBar2
//
@@ -1638,13 +1645,11 @@ namespace Handbrake this.drp_track1Audio.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.drp_track1Audio.FormattingEnabled = true;
this.drp_track1Audio.Items.AddRange(new object[] {
- "Automatic",
- "None"});
+ "Automatic"});
this.drp_track1Audio.Location = new System.Drawing.Point(36, 54);
this.drp_track1Audio.Name = "drp_track1Audio";
this.drp_track1Audio.Size = new System.Drawing.Size(194, 20);
this.drp_track1Audio.TabIndex = 3;
- this.drp_track1Audio.SelectedIndexChanged += new System.EventHandler(this.drp_track1Audio_SelectedIndexChanged);
//
// Label32
//
@@ -2068,29 +2073,6 @@ namespace Handbrake this.drp_deInterlace_option.Size = new System.Drawing.Size(161, 21);
this.drp_deInterlace_option.TabIndex = 17;
//
- // lbl_RecomendedCrop
- //
- this.lbl_RecomendedCrop.AutoSize = true;
- this.lbl_RecomendedCrop.BackColor = System.Drawing.Color.Transparent;
- this.lbl_RecomendedCrop.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.lbl_RecomendedCrop.Location = new System.Drawing.Point(116, 69);
- this.lbl_RecomendedCrop.Name = "lbl_RecomendedCrop";
- 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
- //
- this.Label8.AutoSize = true;
- this.Label8.BackColor = System.Drawing.Color.Transparent;
- this.Label8.Location = new System.Drawing.Point(13, 68);
- this.Label8.Name = "Label8";
- 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
//
this.Label1.AutoSize = true;
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index 978d9b094..cb8dd7e33 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -871,34 +871,6 @@ namespace Handbrake }
// Audio Tab
- private void drp_track1Audio_SelectedIndexChanged(object sender, EventArgs e)
- {
- if (drp_track1Audio.SelectedItem.Equals("None"))
- {
- drp_audbit_1.Enabled = false;
- drp_audenc_1.Enabled = false;
- drp_audsr_1.Enabled = false;
- drp_audmix_1.Enabled = false;
- trackBar1.Enabled = false;
- drp_audbit_1.Text = "";
- drp_audenc_1.Text = "";
- drp_audsr_1.Text = "";
- drp_audmix_1.Text = "";
- trackBar1.Value = 0;
- }
- else
- {
- drp_audbit_1.Enabled = true;
- drp_audenc_1.Enabled = true;
- drp_audsr_1.Enabled = true;
- drp_audmix_1.Enabled = true;
- trackBar1.Enabled = true;
- drp_audbit_1.Text = "160";
- drp_audenc_1.Text = "AAC";
- drp_audsr_1.Text = "48";
- drp_audmix_1.Text = "Automatic";
- }
- }
private void drp_track2Audio_SelectedIndexChanged(object sender, EventArgs e)
{
if (drp_track2Audio.SelectedItem.Equals("None"))
@@ -911,17 +883,12 @@ namespace Handbrake drp_audbit_2.Text = "";
drp_audenc_2.Text = "";
drp_audsr_2.Text = "";
- drp_audmix_2.Text = "";
+ drp_audmix_2.Text = "Automatic";
trackBar2.Value = 0;
// Disable the 3rd Track.
- drp_track3Audio.Visible = false;
- drp_audbit_3.Visible = false;
- drp_audenc_3.Visible = false;
- drp_audsr_3.Visible = false;
- drp_audmix_3.Visible = false;
- trackBar3.Visible = false;
- lbl_drc3.Visible = false;
+ drp_track3Audio.Enabled = false;
+ drp_track3Audio.Text = "None";
drp_audbit_3.Text = "";
drp_audenc_3.Text = "";
drp_audsr_3.Text = "";
@@ -941,17 +908,11 @@ namespace Handbrake drp_audmix_2.Text = "Automatic";
// Enable the 3rd Track.
- drp_track3Audio.Visible = true;
- drp_audbit_3.Visible = true;
- drp_audenc_3.Visible = true;
- drp_audsr_3.Visible = true;
- drp_audmix_3.Visible = true;
- trackBar3.Visible = true;
- lbl_drc3.Visible = true;
+ drp_track3Audio.Enabled = true;
drp_audbit_3.Text = "";
drp_audenc_3.Text = "";
drp_audsr_3.Text = "";
- drp_audmix_3.Text = "";
+ drp_audmix_3.Text = "Automatic";
}
}
private void drp_track3Audio_SelectedIndexChanged(object sender, EventArgs e)
@@ -966,17 +927,12 @@ namespace Handbrake drp_audbit_3.Text = "";
drp_audenc_3.Text = "";
drp_audsr_3.Text = "";
- drp_audmix_3.Text = "";
+ drp_audmix_3.Text = "Automatic";
trackBar3.Value = 0;
// Disable the 4th Track.
- drp_track4Audio.Visible = false;
- drp_audbit_4.Visible = false;
- drp_audenc_4.Visible = false;
- drp_audsr_4.Visible = false;
- drp_audmix_4.Visible = false;
- trackBar4.Visible = false;
- lbl_drc4.Visible = false;
+ drp_track4Audio.Enabled = false;
+ drp_track4Audio.Text = "None";
drp_audbit_4.Text = "";
drp_audenc_4.Text = "";
drp_audsr_4.Text = "";
@@ -996,17 +952,11 @@ namespace Handbrake drp_audmix_3.Text = "Automatic";
// Enable the 4th Track.
- drp_track4Audio.Visible = true;
- drp_audbit_4.Visible = true;
- drp_audenc_4.Visible = true;
- drp_audsr_4.Visible = true;
- drp_audmix_4.Visible = true;
- trackBar4.Visible = true;
- lbl_drc4.Visible = true;
+ drp_track4Audio.Enabled = true;
drp_audbit_4.Text = "";
drp_audenc_4.Text = "";
drp_audsr_4.Text = "";
- drp_audmix_4.Text = "";
+ drp_audmix_4.Text = "Automatic";
}
}
@@ -1022,7 +972,7 @@ namespace Handbrake drp_audbit_4.Text = "";
drp_audenc_4.Text = "";
drp_audsr_4.Text = "";
- drp_audmix_4.Text = "";
+ drp_audmix_4.Text = "Automatic";
trackBar4.Value = 0;
}
else
@@ -1042,37 +992,10 @@ namespace Handbrake private void drp_audioMixDown_SelectedIndexChanged(object sender, EventArgs e)
{
if ((drp_audenc_1.Text == "AAC") && (drp_audmix_1.Text == "6 Channel Discrete"))
- {
- drp_audbit_1.Items.Clear();
- drp_audbit_1.Items.Add("32");
- drp_audbit_1.Items.Add("40");
- drp_audbit_1.Items.Add("48");
- drp_audbit_1.Items.Add("56");
- drp_audbit_1.Items.Add("64");
- drp_audbit_1.Items.Add("80");
- drp_audbit_1.Items.Add("86");
- drp_audbit_1.Items.Add("112");
- drp_audbit_1.Items.Add("128");
- drp_audbit_1.Items.Add("160");
- drp_audbit_1.Items.Add("192");
- drp_audbit_1.Items.Add("224");
- drp_audbit_1.Items.Add("256");
- drp_audbit_1.Items.Add("320");
- drp_audbit_1.Items.Add("384");
- }
+ setBitrateSelections384(drp_audbit_1);
else if ((drp_audenc_1.Text == "AAC") && (drp_audmix_1.Text != "6 Channel Discrete"))
{
- drp_audbit_1.Items.Clear();
- drp_audbit_1.Items.Add("32");
- drp_audbit_1.Items.Add("40");
- drp_audbit_1.Items.Add("48");
- drp_audbit_1.Items.Add("56");
- drp_audbit_1.Items.Add("64");
- drp_audbit_1.Items.Add("80");
- drp_audbit_1.Items.Add("86");
- drp_audbit_1.Items.Add("112");
- drp_audbit_1.Items.Add("128");
- drp_audbit_1.Items.Add("160");
+ setBitrateSelections160(drp_audbit_1);
drp_audbit_1.Text = "160";
}
}
@@ -1082,37 +1005,10 @@ namespace Handbrake MessageBox.Show("Please select a mixdown for the previous track(s).", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
if ((drp_audenc_2.Text == "AAC") && (drp_audmix_2.Text == "6 Channel Discrete"))
- {
- drp_audbit_2.Items.Clear();
- drp_audbit_2.Items.Add("32");
- drp_audbit_2.Items.Add("40");
- drp_audbit_2.Items.Add("48");
- drp_audbit_2.Items.Add("56");
- drp_audbit_2.Items.Add("64");
- drp_audbit_2.Items.Add("80");
- drp_audbit_2.Items.Add("86");
- drp_audbit_2.Items.Add("112");
- drp_audbit_2.Items.Add("128");
- drp_audbit_2.Items.Add("160");
- drp_audbit_2.Items.Add("192");
- drp_audbit_2.Items.Add("224");
- drp_audbit_2.Items.Add("256");
- drp_audbit_2.Items.Add("320");
- drp_audbit_2.Items.Add("384");
- }
+ setBitrateSelections384(drp_audbit_2);
else if ((drp_audenc_2.Text == "AAC") && (drp_audmix_2.Text != "6 Channel Discrete"))
{
- drp_audbit_2.Items.Clear();
- drp_audbit_2.Items.Add("32");
- drp_audbit_2.Items.Add("40");
- drp_audbit_2.Items.Add("48");
- drp_audbit_2.Items.Add("56");
- drp_audbit_2.Items.Add("64");
- drp_audbit_2.Items.Add("80");
- drp_audbit_2.Items.Add("86");
- drp_audbit_2.Items.Add("112");
- drp_audbit_2.Items.Add("128");
- drp_audbit_2.Items.Add("160");
+ setBitrateSelections160(drp_audbit_2);
drp_audbit_2.Text = "160";
}
}
@@ -1122,37 +1018,10 @@ namespace Handbrake MessageBox.Show("Please select a mixdown for the previous track(s).", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
if ((drp_audenc_3.Text == "AAC") && (drp_audmix_3.Text == "6 Channel Discrete"))
- {
- drp_audbit_3.Items.Clear();
- drp_audbit_3.Items.Add("32");
- drp_audbit_3.Items.Add("40");
- drp_audbit_3.Items.Add("48");
- drp_audbit_3.Items.Add("56");
- drp_audbit_3.Items.Add("64");
- drp_audbit_3.Items.Add("80");
- drp_audbit_3.Items.Add("86");
- drp_audbit_3.Items.Add("112");
- drp_audbit_3.Items.Add("128");
- drp_audbit_3.Items.Add("160");
- drp_audbit_3.Items.Add("192");
- drp_audbit_3.Items.Add("224");
- drp_audbit_3.Items.Add("256");
- drp_audbit_3.Items.Add("320");
- drp_audbit_3.Items.Add("384");
- }
+ setBitrateSelections384(drp_audbit_3);
else if ((drp_audenc_3.Text == "AAC") && (drp_audmix_3.Text != "6 Channel Discrete"))
{
- drp_audbit_3.Items.Clear();
- drp_audbit_3.Items.Add("32");
- drp_audbit_3.Items.Add("40");
- drp_audbit_3.Items.Add("48");
- drp_audbit_3.Items.Add("56");
- drp_audbit_3.Items.Add("64");
- drp_audbit_3.Items.Add("80");
- drp_audbit_3.Items.Add("86");
- drp_audbit_3.Items.Add("112");
- drp_audbit_3.Items.Add("128");
- drp_audbit_3.Items.Add("160");
+ setBitrateSelections160(drp_audbit_3);
drp_audbit_3.Text = "160";
}
}
@@ -1162,37 +1031,10 @@ namespace Handbrake MessageBox.Show("Please select a mixdown for the previous track(s).", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
if ((drp_audenc_4.Text == "AAC") && (drp_audmix_4.Text == "6 Channel Discrete"))
- {
- drp_audbit_4.Items.Clear();
- drp_audbit_4.Items.Add("32");
- drp_audbit_4.Items.Add("40");
- drp_audbit_4.Items.Add("48");
- drp_audbit_4.Items.Add("56");
- drp_audbit_4.Items.Add("64");
- drp_audbit_4.Items.Add("80");
- drp_audbit_4.Items.Add("86");
- drp_audbit_4.Items.Add("112");
- drp_audbit_4.Items.Add("128");
- drp_audbit_4.Items.Add("160");
- drp_audbit_4.Items.Add("192");
- drp_audbit_4.Items.Add("224");
- drp_audbit_4.Items.Add("256");
- drp_audbit_4.Items.Add("320");
- drp_audbit_4.Items.Add("384");
- }
+ setBitrateSelections384(drp_audbit_4);
else if ((drp_audenc_4.Text == "AAC") && (drp_audmix_4.Text != "6 Channel Discrete"))
{
- drp_audbit_4.Items.Clear();
- drp_audbit_4.Items.Add("32");
- drp_audbit_4.Items.Add("40");
- drp_audbit_4.Items.Add("48");
- drp_audbit_4.Items.Add("56");
- drp_audbit_4.Items.Add("64");
- drp_audbit_4.Items.Add("80");
- drp_audbit_4.Items.Add("86");
- drp_audbit_4.Items.Add("112");
- drp_audbit_4.Items.Add("128");
- drp_audbit_4.Items.Add("160");
+ setBitrateSelections160(drp_audbit_4);
drp_audbit_4.Text = "160";
}
}
@@ -1226,18 +1068,7 @@ namespace Handbrake drp_audmix_1.Items.Add("Dolby Pro Logic II");
drp_audmix_1.Items.Add("6 Channel Discrete");
- drp_audbit_1.Items.Clear();
- drp_audbit_1.Items.Add("32");
- drp_audbit_1.Items.Add("40");
- drp_audbit_1.Items.Add("48");
- drp_audbit_1.Items.Add("56");
- drp_audbit_1.Items.Add("64");
- drp_audbit_1.Items.Add("80");
- drp_audbit_1.Items.Add("86");
- drp_audbit_1.Items.Add("112");
- drp_audbit_1.Items.Add("128");
- drp_audbit_1.Items.Add("160");
-
+ setBitrateSelections160(drp_audbit_1);
}
else
{
@@ -1246,21 +1077,7 @@ namespace Handbrake drp_audmix_1.Items.Add("Dolby Surround");
drp_audmix_1.Items.Add("Dolby Pro Logic II");
- drp_audbit_1.Items.Clear();
- drp_audbit_1.Items.Add("32");
- drp_audbit_1.Items.Add("40");
- drp_audbit_1.Items.Add("48");
- drp_audbit_1.Items.Add("56");
- drp_audbit_1.Items.Add("64");
- drp_audbit_1.Items.Add("80");
- drp_audbit_1.Items.Add("86");
- drp_audbit_1.Items.Add("112");
- drp_audbit_1.Items.Add("128");
- drp_audbit_1.Items.Add("160");
- drp_audbit_1.Items.Add("192");
- drp_audbit_1.Items.Add("224");
- drp_audbit_1.Items.Add("256");
- drp_audbit_1.Items.Add("320");
+ setBitrateSelections320(drp_audbit_1);
}
}
private void drp_audenc_2_SelectedIndexChanged(object sender, EventArgs e)
@@ -1299,18 +1116,7 @@ namespace Handbrake drp_audmix_2.Items.Add("Dolby Pro Logic II");
drp_audmix_2.Items.Add("6 Channel Discrete");
- drp_audbit_2.Items.Clear();
- drp_audbit_2.Items.Add("32");
- drp_audbit_2.Items.Add("40");
- drp_audbit_2.Items.Add("48");
- drp_audbit_2.Items.Add("56");
- drp_audbit_2.Items.Add("64");
- drp_audbit_2.Items.Add("80");
- drp_audbit_2.Items.Add("86");
- drp_audbit_2.Items.Add("112");
- drp_audbit_2.Items.Add("128");
- drp_audbit_2.Items.Add("160");
-
+ setBitrateSelections160(drp_audbit_2);
}
else
{
@@ -1319,21 +1125,7 @@ namespace Handbrake drp_audmix_2.Items.Add("Dolby Surround");
drp_audmix_2.Items.Add("Dolby Pro Logic II");
- drp_audbit_2.Items.Clear();
- drp_audbit_2.Items.Add("32");
- drp_audbit_2.Items.Add("40");
- drp_audbit_2.Items.Add("48");
- drp_audbit_2.Items.Add("56");
- drp_audbit_2.Items.Add("64");
- drp_audbit_2.Items.Add("80");
- drp_audbit_2.Items.Add("86");
- drp_audbit_2.Items.Add("112");
- drp_audbit_2.Items.Add("128");
- drp_audbit_2.Items.Add("160");
- drp_audbit_2.Items.Add("192");
- drp_audbit_2.Items.Add("224");
- drp_audbit_2.Items.Add("256");
- drp_audbit_2.Items.Add("320");
+ setBitrateSelections320(drp_audbit_2);
}
}
private void drp_audenc_3_SelectedIndexChanged(object sender, EventArgs e)
@@ -1373,18 +1165,7 @@ namespace Handbrake drp_audmix_3.Items.Add("Dolby Pro Logic II");
drp_audmix_3.Items.Add("6 Channel Discrete");
- drp_audbit_3.Items.Clear();
- drp_audbit_3.Items.Add("32");
- drp_audbit_3.Items.Add("40");
- drp_audbit_3.Items.Add("48");
- drp_audbit_3.Items.Add("56");
- drp_audbit_3.Items.Add("64");
- drp_audbit_3.Items.Add("80");
- drp_audbit_3.Items.Add("86");
- drp_audbit_3.Items.Add("112");
- drp_audbit_3.Items.Add("128");
- drp_audbit_3.Items.Add("160");
-
+ setBitrateSelections160(drp_audbit_3);
}
else
{
@@ -1393,21 +1174,7 @@ namespace Handbrake drp_audmix_3.Items.Add("Dolby Surround");
drp_audmix_3.Items.Add("Dolby Pro Logic II");
- drp_audbit_3.Items.Clear();
- drp_audbit_3.Items.Add("32");
- drp_audbit_3.Items.Add("40");
- drp_audbit_3.Items.Add("48");
- drp_audbit_3.Items.Add("56");
- drp_audbit_3.Items.Add("64");
- drp_audbit_3.Items.Add("80");
- drp_audbit_3.Items.Add("86");
- drp_audbit_3.Items.Add("112");
- drp_audbit_3.Items.Add("128");
- drp_audbit_3.Items.Add("160");
- drp_audbit_3.Items.Add("192");
- drp_audbit_3.Items.Add("224");
- drp_audbit_3.Items.Add("256");
- drp_audbit_3.Items.Add("320");
+ setBitrateSelections320(drp_audbit_3);
}
}
private void drp_audenc_4_SelectedIndexChanged(object sender, EventArgs e)
@@ -1447,18 +1214,7 @@ namespace Handbrake drp_audmix_4.Items.Add("Dolby Pro Logic II");
drp_audmix_4.Items.Add("6 Channel Discrete");
- drp_audbit_4.Items.Clear();
- drp_audbit_4.Items.Add("32");
- drp_audbit_4.Items.Add("40");
- drp_audbit_4.Items.Add("48");
- drp_audbit_4.Items.Add("56");
- drp_audbit_4.Items.Add("64");
- drp_audbit_4.Items.Add("80");
- drp_audbit_4.Items.Add("86");
- drp_audbit_4.Items.Add("112");
- drp_audbit_4.Items.Add("128");
- drp_audbit_4.Items.Add("160");
-
+ setBitrateSelections160(drp_audbit_4);
}
else
{
@@ -1467,21 +1223,7 @@ namespace Handbrake drp_audmix_4.Items.Add("Dolby Surround");
drp_audmix_4.Items.Add("Dolby Pro Logic II");
- drp_audbit_4.Items.Clear();
- drp_audbit_4.Items.Add("32");
- drp_audbit_4.Items.Add("40");
- drp_audbit_4.Items.Add("48");
- drp_audbit_4.Items.Add("56");
- drp_audbit_4.Items.Add("64");
- drp_audbit_4.Items.Add("80");
- drp_audbit_4.Items.Add("86");
- drp_audbit_4.Items.Add("112");
- drp_audbit_4.Items.Add("128");
- drp_audbit_4.Items.Add("160");
- drp_audbit_4.Items.Add("192");
- drp_audbit_4.Items.Add("224");
- drp_audbit_4.Items.Add("256");
- drp_audbit_4.Items.Add("320");
+ setBitrateSelections320(drp_audbit_4);
}
}
@@ -1991,6 +1733,57 @@ namespace Handbrake drp_videoEncoder.Text = oldval;
}
}
+ private void setBitrateSelections384(ComboBox dropDown)
+ {
+ dropDown.Items.Clear();
+ dropDown.Items.Add("32");
+ dropDown.Items.Add("40");
+ dropDown.Items.Add("48");
+ dropDown.Items.Add("56");
+ dropDown.Items.Add("64");
+ dropDown.Items.Add("80");
+ dropDown.Items.Add("86");
+ dropDown.Items.Add("112");
+ dropDown.Items.Add("128");
+ dropDown.Items.Add("160");
+ dropDown.Items.Add("192");
+ dropDown.Items.Add("224");
+ dropDown.Items.Add("256");
+ dropDown.Items.Add("320");
+ dropDown.Items.Add("384");
+ }
+ private void setBitrateSelections320(ComboBox dropDown)
+ {
+ dropDown.Items.Clear();
+ dropDown.Items.Add("32");
+ dropDown.Items.Add("40");
+ dropDown.Items.Add("48");
+ dropDown.Items.Add("56");
+ dropDown.Items.Add("64");
+ dropDown.Items.Add("80");
+ dropDown.Items.Add("86");
+ dropDown.Items.Add("112");
+ dropDown.Items.Add("128");
+ dropDown.Items.Add("160");
+ dropDown.Items.Add("192");
+ dropDown.Items.Add("224");
+ dropDown.Items.Add("256");
+ dropDown.Items.Add("320");
+ }
+ private void setBitrateSelections160(ComboBox dropDown)
+ {
+ dropDown.Items.Clear();
+ dropDown.Items.Add("32");
+ dropDown.Items.Add("40");
+ dropDown.Items.Add("48");
+ dropDown.Items.Add("56");
+ dropDown.Items.Add("64");
+ dropDown.Items.Add("80");
+ dropDown.Items.Add("86");
+ dropDown.Items.Add("112");
+ dropDown.Items.Add("128");
+ dropDown.Items.Add("160");
+ }
// Preset system functions
private void addPresetToList(ArrayList presetNameList)
|