{\r
if (mainWindow.drp_dvdtitle.Text != "Automatic")\r
{\r
+ // Todo: This code is a tad messy. Clean it up at some point.\r
+ // Get the Source Name\r
string source = mainWindow.text_source.Text;\r
string[] sourceName = source.Split('\\');\r
source = sourceName[sourceName.Length - 1].Replace(".iso", "").Replace(".mpg", "").Replace(".ts", "").Replace(".ps", "");\r
\r
+ // Get the Selected Title Number\r
string title = mainWindow.drp_dvdtitle.Text;\r
string[] titlesplit = title.Split(' ');\r
title = titlesplit[0];\r
\r
+ // Get the Chapter Start and Chapter End Numbers\r
string cs = mainWindow.drop_chapterStart.Text;\r
string cf = mainWindow.drop_chapterFinish.Text;\r
\r
+ // Just incase the above are set to their default Automatic values, set the varible to ""\r
if (title == "Automatic")\r
title = "";\r
if (cs == "Auto")\r
if (cf == "Auto")\r
cf = "";\r
\r
+ // If both CS and CF are populated, set the dash varible\r
string dash = "";\r
if (cf != "Auto")\r
dash = "-";\r
\r
+ // Get the destination filename.\r
+ string destination_filename = "";\r
+ if (Properties.Settings.Default.autoNameFormat != "")\r
+ {\r
+ destination_filename = Properties.Settings.Default.autoNameFormat;\r
+ destination_filename = destination_filename.Replace("{source}", source).Replace("{title}", title).Replace("{chapters}", cs + dash + cf);\r
+ }\r
+ else\r
+ destination_filename = source + "_T" + title + "_C" + cs + dash + cf;\r
+\r
+ // If the text box is blank\r
if (!mainWindow.text_destination.Text.Contains("\\"))\r
{\r
string filePath = "";\r
if (Properties.Settings.Default.autoNamePath.Trim() != "Click 'Browse' to set the default location")\r
filePath = Properties.Settings.Default.autoNamePath + "\\";\r
}\r
- mainWindow.text_destination.Text = filePath + source + "_T" + title + "_C" + cs + dash + cf + ".mp4";\r
+ mainWindow.text_destination.Text = filePath + destination_filename + ".mp4";\r
}\r
- else\r
+ else // If the text box already has a path and file\r
{\r
string dest = mainWindow.text_destination.Text;\r
-\r
string[] destName = dest.Split('\\');\r
-\r
-\r
string[] extension = dest.Split('.');\r
string ext = extension[extension.Length - 1];\r
\r
- destName[destName.Length - 1] = source + "_T" + title + "_C" + cs + dash + cf + "." + ext;\r
+ destName[destName.Length - 1] = destination_filename + "." + ext;\r
\r
string fullDest = "";\r
foreach (string part in destName)\r
//------------------------------------------------------------------------------\r
// <auto-generated>\r
// This code was generated by a tool.\r
-// Runtime Version:2.0.50727.1433\r
+// Runtime Version:2.0.50727.3053\r
//\r
// Changes to this file may cause incorrect behavior and will be lost if\r
// the code is regenerated.\r
this["default_decomb"] = value;\r
}\r
}\r
+ \r
+ [global::System.Configuration.UserScopedSettingAttribute()]\r
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+ [global::System.Configuration.DefaultSettingValueAttribute("{source}-{title}-{chapters}")]\r
+ public string autoNameFormat {\r
+ get {\r
+ return ((string)(this["autoNameFormat"]));\r
+ }\r
+ set {\r
+ this["autoNameFormat"] = value;\r
+ }\r
+ }\r
}\r
}\r
<Setting Name="default_decomb" Type="System.String" Scope="User">\r
<Value Profile="(Default)">4:10:15:9:10:35:9</Value>\r
</Setting>\r
+ <Setting Name="autoNameFormat" Type="System.String" Scope="User">\r
+ <Value Profile="(Default)">{source}-{title}-{chapters}</Value>\r
+ </Setting>\r
</Settings>\r
</SettingsFile>
\ No newline at end of file
<setting name="default_decomb" serializeAs="String">\r
<value>4:10:15:9:10:35:9</value>\r
</setting>\r
+ <setting name="autoNameFormat" serializeAs="String">\r
+ <value>{source}-{title}-{chapters}</value>\r
+ </setting>\r
</Handbrake.Properties.Settings>\r
</userSettings>\r
</configuration>
\ No newline at end of file
this.pictureBox2 = new System.Windows.Forms.PictureBox();\r
this.pathFinder = new System.Windows.Forms.FolderBrowserDialog();\r
this.ToolTip = new System.Windows.Forms.ToolTip(this.components);\r
+ this.txt_autoNameFormat = new System.Windows.Forms.TextBox();\r
+ this.label5 = new System.Windows.Forms.Label();\r
+ this.label7 = new System.Windows.Forms.Label();\r
this.tab_options.SuspendLayout();\r
this.tab_general.SuspendLayout();\r
this.tab_picture.SuspendLayout();\r
this.btn_close.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
this.btn_close.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
this.btn_close.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
- this.btn_close.Location = new System.Drawing.Point(395, 323);\r
+ this.btn_close.Location = new System.Drawing.Point(395, 346);\r
this.btn_close.Name = "btn_close";\r
this.btn_close.Size = new System.Drawing.Size(107, 22);\r
this.btn_close.TabIndex = 53;\r
this.tab_options.Location = new System.Drawing.Point(12, 55);\r
this.tab_options.Name = "tab_options";\r
this.tab_options.SelectedIndex = 0;\r
- this.tab_options.Size = new System.Drawing.Size(490, 262);\r
+ this.tab_options.Size = new System.Drawing.Size(490, 285);\r
this.tab_options.TabIndex = 58;\r
// \r
// tab_general\r
// \r
+ this.tab_general.Controls.Add(this.label7);\r
+ this.tab_general.Controls.Add(this.label5);\r
+ this.tab_general.Controls.Add(this.txt_autoNameFormat);\r
this.tab_general.Controls.Add(this.btn_browse);\r
this.tab_general.Controls.Add(this.label10);\r
this.tab_general.Controls.Add(this.text_an_path);\r
this.tab_general.Controls.Add(this.drp_completeOption);\r
this.tab_general.Location = new System.Drawing.Point(4, 22);\r
this.tab_general.Name = "tab_general";\r
- this.tab_general.Size = new System.Drawing.Size(482, 236);\r
+ this.tab_general.Size = new System.Drawing.Size(482, 259);\r
this.tab_general.TabIndex = 3;\r
this.tab_general.Text = "General";\r
this.tab_general.UseVisualStyleBackColor = true;\r
this.tab_picture.Controls.Add(this.label3);\r
this.tab_picture.Location = new System.Drawing.Point(4, 22);\r
this.tab_picture.Name = "tab_picture";\r
- this.tab_picture.Size = new System.Drawing.Size(482, 236);\r
+ this.tab_picture.Size = new System.Drawing.Size(482, 292);\r
this.tab_picture.TabIndex = 5;\r
this.tab_picture.Text = "Picture";\r
this.tab_picture.UseVisualStyleBackColor = true;\r
this.tab_cli.Controls.Add(this.Label4);\r
this.tab_cli.Location = new System.Drawing.Point(4, 22);\r
this.tab_cli.Name = "tab_cli";\r
- this.tab_cli.Size = new System.Drawing.Size(482, 236);\r
+ this.tab_cli.Size = new System.Drawing.Size(482, 292);\r
this.tab_cli.TabIndex = 2;\r
this.tab_cli.Text = "CLI";\r
this.tab_cli.UseVisualStyleBackColor = true;\r
this.tab_advanced.Location = new System.Drawing.Point(4, 22);\r
this.tab_advanced.Name = "tab_advanced";\r
this.tab_advanced.Padding = new System.Windows.Forms.Padding(3);\r
- this.tab_advanced.Size = new System.Drawing.Size(482, 236);\r
+ this.tab_advanced.Size = new System.Drawing.Size(482, 292);\r
this.tab_advanced.TabIndex = 4;\r
this.tab_advanced.Text = "Advanced";\r
this.tab_advanced.UseVisualStyleBackColor = true;\r
this.ToolTip.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info;\r
this.ToolTip.ToolTipTitle = "Tooltip";\r
// \r
+ // txt_autoNameFormat\r
+ // \r
+ this.txt_autoNameFormat.Location = new System.Drawing.Point(199, 198);\r
+ this.txt_autoNameFormat.Name = "txt_autoNameFormat";\r
+ this.txt_autoNameFormat.Size = new System.Drawing.Size(255, 21);\r
+ this.txt_autoNameFormat.TabIndex = 79;\r
+ this.txt_autoNameFormat.TextChanged += new System.EventHandler(this.txt_autoNameFormat_TextChanged);\r
+ // \r
+ // label5\r
+ // \r
+ this.label5.AutoSize = true;\r
+ this.label5.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+ this.label5.Location = new System.Drawing.Point(111, 201);\r
+ this.label5.Name = "label5";\r
+ this.label5.Size = new System.Drawing.Size(52, 13);\r
+ this.label5.TabIndex = 80;\r
+ this.label5.Text = "Format:";\r
+ // \r
+ // label7\r
+ // \r
+ this.label7.AutoSize = true;\r
+ this.label7.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+ this.label7.Location = new System.Drawing.Point(197, 222);\r
+ this.label7.Name = "label7";\r
+ this.label7.Size = new System.Drawing.Size(242, 12);\r
+ this.label7.TabIndex = 81;\r
+ this.label7.Text = "Available Options: {source} {title} {chapters}";\r
+ // \r
// frmOptions\r
// \r
- this.ClientSize = new System.Drawing.Size(514, 355);\r
+ this.ClientSize = new System.Drawing.Size(514, 375);\r
this.Controls.Add(this.label8);\r
this.Controls.Add(this.pictureBox2);\r
this.Controls.Add(this.tab_options);\r
private System.Windows.Forms.TabPage tab_picture;\r
private System.Windows.Forms.TextBox txt_decomb;\r
private System.Windows.Forms.Label label3;\r
+ internal System.Windows.Forms.Label label5;\r
+ private System.Windows.Forms.TextBox txt_autoNameFormat;\r
+ private System.Windows.Forms.Label label7;\r
}\r
}
\ No newline at end of file
if (Properties.Settings.Default.autoNaming == "Checked")\r
check_autoNaming.CheckState = CheckState.Checked;\r
\r
+ txt_autoNameFormat.Text = Properties.Settings.Default.autoNameFormat;\r
+\r
if (Properties.Settings.Default.drive_detection == "Checked")\r
btn_drive_detect.CheckState = CheckState.Checked;\r
\r
Properties.Settings.Default.autoNaming = check_autoNaming.CheckState.ToString();\r
}\r
\r
+ private void txt_autoNameFormat_TextChanged(object sender, EventArgs e)\r
+ {\r
+ Properties.Settings.Default.autoNameFormat = txt_autoNameFormat.Text;\r
+ }\r
+\r
private void btn_browse_Click(object sender, EventArgs e)\r
{\r
pathFinder.ShowDialog();\r
this.label1 = new System.Windows.Forms.Label();\r
this.label3 = new System.Windows.Forms.Label();\r
this.toolStrip1 = new System.Windows.Forms.ToolStrip();\r
+ this.btn_encode = new System.Windows.Forms.ToolStripButton();\r
+ this.btn_stop = new System.Windows.Forms.ToolStripButton();\r
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();\r
+ this.drop_button_queue = new System.Windows.Forms.ToolStripDropDownButton();\r
+ this.mnu_batch = new System.Windows.Forms.ToolStripMenuItem();\r
+ this.mnu_import = new System.Windows.Forms.ToolStripMenuItem();\r
+ this.mnu_export = new System.Windows.Forms.ToolStripMenuItem();\r
this.SaveFile = new System.Windows.Forms.SaveFileDialog();\r
this.list_queue = new System.Windows.Forms.ListView();\r
this.Title = new System.Windows.Forms.ColumnHeader();\r
this.lbl_progressValue = new System.Windows.Forms.ToolStripStatusLabel();\r
this.OpenFile = new System.Windows.Forms.OpenFileDialog();\r
this.pictureBox1 = new System.Windows.Forms.PictureBox();\r
- this.btn_encode = new System.Windows.Forms.ToolStripButton();\r
- this.btn_stop = new System.Windows.Forms.ToolStripButton();\r
- this.drop_button_queue = new System.Windows.Forms.ToolStripDropDownButton();\r
- this.mnu_batch = new System.Windows.Forms.ToolStripMenuItem();\r
- this.mnu_import = new System.Windows.Forms.ToolStripMenuItem();\r
- this.mnu_export = new System.Windows.Forms.ToolStripMenuItem();\r
this.toolStrip1.SuspendLayout();\r
this.statusStrip1.SuspendLayout();\r
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();\r
this.toolStrip1.TabIndex = 71;\r
this.toolStrip1.Text = "toolStrip1";\r
// \r
+ // btn_encode\r
+ // \r
+ this.btn_encode.Image = global::Handbrake.Properties.Resources.Play;\r
+ this.btn_encode.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
+ this.btn_encode.ImageTransparentColor = System.Drawing.Color.Magenta;\r
+ this.btn_encode.Name = "btn_encode";\r
+ this.btn_encode.Padding = new System.Windows.Forms.Padding(5);\r
+ this.btn_encode.Size = new System.Drawing.Size(88, 46);\r
+ this.btn_encode.Text = "Encode";\r
+ this.btn_encode.Click += new System.EventHandler(this.btn_encode_Click);\r
+ // \r
+ // btn_stop\r
+ // \r
+ this.btn_stop.Image = global::Handbrake.Properties.Resources.Pause;\r
+ this.btn_stop.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
+ this.btn_stop.ImageTransparentColor = System.Drawing.Color.Magenta;\r
+ this.btn_stop.Name = "btn_stop";\r
+ this.btn_stop.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never;\r
+ this.btn_stop.Size = new System.Drawing.Size(72, 46);\r
+ this.btn_stop.Text = "Pause";\r
+ this.btn_stop.Visible = false;\r
+ this.btn_stop.Click += new System.EventHandler(this.btn_stop_Click);\r
+ // \r
// toolStripSeparator1\r
// \r
this.toolStripSeparator1.Name = "toolStripSeparator1";\r
this.toolStripSeparator1.Size = new System.Drawing.Size(6, 49);\r
// \r
+ // drop_button_queue\r
+ // \r
+ this.drop_button_queue.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+ this.mnu_batch,\r
+ this.mnu_import,\r
+ this.mnu_export});\r
+ this.drop_button_queue.Image = global::Handbrake.Properties.Resources.ActivityWindow;\r
+ this.drop_button_queue.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
+ this.drop_button_queue.ImageTransparentColor = System.Drawing.Color.Magenta;\r
+ this.drop_button_queue.Name = "drop_button_queue";\r
+ this.drop_button_queue.Size = new System.Drawing.Size(84, 46);\r
+ this.drop_button_queue.Text = "Queue";\r
+ // \r
+ // mnu_batch\r
+ // \r
+ this.mnu_batch.Image = global::Handbrake.Properties.Resources.Output_Small;\r
+ this.mnu_batch.Name = "mnu_batch";\r
+ this.mnu_batch.Size = new System.Drawing.Size(190, 22);\r
+ this.mnu_batch.Text = "Generate Batch Script";\r
+ this.mnu_batch.Click += new System.EventHandler(this.mnu_batch_Click);\r
+ // \r
+ // mnu_import\r
+ // \r
+ this.mnu_import.Image = global::Handbrake.Properties.Resources.folder;\r
+ this.mnu_import.Name = "mnu_import";\r
+ this.mnu_import.Size = new System.Drawing.Size(190, 22);\r
+ this.mnu_import.Text = "Import Queue";\r
+ this.mnu_import.Click += new System.EventHandler(this.mnu_import_Click);\r
+ // \r
+ // mnu_export\r
+ // \r
+ this.mnu_export.Image = global::Handbrake.Properties.Resources.save;\r
+ this.mnu_export.Name = "mnu_export";\r
+ this.mnu_export.Size = new System.Drawing.Size(190, 22);\r
+ this.mnu_export.Text = "Export Queue";\r
+ this.mnu_export.Click += new System.EventHandler(this.mnu_export_Click);\r
+ // \r
// SaveFile\r
// \r
this.SaveFile.Filter = "Batch|.bat";\r
this.pictureBox1.TabIndex = 61;\r
this.pictureBox1.TabStop = false;\r
// \r
- // btn_encode\r
- // \r
- this.btn_encode.Image = global::Handbrake.Properties.Resources.Play;\r
- this.btn_encode.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
- this.btn_encode.ImageTransparentColor = System.Drawing.Color.Magenta;\r
- this.btn_encode.Name = "btn_encode";\r
- this.btn_encode.Padding = new System.Windows.Forms.Padding(5);\r
- this.btn_encode.Size = new System.Drawing.Size(88, 46);\r
- this.btn_encode.Text = "Encode";\r
- this.btn_encode.Click += new System.EventHandler(this.btn_encode_Click);\r
- // \r
- // btn_stop\r
- // \r
- this.btn_stop.Image = global::Handbrake.Properties.Resources.Pause;\r
- this.btn_stop.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
- this.btn_stop.ImageTransparentColor = System.Drawing.Color.Magenta;\r
- this.btn_stop.Name = "btn_stop";\r
- this.btn_stop.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never;\r
- this.btn_stop.Size = new System.Drawing.Size(72, 46);\r
- this.btn_stop.Text = "Pause";\r
- this.btn_stop.Visible = false;\r
- this.btn_stop.Click += new System.EventHandler(this.btn_stop_Click);\r
- // \r
- // drop_button_queue\r
- // \r
- this.drop_button_queue.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
- this.mnu_batch,\r
- this.mnu_import,\r
- this.mnu_export});\r
- this.drop_button_queue.Image = global::Handbrake.Properties.Resources.ActivityWindow;\r
- this.drop_button_queue.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
- this.drop_button_queue.ImageTransparentColor = System.Drawing.Color.Magenta;\r
- this.drop_button_queue.Name = "drop_button_queue";\r
- this.drop_button_queue.Size = new System.Drawing.Size(84, 46);\r
- this.drop_button_queue.Text = "Queue";\r
- // \r
- // mnu_batch\r
- // \r
- this.mnu_batch.Image = global::Handbrake.Properties.Resources.Output_Small;\r
- this.mnu_batch.Name = "mnu_batch";\r
- this.mnu_batch.Size = new System.Drawing.Size(190, 22);\r
- this.mnu_batch.Text = "Generate Batch Script";\r
- this.mnu_batch.Click += new System.EventHandler(this.mnu_batch_Click);\r
- // \r
- // mnu_import\r
- // \r
- this.mnu_import.Image = global::Handbrake.Properties.Resources.folder;\r
- this.mnu_import.Name = "mnu_import";\r
- this.mnu_import.Size = new System.Drawing.Size(190, 22);\r
- this.mnu_import.Text = "Import Queue";\r
- this.mnu_import.Click += new System.EventHandler(this.mnu_import_Click);\r
- // \r
- // mnu_export\r
- // \r
- this.mnu_export.Image = global::Handbrake.Properties.Resources.save;\r
- this.mnu_export.Name = "mnu_export";\r
- this.mnu_export.Size = new System.Drawing.Size(190, 22);\r
- this.mnu_export.Text = "Export Queue";\r
- this.mnu_export.Click += new System.EventHandler(this.mnu_export_Click);\r
- // \r
// frmQueue\r
// \r
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 13F);\r
<value>176, 17</value>\r
</metadata>\r
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
- <value>366, 17</value>\r
+ <value>324, 17</value>\r
</metadata>\r
<metadata name="OpenFile.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
<value>252, 17</value>\r