}\r
}\r
\r
+\r
+ private void SetBitrate2()\r
+ {\r
+ int max = 0;\r
+ switch (drp_audioEncoder.Text)\r
+ {\r
+ case "AAC (faac)":\r
+ max = drp_audioMix.Text.Contains("6 Channel") ? 384 : 160;\r
+ break;\r
+ case "MP3 (lame)":\r
+ max = 320;\r
+ break;\r
+ case "Vorbis (vorbis)":\r
+ max = 384;\r
+ break;\r
+ case "AC3 Passthru":\r
+ drp_audioBitrate.Items.Add("Auto");\r
+ drp_audioBitrate.SelectedItem = "Auto";\r
+ drp_audioSample.SelectedItem = "Auto";\r
+ break;\r
+ case "DTS Passthru":\r
+ drp_audioBitrate.Items.Add("Auto");\r
+ drp_audioBitrate.SelectedItem = "Auto";\r
+ drp_audioSample.SelectedItem = "Auto";\r
+ break;\r
+ }\r
+ }\r
+\r
private void SetBitrate()\r
{\r
int max = 0;\r
drp_audioBitrate.Items.Remove("224");\r
drp_audioBitrate.Items.Remove("256");\r
drp_audioBitrate.Items.Remove("320");\r
+ drp_audioBitrate.Items.Remove("384");\r
+ drp_audioBitrate.Items.Remove("448");\r
+ drp_audioBitrate.Items.Remove("768");\r
\r
switch (drp_audioEncoder.Text)\r
{\r
case "AAC (faac)":\r
- max = drp_audioMix.Text.Contains("6 Channel") ? 384 : 160;\r
+ max = drp_audioMix.Text.Contains("6 Channel") ? 768 : 320;\r
break;\r
case "MP3 (lame)":\r
max = 320;\r
drp_audioBitrate.Items.Add("224");\r
drp_audioBitrate.Items.Add("256");\r
drp_audioBitrate.Items.Add("320");\r
- if (max == 384)\r
- drp_audioBitrate.Items.Add("384");\r
- else\r
- drp_audioBitrate.Items.Remove("384");\r
}\r
- else\r
+\r
+ if (max > 320)\r
+ {\r
+ drp_audioBitrate.Items.Add("384");\r
+ }\r
+\r
+ if (max == 768)\r
{\r
- drp_audioBitrate.Items.Remove("192");\r
- drp_audioBitrate.Items.Remove("224");\r
- drp_audioBitrate.Items.Remove("256");\r
- drp_audioBitrate.Items.Remove("320");\r
- drp_audioBitrate.Items.Remove("384");\r
+ drp_audioBitrate.Items.Add("448");\r
+ drp_audioBitrate.Items.Add("768");\r
}\r
\r
- if (drp_audioBitrate.SelectedItem == null)\r
+ if (drp_audioBitrate.SelectedItem == null)\r
drp_audioBitrate.SelectedIndex = drp_audioBitrate.Items.Count - 1;\r
}\r
\r
[STAThread]\r
public static void Main()\r
{\r
+ AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);\r
+\r
const string failedInstall = "HandBrake is not installed properly. Please reinstall HandBrake. \n\n";\r
const string nightlyCLIMissing =\r
"If you have downloaded the \"HandBrakeGUI\" nightly, " +\r
Application.Run(new frmMain());\r
}\r
}\r
+\r
+ /// <summary>\r
+ /// Throw up an error message for any unhandled exceptions.\r
+ /// </summary>\r
+ /// <param name="sender">The sender</param>\r
+ /// <param name="e">Unhandled Exception EventArgs </param>\r
+ private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)\r
+ {\r
+ MessageBox.Show(\r
+ "An unexpected error has occured.\n\nSender:" + sender + "\n\nException:" + e.ExceptionObject, \r
+ "Unhandled Exception",\r
+ MessageBoxButtons.OK,\r
+ MessageBoxIcon.Error);\r
+ }\r
}\r
}
\ No newline at end of file
this.PictureBox1 = new System.Windows.Forms.PictureBox();\r
this.lbl_update_text = new System.Windows.Forms.Label();\r
this.panel1 = new System.Windows.Forms.Panel();\r
+ this.panel2 = new System.Windows.Forms.Panel();\r
this.statusStrip1 = new System.Windows.Forms.StatusStrip();\r
this.panel3 = new System.Windows.Forms.Panel();\r
this.panel5 = new System.Windows.Forms.Panel();\r
this.wBrowser = new System.Windows.Forms.WebBrowser();\r
this.splitContainer1 = new System.Windows.Forms.SplitContainer();\r
this.button_container = new System.Windows.Forms.SplitContainer();\r
- this.panel2 = new System.Windows.Forms.Panel();\r
((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).BeginInit();\r
this.panel1.SuspendLayout();\r
this.splitContainer1.Panel1.SuspendLayout();\r
this.panel1.Size = new System.Drawing.Size(710, 97);\r
this.panel1.TabIndex = 60;\r
// \r
+ // panel2\r
+ // \r
+ this.panel2.BackColor = System.Drawing.SystemColors.Control;\r
+ this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;\r
+ this.panel2.Location = new System.Drawing.Point(0, 87);\r
+ this.panel2.MaximumSize = new System.Drawing.Size(0, 10);\r
+ this.panel2.MinimumSize = new System.Drawing.Size(0, 10);\r
+ this.panel2.Name = "panel2";\r
+ this.panel2.Size = new System.Drawing.Size(710, 10);\r
+ this.panel2.TabIndex = 59;\r
+ // \r
// statusStrip1\r
// \r
this.statusStrip1.Location = new System.Drawing.Point(0, 346);\r
this.button_container.SplitterDistance = 318;\r
this.button_container.TabIndex = 0;\r
// \r
- // panel2\r
- // \r
- this.panel2.BackColor = System.Drawing.SystemColors.Control;\r
- this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;\r
- this.panel2.Location = new System.Drawing.Point(0, 87);\r
- this.panel2.MaximumSize = new System.Drawing.Size(0, 10);\r
- this.panel2.MinimumSize = new System.Drawing.Size(0, 10);\r
- this.panel2.Name = "panel2";\r
- this.panel2.Size = new System.Drawing.Size(710, 10);\r
- this.panel2.TabIndex = 59;\r
- // \r
// frmUpdater\r
// \r
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\r