diff options
Diffstat (limited to 'win')
-rw-r--r-- | win/C#/Controls/Subtitles.Designer.cs | 289 | ||||
-rw-r--r-- | win/C#/Controls/Subtitles.cs | 149 | ||||
-rw-r--r-- | win/C#/Controls/Subtitles.resx | 3 | ||||
-rw-r--r-- | win/C#/Functions/Main.cs | 199 | ||||
-rw-r--r-- | win/C#/Functions/QueryGenerator.cs | 141 | ||||
-rw-r--r-- | win/C#/frmAbout.Designer.cs | 151 | ||||
-rw-r--r-- | win/C#/frmAbout.cs | 5 | ||||
-rw-r--r-- | win/C#/frmMain.Designer.cs | 104 |
8 files changed, 788 insertions, 253 deletions
diff --git a/win/C#/Controls/Subtitles.Designer.cs b/win/C#/Controls/Subtitles.Designer.cs index bb04f06de..bbef36333 100644 --- a/win/C#/Controls/Subtitles.Designer.cs +++ b/win/C#/Controls/Subtitles.Designer.cs @@ -30,7 +30,7 @@ {
this.components = new System.ComponentModel.Container();
this.drp_subtitleTracks = new System.Windows.Forms.ComboBox();
- this.AudioTrackGroup = new System.Windows.Forms.GroupBox();
+ this.SubTitlesGroup = new System.Windows.Forms.GroupBox();
this.label1 = new System.Windows.Forms.Label();
this.check_default = new System.Windows.Forms.CheckBox();
this.check_burned = new System.Windows.Forms.CheckBox();
@@ -43,14 +43,35 @@ this.forced = new System.Windows.Forms.ColumnHeader();
this.burned = new System.Windows.Forms.ColumnHeader();
this.defaultTrack = new System.Windows.Forms.ColumnHeader();
+ this.type = new System.Windows.Forms.ColumnHeader();
+ this.srtOffset = new System.Windows.Forms.ColumnHeader();
this.subMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.mnu_moveup = new System.Windows.Forms.ToolStripMenuItem();
this.mnu_movedown = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.mnu_remove = new System.Windows.Forms.ToolStripMenuItem();
this.label68 = new System.Windows.Forms.Label();
- this.AudioTrackGroup.SuspendLayout();
+ this.tabControl1 = new System.Windows.Forms.TabControl();
+ this.tabPage1 = new System.Windows.Forms.TabPage();
+ this.tabPage2 = new System.Windows.Forms.TabPage();
+ this.SRTGroup = new System.Windows.Forms.GroupBox();
+ this.srt_offset = new System.Windows.Forms.NumericUpDown();
+ this.label5 = new System.Windows.Forms.Label();
+ this.srt_browse = new System.Windows.Forms.Button();
+ this.label4 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.srt_charcode = new System.Windows.Forms.ComboBox();
+ this.label2 = new System.Windows.Forms.Label();
+ this.srt_lang = new System.Windows.Forms.ComboBox();
+ this.btn_srtAdd = new System.Windows.Forms.Button();
+ this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
+ this.SubTitlesGroup.SuspendLayout();
this.subMenu.SuspendLayout();
+ this.tabControl1.SuspendLayout();
+ this.tabPage1.SuspendLayout();
+ this.tabPage2.SuspendLayout();
+ this.SRTGroup.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.srt_offset)).BeginInit();
this.SuspendLayout();
//
// drp_subtitleTracks
@@ -63,21 +84,21 @@ this.drp_subtitleTracks.TabIndex = 50;
this.drp_subtitleTracks.SelectedIndexChanged += new System.EventHandler(this.drp_subtitleTracks_SelectedIndexChanged);
//
- // AudioTrackGroup
- //
- this.AudioTrackGroup.BackColor = System.Drawing.Color.Transparent;
- this.AudioTrackGroup.Controls.Add(this.label1);
- this.AudioTrackGroup.Controls.Add(this.check_default);
- this.AudioTrackGroup.Controls.Add(this.check_burned);
- this.AudioTrackGroup.Controls.Add(this.check_forced);
- this.AudioTrackGroup.Controls.Add(this.drp_subtitleTracks);
- this.AudioTrackGroup.ForeColor = System.Drawing.Color.Black;
- this.AudioTrackGroup.Location = new System.Drawing.Point(16, 32);
- this.AudioTrackGroup.Name = "AudioTrackGroup";
- this.AudioTrackGroup.Size = new System.Drawing.Size(689, 50);
- this.AudioTrackGroup.TabIndex = 71;
- this.AudioTrackGroup.TabStop = false;
- this.AudioTrackGroup.Text = "Selected Track: New Track";
+ // SubTitlesGroup
+ //
+ this.SubTitlesGroup.BackColor = System.Drawing.Color.Transparent;
+ this.SubTitlesGroup.Controls.Add(this.label1);
+ this.SubTitlesGroup.Controls.Add(this.check_default);
+ this.SubTitlesGroup.Controls.Add(this.check_burned);
+ this.SubTitlesGroup.Controls.Add(this.check_forced);
+ this.SubTitlesGroup.Controls.Add(this.drp_subtitleTracks);
+ this.SubTitlesGroup.ForeColor = System.Drawing.Color.Black;
+ this.SubTitlesGroup.Location = new System.Drawing.Point(6, 6);
+ this.SubTitlesGroup.Name = "SubTitlesGroup";
+ this.SubTitlesGroup.Size = new System.Drawing.Size(669, 50);
+ this.SubTitlesGroup.TabIndex = 71;
+ this.SubTitlesGroup.TabStop = false;
+ this.SubTitlesGroup.Text = "Selected Track: New Track";
//
// label1
//
@@ -139,7 +160,7 @@ this.btn_RemoveSubTrack.BackColor = System.Drawing.Color.Transparent;
this.btn_RemoveSubTrack.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_RemoveSubTrack.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_RemoveSubTrack.Location = new System.Drawing.Point(133, 274);
+ this.btn_RemoveSubTrack.Location = new System.Drawing.Point(263, 274);
this.btn_RemoveSubTrack.Name = "btn_RemoveSubTrack";
this.btn_RemoveSubTrack.Size = new System.Drawing.Size(111, 23);
this.btn_RemoveSubTrack.TabIndex = 69;
@@ -154,16 +175,18 @@ this.col_Source,
this.forced,
this.burned,
- this.defaultTrack});
+ this.defaultTrack,
+ this.type,
+ this.srtOffset});
this.lv_subList.ContextMenuStrip = this.subMenu;
this.lv_subList.FullRowSelect = true;
this.lv_subList.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.lv_subList.HideSelection = false;
this.lv_subList.LabelWrap = false;
- this.lv_subList.Location = new System.Drawing.Point(17, 88);
+ this.lv_subList.Location = new System.Drawing.Point(17, 137);
this.lv_subList.MultiSelect = false;
this.lv_subList.Name = "lv_subList";
- this.lv_subList.Size = new System.Drawing.Size(688, 180);
+ this.lv_subList.Size = new System.Drawing.Size(688, 131);
this.lv_subList.TabIndex = 70;
this.lv_subList.UseCompatibleStateImageBehavior = false;
this.lv_subList.View = System.Windows.Forms.View.Details;
@@ -172,12 +195,12 @@ // id
//
this.id.Text = "Track ID";
- this.id.Width = 70;
+ this.id.Width = 65;
//
// col_Source
//
this.col_Source.Text = "Track";
- this.col_Source.Width = 250;
+ this.col_Source.Width = 150;
//
// forced
//
@@ -194,6 +217,16 @@ this.defaultTrack.Text = "Default";
this.defaultTrack.Width = 100;
//
+ // type
+ //
+ this.type.Text = "Type";
+ this.type.Width = 110;
+ //
+ // srtOffset
+ //
+ this.srtOffset.Text = "Srt Offset";
+ this.srtOffset.Width = 70;
+ //
// subMenu
//
this.subMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -242,11 +275,191 @@ this.label68.TabIndex = 67;
this.label68.Text = "Subtitles";
//
+ // tabControl1
+ //
+ this.tabControl1.Controls.Add(this.tabPage1);
+ this.tabControl1.Controls.Add(this.tabPage2);
+ this.tabControl1.Location = new System.Drawing.Point(16, 39);
+ this.tabControl1.Name = "tabControl1";
+ this.tabControl1.SelectedIndex = 0;
+ this.tabControl1.Size = new System.Drawing.Size(689, 92);
+ this.tabControl1.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
+ this.tabControl1.TabIndex = 72;
+ //
+ // tabPage1
+ //
+ this.tabPage1.Controls.Add(this.SubTitlesGroup);
+ this.tabPage1.Location = new System.Drawing.Point(4, 22);
+ this.tabPage1.Name = "tabPage1";
+ this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPage1.Size = new System.Drawing.Size(681, 66);
+ this.tabPage1.TabIndex = 0;
+ this.tabPage1.Text = "Subtitles";
+ this.tabPage1.UseVisualStyleBackColor = true;
+ //
+ // tabPage2
+ //
+ this.tabPage2.Controls.Add(this.SRTGroup);
+ this.tabPage2.Location = new System.Drawing.Point(4, 22);
+ this.tabPage2.Name = "tabPage2";
+ this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPage2.Size = new System.Drawing.Size(681, 66);
+ this.tabPage2.TabIndex = 1;
+ this.tabPage2.Text = "External SRT";
+ this.tabPage2.UseVisualStyleBackColor = true;
+ //
+ // SRTGroup
+ //
+ this.SRTGroup.BackColor = System.Drawing.Color.Transparent;
+ this.SRTGroup.Controls.Add(this.srt_offset);
+ this.SRTGroup.Controls.Add(this.label5);
+ this.SRTGroup.Controls.Add(this.srt_browse);
+ this.SRTGroup.Controls.Add(this.label4);
+ this.SRTGroup.Controls.Add(this.label3);
+ this.SRTGroup.Controls.Add(this.srt_charcode);
+ this.SRTGroup.Controls.Add(this.label2);
+ this.SRTGroup.Controls.Add(this.srt_lang);
+ this.SRTGroup.ForeColor = System.Drawing.Color.Black;
+ this.SRTGroup.Location = new System.Drawing.Point(6, 6);
+ this.SRTGroup.Name = "SRTGroup";
+ this.SRTGroup.Size = new System.Drawing.Size(669, 50);
+ this.SRTGroup.TabIndex = 72;
+ this.SRTGroup.TabStop = false;
+ this.SRTGroup.Text = "Selected Track: New Track";
+ //
+ // srt_offset
+ //
+ this.srt_offset.Location = new System.Drawing.Point(402, 20);
+ this.srt_offset.Name = "srt_offset";
+ this.srt_offset.Size = new System.Drawing.Size(58, 21);
+ this.srt_offset.TabIndex = 79;
+ this.srt_offset.ValueChanged += new System.EventHandler(this.srt_offset_ValueChanged);
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.Location = new System.Drawing.Point(486, 23);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(27, 13);
+ this.label5.TabIndex = 78;
+ this.label5.Text = "File:";
+ //
+ // srt_browse
+ //
+ this.srt_browse.BackColor = System.Drawing.Color.Transparent;
+ this.srt_browse.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.srt_browse.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
+ this.srt_browse.Location = new System.Drawing.Point(519, 18);
+ this.srt_browse.Name = "srt_browse";
+ this.srt_browse.Size = new System.Drawing.Size(111, 23);
+ this.srt_browse.TabIndex = 77;
+ this.srt_browse.Text = "Browse";
+ this.srt_browse.UseVisualStyleBackColor = false;
+ this.srt_browse.Click += new System.EventHandler(this.srt_browse_Click);
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(354, 23);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(42, 13);
+ this.label4.TabIndex = 76;
+ this.label4.Text = "Offset:";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(202, 23);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(62, 13);
+ this.label3.TabIndex = 74;
+ this.label3.Text = "Char Code:";
+ //
+ // srt_charcode
+ //
+ this.srt_charcode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.srt_charcode.FormattingEnabled = true;
+ this.srt_charcode.Items.AddRange(new object[] {
+ "ANSI_X3.4-1968",
+ "ANSI_X3.4-1986",
+ "ANSI_X3.4",
+ "ANSI_X3.110-1983",
+ "ANSI_X3.110",
+ "ASCII",
+ "ECMA-114",
+ "ECMA-118",
+ "ECMA-128",
+ "ECMA-CYRILLIC",
+ "IEC_P27-1",
+ "ISO-8859-1",
+ "ISO-8859-2",
+ "ISO-8859-3",
+ "ISO-8859-4",
+ "ISO-8859-5",
+ "ISO-8859-6",
+ "ISO-8859-7",
+ "ISO-8859-8",
+ "ISO-8859-9",
+ "ISO-8859-9E",
+ "ISO-8859-10",
+ "ISO-8859-11",
+ "ISO-8859-13",
+ "ISO-8859-14",
+ "ISO-8859-15",
+ "ISO-8859-16",
+ "UTF-7",
+ "UTF-8",
+ "UTF-16",
+ "UTF-32"});
+ this.srt_charcode.Location = new System.Drawing.Point(270, 20);
+ this.srt_charcode.Name = "srt_charcode";
+ this.srt_charcode.Size = new System.Drawing.Size(78, 21);
+ this.srt_charcode.TabIndex = 73;
+ this.srt_charcode.SelectedIndexChanged += new System.EventHandler(this.srt_charcode_SelectedIndexChanged);
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Location = new System.Drawing.Point(6, 23);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(58, 13);
+ this.label2.TabIndex = 72;
+ this.label2.Text = "Language:";
+ //
+ // srt_lang
+ //
+ this.srt_lang.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.srt_lang.FormattingEnabled = true;
+ this.srt_lang.Location = new System.Drawing.Point(70, 20);
+ this.srt_lang.Name = "srt_lang";
+ this.srt_lang.Size = new System.Drawing.Size(126, 21);
+ this.srt_lang.TabIndex = 50;
+ this.srt_lang.SelectedIndexChanged += new System.EventHandler(this.srt_lang_SelectedIndexChanged);
+ //
+ // btn_srtAdd
+ //
+ this.btn_srtAdd.BackColor = System.Drawing.Color.Transparent;
+ this.btn_srtAdd.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.btn_srtAdd.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
+ this.btn_srtAdd.Location = new System.Drawing.Point(133, 274);
+ this.btn_srtAdd.Name = "btn_srtAdd";
+ this.btn_srtAdd.Size = new System.Drawing.Size(124, 23);
+ this.btn_srtAdd.TabIndex = 73;
+ this.btn_srtAdd.Text = "Add External SRT";
+ this.btn_srtAdd.UseVisualStyleBackColor = false;
+ this.btn_srtAdd.Click += new System.EventHandler(this.btn_srtAdd_Click);
+ //
+ // openFileDialog
+ //
+ this.openFileDialog.DefaultExt = "srt";
+ this.openFileDialog.Filter = "SRT Files |*.srt";
+ //
// Subtitles
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.Transparent;
- this.Controls.Add(this.AudioTrackGroup);
+ this.Controls.Add(this.btn_srtAdd);
+ this.Controls.Add(this.tabControl1);
this.Controls.Add(this.btn_RemoveSubTrack);
this.Controls.Add(this.lv_subList);
this.Controls.Add(this.label68);
@@ -254,9 +467,15 @@ this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Name = "Subtitles";
this.Size = new System.Drawing.Size(719, 300);
- this.AudioTrackGroup.ResumeLayout(false);
- this.AudioTrackGroup.PerformLayout();
+ this.SubTitlesGroup.ResumeLayout(false);
+ this.SubTitlesGroup.PerformLayout();
this.subMenu.ResumeLayout(false);
+ this.tabControl1.ResumeLayout(false);
+ this.tabPage1.ResumeLayout(false);
+ this.tabPage2.ResumeLayout(false);
+ this.SRTGroup.ResumeLayout(false);
+ this.SRTGroup.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.srt_offset)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -265,7 +484,7 @@ #endregion
internal System.Windows.Forms.ComboBox drp_subtitleTracks;
- private System.Windows.Forms.GroupBox AudioTrackGroup;
+ private System.Windows.Forms.GroupBox SubTitlesGroup;
private System.Windows.Forms.Button btn_RemoveSubTrack;
private System.Windows.Forms.Button btn_addSubTrack;
internal System.Windows.Forms.ListView lv_subList;
@@ -284,5 +503,21 @@ private System.Windows.Forms.ToolStripMenuItem mnu_movedown;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
private System.Windows.Forms.ToolStripMenuItem mnu_remove;
+ internal System.Windows.Forms.TabControl tabControl1;
+ private System.Windows.Forms.TabPage tabPage1;
+ private System.Windows.Forms.TabPage tabPage2;
+ private System.Windows.Forms.Button btn_srtAdd;
+ private System.Windows.Forms.ColumnHeader type;
+ private System.Windows.Forms.ColumnHeader srtOffset;
+ private System.Windows.Forms.GroupBox SRTGroup;
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.Button srt_browse;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.Label label3;
+ internal System.Windows.Forms.ComboBox srt_charcode;
+ private System.Windows.Forms.Label label2;
+ internal System.Windows.Forms.ComboBox srt_lang;
+ private System.Windows.Forms.NumericUpDown srt_offset;
+ private System.Windows.Forms.OpenFileDialog openFileDialog;
}
}
diff --git a/win/C#/Controls/Subtitles.cs b/win/C#/Controls/Subtitles.cs index 9358a7942..c4068fa3d 100644 --- a/win/C#/Controls/Subtitles.cs +++ b/win/C#/Controls/Subtitles.cs @@ -1,15 +1,26 @@ using System;
+using System.Collections.Generic;
using System.Windows.Forms;
+using Handbrake.Functions;
+using System.IO;
namespace Handbrake.Controls
{
public partial class Subtitles : UserControl
{
+ IDictionary<string, string> LangMap = new Dictionary<string, string>();
+
public Subtitles()
{
InitializeComponent();
+ LangMap = Main.mapLanguages();
+ foreach (string key in LangMap.Keys)
+ srt_lang.Items.Add(key);
+
+ srt_charcode.SelectedIndex = 28;
+ srt_lang.SelectedIndex = 40;
}
private int fileContainer;
@@ -55,22 +66,28 @@ namespace Handbrake.Controls }
Boolean addTrack = true;
- if (fileContainer == 0 || fileContainer == 1)
+ if (fileContainer == 0)
{
burnedVal = "Yes"; // MP4 must have bitmap subs burned in.
// Make sure we only have 1 bitmap track.
- if (drp_subtitleTracks.SelectedItem.ToString().Contains("Bitmap"))
- foreach (ListViewItem item in lv_subList.Items)
- {
- if (item.SubItems[1].Text.Contains("Bitmap"))
+ if (drp_subtitleTracks.SelectedItem != null)
+ {
+ if (drp_subtitleTracks.SelectedItem.ToString().Contains("Bitmap"))
+ foreach (ListViewItem item in lv_subList.Items)
{
- MessageBox.Show(this,
- "More than one vobsub is not supported in mp4... Your first vobsub track will now be used.",
- "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- addTrack = false;
+ if (item.SubItems[1].Text.Contains("Bitmap"))
+ {
+ MessageBox.Show(this,
+ "More than one vobsub is not supported in mp4... Your first vobsub track will now be used.",
+ "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ addTrack = false;
+ }
}
- }
+ }
+ else
+ addTrack = false;
+
}
// Add the track if allowed.
@@ -86,6 +103,23 @@ namespace Handbrake.Controls lv_subList.Items.Add(newTrack);
}
}
+ private void btn_srtAdd_Click(object sender, EventArgs e)
+ {
+ ListViewItem newTrack = new ListViewItem(getNewID().ToString());
+
+ newTrack.SubItems.Add(srt_lang.SelectedItem + ", (" + srt_charcode.SelectedItem + ")");
+ newTrack.SubItems.Add("No");
+ newTrack.SubItems.Add("No");
+ newTrack.SubItems.Add("No");
+ if (openFileDialog.FileName != null)
+ newTrack.SubItems.Add(openFileDialog.FileName);
+ else
+ newTrack.SubItems.Add("None");
+
+ newTrack.SubItems.Add(srt_offset.Value.ToString());
+
+ lv_subList.Items.Add(newTrack);
+ }
private void btn_RemoveSubTrack_Click(object sender, EventArgs e)
{
removeTrack();
@@ -95,36 +129,48 @@ namespace Handbrake.Controls // Set the dropdown controls based on the selected item in the List.
if (lv_subList.Items.Count != 0 && lv_subList.SelectedIndices.Count != 0)
{
- // Reset the checkboxes
- check_forced.CheckState = CheckState.Unchecked;
- check_burned.CheckState = CheckState.Unchecked;
- check_default.CheckState = CheckState.Unchecked;
-
- // Setup the controls
- int c = 0;
- foreach (var item in drp_subtitleTracks.Items)
+ if (lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems.Count != 5) // We have an SRT
{
- if (item.ToString() == lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[1].Text)
- drp_subtitleTracks.SelectedIndex = c;
- c++;
- }
- drp_subtitleTracks.SelectedItem = lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[1];
+ string[] trackData = lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[1].Text.Split(',');
+ string charCode = trackData[1].Replace("(", "").Replace(")", "");
+ srt_lang.SelectedItem = trackData[0];
+ srt_charcode.SelectedItem = charCode.Trim();
- if (lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[2].Text == "Yes")
- check_forced.CheckState = CheckState.Checked;
+ int offsetVal;
+ int.TryParse(lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[6].Text, out offsetVal);
+ srt_offset.Value = offsetVal;
- if (lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[3].Text == "Yes")
- check_burned.CheckState = CheckState.Checked;
+ SRTGroup.Text = "Selected Track: " + lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[0].Text;
+ SubTitlesGroup.Text = "Selected Track: None";
+ }
+ else // We have Bitmap/CC
+ {
+ // Setup the controls
+ int c = 0;
+ foreach (var item in drp_subtitleTracks.Items)
+ {
+ if (item.ToString() == lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[1].Text)
+ drp_subtitleTracks.SelectedIndex = c;
+ c++;
+ }
+ drp_subtitleTracks.SelectedItem = lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[1];
- if (lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[4].Text == "Yes")
- check_default.CheckState = CheckState.Checked;
+ check_forced.CheckState = lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[2].Text == "Yes" ? CheckState.Checked : CheckState.Unchecked;
+ check_burned.CheckState = lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[3].Text == "Yes" ? CheckState.Checked : CheckState.Unchecked;
+ check_default.CheckState = lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[4].Text == "Yes" ? CheckState.Checked : CheckState.Unchecked;
- AudioTrackGroup.Text = "Selected Track: " + lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[0].Text;
+ SubTitlesGroup.Text = "Selected Track: " + lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[0].Text;
+ SRTGroup.Text = "Selected Track: None";
+ }
}
else
- AudioTrackGroup.Text = "Selected Track: None (Click \"Add Track\" to add)";
+ {
+ SubTitlesGroup.Text = "Selected Track: None (Click \"Add Track\" to add)";
+ SRTGroup.Text = "Selected Track: None (Click \"Add External SRT\" to add) ";
+ }
}
+ // Bitmap / CC Controls
private void drp_subtitleTracks_SelectedIndexChanged(object sender, EventArgs e)
{
// Update an item in the list if required.
@@ -167,7 +213,45 @@ namespace Handbrake.Controls lv_subList.Select();
}
}
-
+
+ // SRT Controls
+ private void srt_offset_ValueChanged(object sender, EventArgs e)
+ {
+ // Update an item in the list if required.
+ if (lv_subList.Items.Count != 0 && lv_subList.SelectedIndices.Count != 0)
+ {
+ lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[6].Text = srt_offset.Value.ToString();
+ lv_subList.Select();
+ }
+ }
+ private void srt_charcode_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ // Update an item in the list if required.
+ if (lv_subList.Items.Count != 0 && lv_subList.SelectedIndices.Count != 0)
+ {
+ string[] trackData = lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[1].Text.Split(',');
+
+ lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[1].Text = trackData[0].Trim() + ", (" + srt_charcode.SelectedItem + ")";
+ lv_subList.Select();
+ }
+ }
+ private void srt_lang_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ // Update an item in the list if required.
+ if (lv_subList.Items.Count != 0 && lv_subList.SelectedIndices.Count != 0)
+ {
+ string[] trackData = lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[1].Text.Split(',');
+ string charCode = trackData[1].Replace("(", "").Replace(")", "").Trim();
+
+ lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[1].Text = srt_lang.SelectedItem + ", (" + charCode + ")";
+ lv_subList.Select();
+ }
+ }
+ private void srt_browse_Click(object sender, EventArgs e)
+ {
+ openFileDialog.ShowDialog();
+ }
+
// Right Click Menu
private void mnu_moveup_Click(object sender, EventArgs e)
{
@@ -265,5 +349,6 @@ namespace Handbrake.Controls i++;
}
}
+
}
}
diff --git a/win/C#/Controls/Subtitles.resx b/win/C#/Controls/Subtitles.resx index 4a57b1229..a13cf9f6f 100644 --- a/win/C#/Controls/Subtitles.resx +++ b/win/C#/Controls/Subtitles.resx @@ -120,4 +120,7 @@ <metadata name="subMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
+ <metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>113, 17</value>
+ </metadata>
</root>
\ No newline at end of file diff --git a/win/C#/Functions/Main.cs b/win/C#/Functions/Main.cs index d2e136a91..54ef9d45f 100644 --- a/win/C#/Functions/Main.cs +++ b/win/C#/Functions/Main.cs @@ -427,5 +427,204 @@ namespace Handbrake.Functions public bool CompletedSynchronously { get { throw new NotImplementedException(); } }
public bool IsCompleted { get { throw new NotImplementedException(); } }
}
+
+ /// <summary>
+ /// Map languages and their iso639_2 value into a IDictionary
+ /// </summary>
+ /// <returns></returns>
+ public static IDictionary<string, string> mapLanguages()
+ {
+ IDictionary<string, string> languageMap = new Dictionary<string, string>
+ {
+ {"Any", "und"},
+ {"Afar", "aar"},
+ {"Abkhazian", "abk"},
+ {"Afrikaans", "afr"},
+ {"Akan", "aka"},
+ {"Albanian", "sqi"},
+ {"Amharic", "amh"},
+ {"Arabic", "ara"},
+ {"Aragonese", "arg"},
+ {"Armenian", "hye"},
+ {"Assamese", "asm"},
+ {"Avaric", "ava"},
+ {"Avestan", "ave"},
+ {"Aymara", "aym"},
+ {"Azerbaijani", "aze"},
+ {"Bashkir", "bak"},
+ {"Bambara", "bam"},
+ {"Basque", "eus"},
+ {"Belarusian", "bel"},
+ {"Bengali", "ben"},
+ {"Bihari", "bih"},
+ {"Bislama", "bis"},
+ {"Bosnian", "bos"},
+ {"Breton", "bre"},
+ {"Bulgarian", "bul"},
+ {"Burmese", "mya"},
+ {"Catalan", "cat"},
+ {"Chamorro", "cha"},
+ {"Chechen", "che"},
+ {"Chinese", "zho"},
+ {"Church Slavic", "chu"},
+ {"Chuvash", "chv"},
+ {"Cornish", "cor"},
+ {"Corsican", "cos"},
+ {"Cree", "cre"},
+ {"Czech", "ces"},
+ {"Danish", "dan"},
+ {"Divehi", "div"},
+ {"Dutch", "nld"},
+ {"Dzongkha", "dzo"},
+ {"English", "eng"},
+ {"Esperanto", "epo"},
+ {"Estonian", "est"},
+ {"Ewe", "ewe"},
+ {"Faroese", "fao"},
+ {"Fijian", "fij"},
+ {"Finnish", "fin"},
+ {"French", "fra"},
+ {"Western Frisian", "fry"},
+ {"Fulah", "ful"},
+ {"Georgian", "kat"},
+ {"German", "deu"},
+ {"Gaelic (Scots)", "gla"},
+ {"Irish", "gle"},
+ {"Galician", "glg"},
+ {"Manx", "glv"},
+ {"Greek Modern", "ell"},
+ {"Guarani", "grn"},
+ {"Gujarati", "guj"},
+ {"Haitian", "hat"},
+ {"Hausa", "hau"},
+ {"Hebrew", "heb"},
+ {"Herero", "her"},
+ {"Hindi", "hin"},
+ {"Hiri Motu", "hmo"},
+ {"Hungarian", "hun"},
+ {"Igbo", "ibo"},
+ {"Icelandic", "isl"},
+ {"Ido", "ido"},
+ {"Sichuan Yi", "iii"},
+ {"Inuktitut", "iku"},
+ {"Interlingue", "ile"},
+ {"Interlingua", "ina"},
+ {"Indonesian", "ind"},
+ {"Inupiaq", "ipk"},
+ {"Italian", "ita"},
+ {"Javanese", "jav"},
+ {"Japanese", "jpn"},
+ {"Kalaallisut", "kal"},
+ {"Kannada", "kan"},
+ {"Kashmiri", "kas"},
+ {"Kanuri", "kau"},
+ {"Kazakh", "kaz"},
+ {"Central Khmer", "khm"},
+ {"Kikuyu", "kik"},
+ {"Kinyarwanda", "kin"},
+ {"Kirghiz", "kir"},
+ {"Komi", "kom"},
+ {"Kongo", "kon"},
+ {"Korean", "kor"},
+ {"Kuanyama", "kua"},
+ {"Kurdish", "kur"},
+ {"Lao", "lao"},
+ {"Latin", "lat"},
+ {"Latvian", "lav"},
+ {"Limburgan", "lim"},
+ {"Lingala", "lin"},
+ {"Lithuanian", "lit"},
+ {"Luxembourgish", "ltz"},
+ {"Luba-Katanga", "lub"},
+ {"Ganda", "lug"},
+ {"Macedonian", "mkd"},
+ {"Marshallese", "mah"},
+ {"Malayalam", "mal"},
+ {"Maori", "mri"},
+ {"Marathi", "mar"},
+ {"Malay", "msa"},
+ {"Malagasy", "mlg"},
+ {"Maltese", "mlt"},
+ {"Moldavian", "mol"},
+ {"Mongolian", "mon"},
+ {"Nauru", "nau"},
+ {"Navajo", "nav"},
+ {"Ndebele, South", "nbl"},
+ {"Ndebele, North", "nde"},
+ {"Ndonga", "ndo"},
+ {"Nepali", "nep"},
+ {"Norwegian Nynorsk", "nno"},
+ {"Norwegian Bokm�l", "nob"},
+ {"Norwegian", "nor"},
+ {"Chichewa; Nyanja", "nya"},
+ {"Occitan", "oci"},
+ {"Ojibwa", "oji"},
+ {"Oriya", "ori"},
+ {"Oromo", "orm"},
+ {"Ossetian", "oss"},
+ {"Panjabi", "pan"},
+ {"Persian", "fas"},
+ {"Pali", "pli"},
+ {"Polish", "pol"},
+ {"Portuguese", "por"},
+ {"Pushto", "pus"},
+ {"Quechua", "que"},
+ {"Romansh", "roh"},
+ {"Romanian", "ron"},
+ {"Rundi", "run"},
+ {"Russian", "rus"},
+ {"Sango", "sag"},
+ {"Sanskrit", "san"},
+ {"Serbian", "srp"},
+ {"Croatian", "hrv"},
+ {"Sinhala", "sin"},
+ {"Slovak", "slk"},
+ {"Slovenian", "slv"},
+ {"Northern Sami", "sme"},
+ {"Samoan", "smo"},
+ {"Shona", "sna"},
+ {"Sindhi", "snd"},
+ {"Somali", "som"},
+ {"Sotho Southern", "sot"},
+ {"Spanish", "spa"},
+ {"Sardinian", "srd"},
+ {"Swati", "ssw"},
+ {"Sundanese", "sun"},
+ {"Swahili", "swa"},
+ {"Swedish", "swe"},
+ {"Tahitian", "tah"},
+ {"Tamil", "tam"},
+ {"Tatar", "tat"},
+ {"Telugu", "tel"},
+ {"Tajik", "tgk"},
+ {"Tagalog", "tgl"},
+ {"Thai", "tha"},
+ {"Tibetan", "bod"},
+ {"Tigrinya", "tir"},
+ {"Tonga", "ton"},
+ {"Tswana", "tsn"},
+ {"Tsonga", "tso"},
+ {"Turkmen", "tuk"},
+ {"Turkish", "tur"},
+ {"Twi", "twi"},
+ {"Uighur", "uig"},
+ {"Ukrainian", "ukr"},
+ {"Urdu", "urd"},
+ {"Uzbek", "uzb"},
+ {"Venda", "ven"},
+ {"Vietnamese", "vie"},
+ {"Volap�k", "vol"},
+ {"Welsh", "cym"},
+ {"Walloon", "wln"},
+ {"Wolof", "wol"},
+ {"Xhosa", "xho"},
+ {"Yiddish", "yid"},
+ {"Yoruba", "yor"},
+ {"Zhuang", "zha"},
+ {"Zulu", "zul"}
+ };
+ return languageMap;
+ }
+
}
}
diff --git a/win/C#/Functions/QueryGenerator.cs b/win/C#/Functions/QueryGenerator.cs index b5e9cc048..981e2641b 100644 --- a/win/C#/Functions/QueryGenerator.cs +++ b/win/C#/Functions/QueryGenerator.cs @@ -185,7 +185,7 @@ namespace Handbrake.Functions #endregion
#region Filters
- query += mainWindow.Filters.getCLIQuery;
+ query += mainWindow.Filters.getCLIQuery;
#endregion
#region Video Settings Tab
@@ -383,72 +383,111 @@ namespace Handbrake.Functions #endregion
#region Subtitles Tab
-
if (mainWindow.Subtitles.lv_subList.Items.Count != 0) // If we have subtitle tracks
{
- // Find --subtitle <string>
- query += " --subtitle ";
- String subtitleTracks = "";
- String itemToAdd;
- foreach (ListViewItem item in mainWindow.Subtitles.lv_subList.Items)
- {
- if (item.SubItems[1].Text.Contains("Foreign Audio Search"))
- itemToAdd = "scan";
- else
- {
- string[] tempSub = item.SubItems[1].Text.Split(' ');
- itemToAdd = tempSub[0];
- }
+ IDictionary<string, string> langMap = Main.mapLanguages();
- subtitleTracks += subtitleTracks == "" ? itemToAdd : "," + itemToAdd;
- }
- query += subtitleTracks;
+ // BitMap and CC's
+ string subtitleTracks = String.Empty;
+ string subtitleForced = String.Empty;
+ string subtitleBurn = String.Empty;
+ string subtitleDefault = String.Empty;
+ // SRT
+ string srtFile = String.Empty;
+ string srtCodeset = String.Empty;
+ string srtOffset = String.Empty;
+ string srtLang = String.Empty;
- // Find --subtitle-forced
- String forcedTrack = "";
foreach (ListViewItem item in mainWindow.Subtitles.lv_subList.Items)
{
- itemToAdd = "";
- string[] tempSub = item.SubItems[1].Text.Split(' ');
- string trackID = tempSub[0];
-
- if (item.SubItems[2].Text == "Yes")
- itemToAdd = trackID;
-
- if (itemToAdd != "")
- forcedTrack += forcedTrack == "" ? itemToAdd : "," + itemToAdd;
- }
- if (forcedTrack != "")
- query += " --subtitle-forced " + forcedTrack;
-
+ string itemToAdd, trackID;
- // Find --subtitle-burn and --subtitle-default
- String burned = "";
- String defaultTrack = "";
- foreach (ListViewItem item in mainWindow.Subtitles.lv_subList.Items)
- {
- string[] tempSub = item.SubItems[1].Text.Split(' ');
- string trackID = tempSub[0];
+ if (item.SubItems.Count != 5) // We have an SRT file
+ {
+ string[] trackData = item.SubItems[1].Text.Split(',');
+ if (trackData != null)
+ {
+ string charCode = trackData[1].Replace("(", "").Replace(")", "").Trim();
+ string realLangCode = langMap[trackData[0].Trim()];
- if (trackID.Trim() == "Foreign")
- trackID = "scan";
+ srtLang += srtLang == "" ? realLangCode : "," + realLangCode;
+ srtCodeset += srtCodeset == "" ? charCode : "," + charCode;
+ }
- if (item.SubItems[3].Text == "Yes") // Burned
- burned = trackID;
+ itemToAdd = item.SubItems[5].Text;
+ srtFile += srtFile == "" ? itemToAdd : "," + itemToAdd;
- if (item.SubItems[4].Text == "Yes") // Burned
- defaultTrack = trackID;
+ itemToAdd = item.SubItems[6].Text;
+ srtOffset += srtOffset == "" ? itemToAdd : "," + itemToAdd;
+ }
+ else // We have Bitmap or CC
+ {
+ string[] tempSub;
+
+ // Find --subtitle <string>
+ if (item.SubItems[1].Text.Contains("Foreign Audio Search"))
+ itemToAdd = "scan";
+ else
+ {
+ tempSub = item.SubItems[1].Text.Split(' ');
+ itemToAdd = tempSub[0];
+ }
+
+ subtitleTracks += subtitleTracks == "" ? itemToAdd : "," + itemToAdd;
+
+ // Find --subtitle-forced
+ itemToAdd = "";
+ tempSub = item.SubItems[1].Text.Split(' ');
+ trackID = tempSub[0];
+
+ if (item.SubItems[2].Text == "Yes")
+ itemToAdd = trackID;
+
+ if (itemToAdd != "")
+ subtitleForced += subtitleForced == "" ? itemToAdd : "," + itemToAdd;
+
+ // Find --subtitle-burn and --subtitle-default
+ tempSub = item.SubItems[1].Text.Split(' ');
+ trackID = tempSub[0];
+
+ if (trackID.Trim() == "Foreign")
+ trackID = "scan";
+
+ if (item.SubItems[3].Text == "Yes") // burn
+ subtitleBurn = trackID;
+
+ if (item.SubItems[4].Text == "Yes") // default
+ subtitleDefault = trackID;
+ }
+ }
+ // Build The CLI Subtitles Query
+ if (subtitleTracks != "")
+ {
+ query += " --subtitle " + subtitleTracks;
+
+ if (subtitleForced != "")
+ query += " --subtitle-forced " + subtitleForced;
+ if (subtitleBurn != "")
+ query += " --subtitle-burn " + subtitleBurn;
+ if (subtitleDefault != "")
+ query += " --subtitle-default " + subtitleDefault;
}
- if (burned != "")
- query += " --subtitle-burn " + burned;
- if (defaultTrack != "")
- query += " --subtitle-default " + defaultTrack;
+ if (srtFile != "") // SRTs
+ {
+ query += " --srt-file " + srtFile;
+
+ if (srtCodeset != "")
+ query += " --srt-codeset " + srtCodeset;
+ if (srtOffset != "")
+ query += " --srt-offset " + srtOffset;
+ if (srtLang != "")
+ query += " --srt-lang " + srtLang;
+ }
}
-
#endregion
#region Chapter Markers
diff --git a/win/C#/frmAbout.Designer.cs b/win/C#/frmAbout.Designer.cs index ab56957ca..887ad7d2d 100644 --- a/win/C#/frmAbout.Designer.cs +++ b/win/C#/frmAbout.Designer.cs @@ -35,112 +35,87 @@ namespace Handbrake private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmAbout));
- this.Label4 = new System.Windows.Forms.Label();
- this.btn_close = new System.Windows.Forms.Button();
- this.Version = new System.Windows.Forms.Label();
this.Label3 = new System.Windows.Forms.Label();
+ this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
+ this.label1 = new System.Windows.Forms.Label();
+ this.lbl_HBBuild = new System.Windows.Forms.Label();
this.PictureBox1 = new System.Windows.Forms.PictureBox();
- this.label5 = new System.Windows.Forms.Label();
- this.lbl_build = new System.Windows.Forms.Label();
- this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).BeginInit();
this.SuspendLayout();
//
- // Label4
- //
- this.Label4.AutoSize = true;
- this.Label4.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.Label4.Location = new System.Drawing.Point(168, 58);
- this.Label4.Name = "Label4";
- this.Label4.Size = new System.Drawing.Size(346, 26);
- this.Label4.TabIndex = 28;
- this.Label4.Text = "HandBrake is a GPL-licensed, multiplatform, multithreaded \r\nvideo transcoder. ";
- //
- // btn_close
- //
- this.btn_close.FlatAppearance.BorderColor = System.Drawing.Color.Black;
- this.btn_close.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.btn_close.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_close.Location = new System.Drawing.Point(402, 114);
- this.btn_close.Name = "btn_close";
- this.btn_close.Size = new System.Drawing.Size(115, 22);
- this.btn_close.TabIndex = 27;
- this.btn_close.Text = "Close";
- this.btn_close.UseVisualStyleBackColor = true;
- this.btn_close.Click += new System.EventHandler(this.btn_close_Click);
- //
- // Version
- //
- this.Version.AutoSize = true;
- this.Version.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.Version.Location = new System.Drawing.Point(266, 13);
- this.Version.Name = "Version";
- this.Version.Size = new System.Drawing.Size(72, 13);
- this.Version.TabIndex = 26;
- this.Version.Text = "{Version}";
- //
// Label3
//
this.Label3.AutoSize = true;
- this.Label3.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.Label3.Location = new System.Drawing.Point(168, 13);
+ this.Label3.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.Label3.Font = new System.Drawing.Font("Verdana", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.Label3.Location = new System.Drawing.Point(3, 23);
this.Label3.Name = "Label3";
- this.Label3.Size = new System.Drawing.Size(78, 13);
+ this.Label3.Size = new System.Drawing.Size(325, 18);
this.Label3.TabIndex = 25;
this.Label3.Text = "HandBrake";
+ this.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // tableLayoutPanel1
+ //
+ this.tableLayoutPanel1.ColumnCount = 1;
+ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
+ this.tableLayoutPanel1.Controls.Add(this.label1, 0, 2);
+ this.tableLayoutPanel1.Controls.Add(this.lbl_HBBuild, 0, 1);
+ this.tableLayoutPanel1.Controls.Add(this.Label3, 0, 0);
+ this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 83);
+ this.tableLayoutPanel1.Name = "tableLayoutPanel1";
+ this.tableLayoutPanel1.RowCount = 4;
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 69.44444F));
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 30.55556F));
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
+ this.tableLayoutPanel1.Size = new System.Drawing.Size(331, 100);
+ this.tableLayoutPanel1.TabIndex = 32;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.label1.Location = new System.Drawing.Point(3, 66);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(325, 13);
+ this.label1.TabIndex = 33;
+ this.label1.Text = "(C) 2003-2009, HandBrake Developers";
+ this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // lbl_HBBuild
+ //
+ this.lbl_HBBuild.AutoSize = true;
+ this.lbl_HBBuild.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.lbl_HBBuild.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lbl_HBBuild.Location = new System.Drawing.Point(3, 46);
+ this.lbl_HBBuild.Name = "lbl_HBBuild";
+ this.lbl_HBBuild.Size = new System.Drawing.Size(325, 13);
+ this.lbl_HBBuild.TabIndex = 32;
+ this.lbl_HBBuild.Text = "{Version}";
+ this.lbl_HBBuild.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// PictureBox1
//
+ this.PictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.PictureBox1.Image = global::Handbrake.Properties.Resources.logo128;
this.PictureBox1.InitialImage = null;
- this.PictureBox1.Location = new System.Drawing.Point(8, 8);
+ this.PictureBox1.Location = new System.Drawing.Point(120, 12);
this.PictureBox1.Name = "PictureBox1";
- this.PictureBox1.Size = new System.Drawing.Size(153, 132);
- this.PictureBox1.TabIndex = 23;
+ this.PictureBox1.Size = new System.Drawing.Size(84, 84);
+ this.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
+ this.PictureBox1.TabIndex = 33;
this.PictureBox1.TabStop = false;
//
- // label5
- //
- this.label5.AutoSize = true;
- this.label5.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label5.Location = new System.Drawing.Point(168, 30);
- this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(40, 13);
- this.label5.TabIndex = 29;
- this.label5.Text = "Build:";
- //
- // lbl_build
- //
- this.lbl_build.AutoSize = true;
- this.lbl_build.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.lbl_build.Location = new System.Drawing.Point(266, 30);
- this.lbl_build.Name = "lbl_build";
- this.lbl_build.Size = new System.Drawing.Size(64, 13);
- this.lbl_build.TabIndex = 30;
- this.lbl_build.Text = "{Version}";
- //
- // groupBox1
- //
- this.groupBox1.Location = new System.Drawing.Point(171, 45);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(346, 10);
- this.groupBox1.TabIndex = 31;
- this.groupBox1.TabStop = false;
- //
// frmAbout
//
- this.AcceptButton = this.btn_close;
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(530, 148);
- this.Controls.Add(this.groupBox1);
- this.Controls.Add(this.lbl_build);
- this.Controls.Add(this.label5);
- this.Controls.Add(this.Label4);
- this.Controls.Add(this.btn_close);
- this.Controls.Add(this.Version);
- this.Controls.Add(this.Label3);
+ this.ClientSize = new System.Drawing.Size(331, 183);
this.Controls.Add(this.PictureBox1);
+ this.Controls.Add(this.tableLayoutPanel1);
this.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
@@ -149,21 +124,19 @@ namespace Handbrake this.Name = "frmAbout";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "About HandBrake";
+ this.tableLayoutPanel1.ResumeLayout(false);
+ this.tableLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).EndInit();
this.ResumeLayout(false);
- this.PerformLayout();
}
#endregion
- internal System.Windows.Forms.Label Label4;
- internal System.Windows.Forms.Button btn_close;
- internal System.Windows.Forms.Label Version;
internal System.Windows.Forms.Label Label3;
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
+ internal System.Windows.Forms.Label label1;
+ internal System.Windows.Forms.Label lbl_HBBuild;
internal System.Windows.Forms.PictureBox PictureBox1;
- internal System.Windows.Forms.Label label5;
- internal System.Windows.Forms.Label lbl_build;
- private System.Windows.Forms.GroupBox groupBox1;
}
}
\ No newline at end of file diff --git a/win/C#/frmAbout.cs b/win/C#/frmAbout.cs index efc503b80..e43706f73 100644 --- a/win/C#/frmAbout.cs +++ b/win/C#/frmAbout.cs @@ -14,13 +14,14 @@ namespace Handbrake public frmAbout()
{
InitializeComponent();
- Version.Text = Properties.Settings.Default.hb_version;
- lbl_build.Text = Properties.Settings.Default.hb_build.ToString();
+ lbl_HBBuild.Text = Properties.Settings.Default.hb_version + " " + Properties.Settings.Default.hb_build;
}
private void btn_close_Click(object sender, EventArgs e)
{
this.Close();
}
+
+
}
}
\ No newline at end of file diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs index 29a0f87d2..5dc3b88a3 100644 --- a/win/C#/frmMain.Designer.cs +++ b/win/C#/frmMain.Designer.cs @@ -96,6 +96,7 @@ namespace Handbrake this.Label47 = new System.Windows.Forms.Label();
this.Label3 = new System.Windows.Forms.Label();
this.tab_audio = new System.Windows.Forms.TabPage();
+ this.AudioSettings = new Handbrake.Controls.AudioPanel();
this.AudioMenuRowHeightHack = new System.Windows.Forms.ImageList(this.components);
this.tab_video = new System.Windows.Forms.TabPage();
this.radio_cq = new System.Windows.Forms.RadioButton();
@@ -107,13 +108,17 @@ namespace Handbrake this.SliderValue = new System.Windows.Forms.Label();
this.Label46 = new System.Windows.Forms.Label();
this.tab_picture = new System.Windows.Forms.TabPage();
+ this.PictureSettings = new Handbrake.Controls.PictureSettings();
this.Check_ChapterMarkers = new System.Windows.Forms.CheckBox();
this.tabs_panel = new System.Windows.Forms.TabControl();
this.tab_filters = new System.Windows.Forms.TabPage();
+ this.Filters = new Handbrake.Controls.Filters();
this.tab_subtitles = new System.Windows.Forms.TabPage();
+ this.Subtitles = new Handbrake.Controls.Subtitles();
this.tab_chapters = new System.Windows.Forms.TabPage();
this.label31 = new System.Windows.Forms.Label();
this.tab_advanced = new System.Windows.Forms.TabPage();
+ this.x264Panel = new Handbrake.Controls.x264Panel();
this.tab_query = new System.Windows.Forms.TabPage();
this.btn_clear = new System.Windows.Forms.Button();
this.label34 = new System.Windows.Forms.Label();
@@ -162,11 +167,6 @@ namespace Handbrake this.labelSource = new System.Windows.Forms.Label();
this.labelStaticDestination = new System.Windows.Forms.Label();
this.labelPreset = new System.Windows.Forms.Label();
- this.PictureSettings = new Handbrake.Controls.PictureSettings();
- this.Filters = new Handbrake.Controls.Filters();
- this.AudioSettings = new Handbrake.Controls.AudioPanel();
- this.Subtitles = new Handbrake.Controls.Subtitles();
- this.x264Panel = new Handbrake.Controls.x264Panel();
notifyIconMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
notifyIconMenu.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.slider_videoQuality)).BeginInit();
@@ -749,6 +749,15 @@ namespace Handbrake this.tab_audio.Text = "Audio";
this.tab_audio.UseVisualStyleBackColor = true;
//
+ // AudioSettings
+ //
+ this.AudioSettings.BackColor = System.Drawing.Color.Transparent;
+ this.AudioSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.AudioSettings.Location = new System.Drawing.Point(0, 0);
+ this.AudioSettings.Name = "AudioSettings";
+ this.AudioSettings.Size = new System.Drawing.Size(715, 310);
+ this.AudioSettings.TabIndex = 0;
+ //
// AudioMenuRowHeightHack
//
this.AudioMenuRowHeightHack.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
@@ -885,6 +894,15 @@ namespace Handbrake this.tab_picture.Text = "Picture Settings";
this.tab_picture.UseVisualStyleBackColor = true;
//
+ // PictureSettings
+ //
+ this.PictureSettings.BackColor = System.Drawing.Color.Transparent;
+ this.PictureSettings.Font = new System.Drawing.Font("Tahoma", 8.25F);
+ this.PictureSettings.Location = new System.Drawing.Point(0, 0);
+ this.PictureSettings.Name = "PictureSettings";
+ this.PictureSettings.Size = new System.Drawing.Size(713, 310);
+ this.PictureSettings.TabIndex = 0;
+ //
// Check_ChapterMarkers
//
this.Check_ChapterMarkers.AutoSize = true;
@@ -924,6 +942,15 @@ namespace Handbrake this.tab_filters.Text = "Video Filters";
this.tab_filters.UseVisualStyleBackColor = true;
//
+ // Filters
+ //
+ this.Filters.BackColor = System.Drawing.Color.Transparent;
+ this.Filters.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.Filters.Location = new System.Drawing.Point(0, 0);
+ this.Filters.Name = "Filters";
+ this.Filters.Size = new System.Drawing.Size(713, 310);
+ this.Filters.TabIndex = 0;
+ //
// tab_subtitles
//
this.tab_subtitles.Controls.Add(this.Subtitles);
@@ -935,6 +962,15 @@ namespace Handbrake this.tab_subtitles.Text = "Subtitles";
this.tab_subtitles.UseVisualStyleBackColor = true;
//
+ // Subtitles
+ //
+ this.Subtitles.BackColor = System.Drawing.Color.Transparent;
+ this.Subtitles.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.Subtitles.Location = new System.Drawing.Point(0, 0);
+ this.Subtitles.Name = "Subtitles";
+ this.Subtitles.Size = new System.Drawing.Size(722, 310);
+ this.Subtitles.TabIndex = 0;
+ //
// tab_chapters
//
this.tab_chapters.BackColor = System.Drawing.Color.Transparent;
@@ -971,6 +1007,16 @@ namespace Handbrake this.tab_advanced.Text = "Advanced";
this.tab_advanced.UseVisualStyleBackColor = true;
//
+ // x264Panel
+ //
+ this.x264Panel.BackColor = System.Drawing.Color.Transparent;
+ this.x264Panel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.x264Panel.Location = new System.Drawing.Point(0, 0);
+ this.x264Panel.Name = "x264Panel";
+ this.x264Panel.Size = new System.Drawing.Size(720, 306);
+ this.x264Panel.TabIndex = 0;
+ this.x264Panel.x264Query = "";
+ //
// tab_query
//
this.tab_query.Controls.Add(this.btn_clear);
@@ -1247,7 +1293,7 @@ namespace Handbrake //
// tb_preview
//
- this.tb_preview.Image = global::Handbrake.Properties.Resources.picture;
+ this.tb_preview.Image = global::Handbrake.Properties.Resources.window;
this.tb_preview.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
this.tb_preview.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tb_preview.Name = "tb_preview";
@@ -1507,52 +1553,6 @@ namespace Handbrake this.labelPreset.TabIndex = 54;
this.labelPreset.Text = "Output Settings (Preset: None)";
//
- // PictureSettings
- //
- this.PictureSettings.BackColor = System.Drawing.Color.Transparent;
- this.PictureSettings.Font = new System.Drawing.Font("Tahoma", 8.25F);
- this.PictureSettings.Location = new System.Drawing.Point(0, 0);
- this.PictureSettings.Name = "PictureSettings";
- this.PictureSettings.Size = new System.Drawing.Size(713, 310);
- this.PictureSettings.TabIndex = 0;
- //
- // Filters
- //
- this.Filters.BackColor = System.Drawing.Color.Transparent;
- this.Filters.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.Filters.Location = new System.Drawing.Point(0, 0);
- this.Filters.Name = "Filters";
- this.Filters.Size = new System.Drawing.Size(713, 310);
- this.Filters.TabIndex = 0;
- //
- // AudioSettings
- //
- this.AudioSettings.BackColor = System.Drawing.Color.Transparent;
- this.AudioSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.AudioSettings.Location = new System.Drawing.Point(0, 0);
- this.AudioSettings.Name = "AudioSettings";
- this.AudioSettings.Size = new System.Drawing.Size(715, 310);
- this.AudioSettings.TabIndex = 0;
- //
- // Subtitles
- //
- this.Subtitles.BackColor = System.Drawing.Color.Transparent;
- this.Subtitles.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.Subtitles.Location = new System.Drawing.Point(0, 0);
- this.Subtitles.Name = "Subtitles";
- this.Subtitles.Size = new System.Drawing.Size(722, 310);
- this.Subtitles.TabIndex = 0;
- //
- // x264Panel
- //
- this.x264Panel.BackColor = System.Drawing.Color.Transparent;
- this.x264Panel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.x264Panel.Location = new System.Drawing.Point(0, 0);
- this.x264Panel.Name = "x264Panel";
- this.x264Panel.Size = new System.Drawing.Size(720, 306);
- this.x264Panel.TabIndex = 0;
- this.x264Panel.x264Query = "";
- //
// frmMain
//
this.AllowDrop = true;
|