\r
string ChapterMarkers = "";\r
\r
+ // Attach Source name and dvd title to the start of the chapters.csv filename.\r
+ // This is for the queue. It allows different chapter name files for each title.\r
+ string source_name = mainWindow.text_source.Text;\r
+ string[] sourceName = source.Split('\\');\r
+ source_name = sourceName[sourceName.Length - 1].Replace(".iso", "").Replace(".mpg", "").Replace(".ts", "").Replace(".ps", "");\r
+ source_name = source_name.Replace("\"", "");\r
+\r
+ string source_title = mainWindow.drp_dvdtitle.Text;\r
+ string[] titlesplit = source_title.Split(' ');\r
+ source_title = titlesplit[0];\r
+\r
if (mainWindow.Check_ChapterMarkers.Checked)\r
{\r
- Boolean saveCSV = chapterCSVSave(mainWindow);\r
- if (saveCSV == false)\r
+\r
+ if (source_name != "Click 'Browse' to continue")\r
{\r
- MessageBox.Show("Unable to save Chapter Makrers file! \n Chapter marker names will NOT be saved in your encode \n\n", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
- ChapterMarkers = " -m ";\r
+ if (source_title != "Automatic")\r
+ {\r
+ string filename = source_name + "-" + source_title + "-chapters.csv";\r
+ string path = Path.Combine(Path.GetTempPath(), filename);\r
+\r
+ Boolean saveCSV = chapterCSVSave(mainWindow, path);\r
+ if (saveCSV == false)\r
+ ChapterMarkers = " -m ";\r
+ else\r
+ {\r
+ ChapterMarkers = " --markers=" + "\"" + path + "\"";\r
+ }\r
+ }\r
+ else\r
+ {\r
+ string path = Path.Combine(Path.GetTempPath(), "chapters.csv");\r
+ ChapterMarkers = " --markers=" + "\"" + path + "\"";\r
+ }\r
}\r
else\r
{\r
string path = Path.Combine(Path.GetTempPath(), "chapters.csv");\r
-\r
ChapterMarkers = " --markers=" + "\"" + path + "\"";\r
- }\r
+ } \r
}\r
\r
string chapter_markers = ChapterMarkers;\r
* This function saves the data in the chapters tab, dataGridView into a CSV file called chapters.csv in this applications\r
* running directory.\r
*/\r
- private Boolean chapterCSVSave(frmMain mainWindow)\r
+ private Boolean chapterCSVSave(frmMain mainWindow, string file_path_name)\r
{\r
try\r
- {\r
- string path = Path.Combine(Path.GetTempPath(), "chapters.csv");\r
-\r
+ { \r
StringBuilder csv = new StringBuilder();\r
\r
foreach (DataGridViewRow row in mainWindow.data_chpt.Rows)\r
csv.Append(row.Cells[1].Value.ToString());\r
csv.Append(Environment.NewLine);\r
}\r
- StreamWriter file = new StreamWriter(path);\r
+ StreamWriter file = new StreamWriter(file_path_name);\r
file.Write(csv.ToString());\r
file.Close();\r
file.Dispose();\r
}\r
catch (Exception exc)\r
{\r
- MessageBox.Show(exc.ToString(), "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
+ MessageBox.Show("Unable to save Chapter Makrers file! \nChapter marker names will NOT be saved in your encode \n\n" + exc.ToString(), "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
return false;\r
}\r
}\r
{\r
// Development Code Expiry.\r
// Remember to comment out on public release!!!\r
- if (DateTime.Now > DateTime.Parse("2008/02/25", new CultureInfo("en-US"))) { MessageBox.Show("Sorry, This development build of Handbrake has expired."); return; } \r
+ //if (DateTime.Now > DateTime.Parse("2008/02/25", new CultureInfo("en-US"))) { MessageBox.Show("Sorry, This development build of Handbrake has expired."); return; } \r
\r
// Check the system meets the system requirements.\r
Boolean launch = true;\r
this.components = new System.ComponentModel.Container();\r
System.Windows.Forms.Label Label38;\r
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain));\r
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();\r
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();\r
this.DVD_Save = new System.Windows.Forms.SaveFileDialog();\r
this.File_Save = new System.Windows.Forms.SaveFileDialog();\r
this.ToolTip = new System.Windows.Forms.ToolTip(this.components);\r
this.btn_ActivityWindow = new System.Windows.Forms.ToolStripButton();\r
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();\r
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);\r
+ this.lbl_warn_chapt = new System.Windows.Forms.Label();\r
Label38 = new System.Windows.Forms.Label();\r
((System.ComponentModel.ISupportInitialize)(this.slider_videoQuality)).BeginInit();\r
((System.ComponentModel.ISupportInitialize)(this.slider_drc)).BeginInit();\r
this.text_destination.Size = new System.Drawing.Size(429, 21);\r
this.text_destination.TabIndex = 1;\r
this.ToolTip.SetToolTip(this.text_destination, "Location where the encoded file will be saved.");\r
+ this.text_destination.TextChanged += new System.EventHandler(this.text_destination_TextChanged);\r
// \r
// btn_Browse\r
// \r
"None",\r
"Fast",\r
"Slow",\r
- "Slower",\r
- "Slowest"});\r
+ "Slower"});\r
this.drp_deInterlace_option.Location = new System.Drawing.Point(413, 190);\r
this.drp_deInterlace_option.Name = "drp_deInterlace_option";\r
this.drp_deInterlace_option.Size = new System.Drawing.Size(161, 21);\r
// tab_chapters\r
// \r
this.tab_chapters.BackColor = System.Drawing.SystemColors.ControlLight;\r
+ this.tab_chapters.Controls.Add(this.lbl_warn_chapt);\r
this.tab_chapters.Controls.Add(this.label31);\r
this.tab_chapters.Controls.Add(this.data_chpt);\r
this.tab_chapters.Controls.Add(this.Check_ChapterMarkers);\r
this.data_chpt.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {\r
this.number,\r
this.name});\r
- this.data_chpt.Location = new System.Drawing.Point(16, 55);\r
+ this.data_chpt.Location = new System.Drawing.Point(16, 72);\r
this.data_chpt.Name = "data_chpt";\r
- this.data_chpt.Size = new System.Drawing.Size(607, 199);\r
+ this.data_chpt.Size = new System.Drawing.Size(607, 182);\r
this.data_chpt.TabIndex = 2;\r
// \r
// number\r
// \r
- dataGridViewCellStyle3.Format = "N0";\r
- dataGridViewCellStyle3.NullValue = null;\r
- this.number.DefaultCellStyle = dataGridViewCellStyle3;\r
+ dataGridViewCellStyle1.Format = "N0";\r
+ dataGridViewCellStyle1.NullValue = null;\r
+ this.number.DefaultCellStyle = dataGridViewCellStyle1;\r
this.number.HeaderText = "Chapter Number";\r
this.number.MaxInputLength = 3;\r
this.number.Name = "number";\r
this.toolStripSeparator8.Name = "toolStripSeparator8";\r
this.toolStripSeparator8.Size = new System.Drawing.Size(6, 39);\r
// \r
+ // lbl_warn_chapt\r
+ // \r
+ this.lbl_warn_chapt.AutoSize = true;\r
+ this.lbl_warn_chapt.Location = new System.Drawing.Point(13, 52);\r
+ this.lbl_warn_chapt.Name = "lbl_warn_chapt";\r
+ this.lbl_warn_chapt.Size = new System.Drawing.Size(394, 13);\r
+ this.lbl_warn_chapt.TabIndex = 23;\r
+ this.lbl_warn_chapt.Text = "Please make sure you have selected a DVD tile in the \"Source\" box";\r
+ // \r
// frmMain\r
// \r
this.AllowDrop = true;\r
private System.Windows.Forms.ToolStripButton btn_ActivityWindow;\r
private System.Windows.Forms.ToolStripSeparator toolStripSeparator8;\r
private System.Windows.Forms.ToolTip toolTip1;\r
+ private System.Windows.Forms.Label lbl_warn_chapt;\r
\r
}\r
}
\ No newline at end of file
\r
#endregion\r
\r
+ private void text_destination_TextChanged(object sender, EventArgs e)\r
+ {\r
+\r
+ }\r
+\r
\r
\r
// This is the END of the road ------------------------------------------------------------------------------\r
<metadata name="name.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">\r
<value>True</value>\r
</metadata>\r
- <metadata name="number.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">\r
- <value>True</value>\r
- </metadata>\r
- <metadata name="name.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">\r
- <value>True</value>\r
- </metadata>\r
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
<value>731, 18</value>\r
</metadata>\r