this.ToolTip.Active = false;\r
this.ToolTip.AutomaticDelay = 1000;\r
this.ToolTip.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info;\r
+ this.ToolTip.ToolTipTitle = "Tooltip";\r
// \r
// drop_chapterFinish\r
// \r
// \r
this.label44.AutoSize = true;\r
this.label44.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
- this.label44.Location = new System.Drawing.Point(590, 108);\r
+ this.label44.Location = new System.Drawing.Point(606, 109);\r
this.label44.Name = "label44";\r
this.label44.Size = new System.Drawing.Size(55, 12);\r
this.label44.TabIndex = 23;\r
// \r
this.check_8x8DCT.AutoSize = true;\r
this.check_8x8DCT.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
- this.check_8x8DCT.Location = new System.Drawing.Point(648, 108);\r
+ this.check_8x8DCT.Location = new System.Drawing.Point(664, 109);\r
this.check_8x8DCT.Name = "check_8x8DCT";\r
this.check_8x8DCT.RightToLeft = System.Windows.Forms.RightToLeft.No;\r
this.check_8x8DCT.Size = new System.Drawing.Size(12, 11);\r
this.drop_analysis.FormattingEnabled = true;\r
this.drop_analysis.Location = new System.Drawing.Point(537, 105);\r
this.drop_analysis.Name = "drop_analysis";\r
- this.drop_analysis.Size = new System.Drawing.Size(47, 20);\r
+ this.drop_analysis.Size = new System.Drawing.Size(63, 20);\r
this.drop_analysis.TabIndex = 33;\r
this.drop_analysis.SelectedIndexChanged += new System.EventHandler(this.drop_analysis_SelectedIndexChanged);\r
// \r
using System.IO;\r
using System.Threading;\r
using System.Diagnostics;\r
+using System.Collections;\r
\r
\r
namespace Handbrake\r
mainWindow.drop_chapterFinish.Text = "Auto";\r
mainWindow.drop_chapterStart.Text = "Auto";\r
\r
+ // Now select the longest title\r
+ int current_largest = 0;\r
+ Handbrake.Parsing.Title title2Select = thisDvd.Titles[0];\r
+\r
+ foreach (Handbrake.Parsing.Title x in thisDvd.Titles)\r
+ {\r
+ string title = x.ToString();\r
+ if (title != "Automatic")\r
+ {\r
+ string[] y = title.Split(' ');\r
+ string time = y[1].Replace("(", "").Replace(")", "");\r
+ string[] z = time.Split(':');\r
+\r
+ int hours = int.Parse(z[0]) * 60 * 60;\r
+ int minutes = int.Parse(z[1]) * 60;\r
+ int seconds = int.Parse(z[2]);\r
+ int total_sec = hours + minutes + seconds;\r
+\r
+ if (current_largest == 0)\r
+ {\r
+ current_largest = hours + minutes + seconds;\r
+ title2Select = x;\r
+ }\r
+ else\r
+ {\r
+ if (total_sec > current_largest)\r
+ {\r
+ current_largest = total_sec;\r
+ title2Select = x;\r
+ }\r
+ }\r
+ }\r
+ \r
+ }\r
+\r
+\r
+ mainWindow.drp_dvdtitle.SelectedItem = title2Select;\r
+\r
this.Close();\r
}\r
catch (Exception exc)\r
\r
if (!File.Exists(dvdInfoPath))\r
{\r
- throw new Exception("Unable to retrieve the DVD Info. dvdinfo.dat missing.");\r
+ throw new Exception("Unable to retrieve the DVD Info. dvdinfo.dat is missing.");\r
}\r
\r
using (StreamReader sr = new StreamReader(dvdInfoPath))\r