mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 22:42:38 +01:00
Working on Ebu save options + some cleanup
git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@532 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
parent
66f55a79f5
commit
d871092aa9
281
src/Forms/EbuSaveOptions.Designer.cs
generated
281
src/Forms/EbuSaveOptions.Designer.cs
generated
@ -28,11 +28,26 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.buttonOK = new System.Windows.Forms.Button();
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
|
||||
this.tabControl1 = new System.Windows.Forms.TabControl();
|
||||
this.tabPageHeader = new System.Windows.Forms.TabPage();
|
||||
this.textBoxCodePageNumber = new System.Windows.Forms.TextBox();
|
||||
this.contextMenuStripCodeTable = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.unitedStatesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.multilingualToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.portugalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.canadaFrenchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.nordicToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.numericUpDownMaxRows = new System.Windows.Forms.NumericUpDown();
|
||||
this.labelMaxRows = new System.Windows.Forms.Label();
|
||||
this.comboBoxDiscFormatCode = new System.Windows.Forms.ComboBox();
|
||||
this.labelDiskFormatCode = new System.Windows.Forms.Label();
|
||||
this.labelCodePageNumber = new System.Windows.Forms.Label();
|
||||
this.textBoxLanguageCode = new System.Windows.Forms.TextBox();
|
||||
this.label14 = new System.Windows.Forms.Label();
|
||||
this.numericUpDownMaxCharacters = new System.Windows.Forms.NumericUpDown();
|
||||
this.label12 = new System.Windows.Forms.Label();
|
||||
this.numericUpDownDiskSequenceNumber = new System.Windows.Forms.NumericUpDown();
|
||||
@ -62,10 +77,12 @@
|
||||
this.tabPageErrors = new System.Windows.Forms.TabPage();
|
||||
this.textBoxErrors = new System.Windows.Forms.TextBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.textBoxLanguageCode = new System.Windows.Forms.TextBox();
|
||||
this.label14 = new System.Windows.Forms.Label();
|
||||
this.textBoxCountryOfOrigin = new System.Windows.Forms.TextBox();
|
||||
this.labelCountryOfOrigin = new System.Windows.Forms.Label();
|
||||
this.tabControl1.SuspendLayout();
|
||||
this.tabPageHeader.SuspendLayout();
|
||||
this.contextMenuStripCodeTable.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownMaxRows)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownMaxCharacters)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownDiskSequenceNumber)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownTotalNumberOfDiscs)).BeginInit();
|
||||
@ -78,7 +95,7 @@
|
||||
//
|
||||
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonOK.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.buttonOK.Location = new System.Drawing.Point(513, 428);
|
||||
this.buttonOK.Location = new System.Drawing.Point(607, 445);
|
||||
this.buttonOK.Name = "buttonOK";
|
||||
this.buttonOK.Size = new System.Drawing.Size(75, 21);
|
||||
this.buttonOK.TabIndex = 0;
|
||||
@ -91,7 +108,7 @@
|
||||
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.buttonCancel.Location = new System.Drawing.Point(594, 428);
|
||||
this.buttonCancel.Location = new System.Drawing.Point(688, 445);
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.Size = new System.Drawing.Size(75, 21);
|
||||
this.buttonCancel.TabIndex = 1;
|
||||
@ -114,11 +131,19 @@
|
||||
this.tabControl1.Location = new System.Drawing.Point(12, 12);
|
||||
this.tabControl1.Name = "tabControl1";
|
||||
this.tabControl1.SelectedIndex = 0;
|
||||
this.tabControl1.Size = new System.Drawing.Size(664, 405);
|
||||
this.tabControl1.Size = new System.Drawing.Size(758, 422);
|
||||
this.tabControl1.TabIndex = 32;
|
||||
//
|
||||
// tabPageHeader
|
||||
//
|
||||
this.tabPageHeader.Controls.Add(this.textBoxCountryOfOrigin);
|
||||
this.tabPageHeader.Controls.Add(this.labelCountryOfOrigin);
|
||||
this.tabPageHeader.Controls.Add(this.textBoxCodePageNumber);
|
||||
this.tabPageHeader.Controls.Add(this.numericUpDownMaxRows);
|
||||
this.tabPageHeader.Controls.Add(this.labelMaxRows);
|
||||
this.tabPageHeader.Controls.Add(this.comboBoxDiscFormatCode);
|
||||
this.tabPageHeader.Controls.Add(this.labelDiskFormatCode);
|
||||
this.tabPageHeader.Controls.Add(this.labelCodePageNumber);
|
||||
this.tabPageHeader.Controls.Add(this.textBoxLanguageCode);
|
||||
this.tabPageHeader.Controls.Add(this.label14);
|
||||
this.tabPageHeader.Controls.Add(this.numericUpDownMaxCharacters);
|
||||
@ -147,14 +172,137 @@
|
||||
this.tabPageHeader.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPageHeader.Name = "tabPageHeader";
|
||||
this.tabPageHeader.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPageHeader.Size = new System.Drawing.Size(656, 379);
|
||||
this.tabPageHeader.Size = new System.Drawing.Size(750, 396);
|
||||
this.tabPageHeader.TabIndex = 0;
|
||||
this.tabPageHeader.Text = "General subtitle information";
|
||||
this.tabPageHeader.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// textBoxCodePageNumber
|
||||
//
|
||||
this.textBoxCodePageNumber.ContextMenuStrip = this.contextMenuStripCodeTable;
|
||||
this.textBoxCodePageNumber.Location = new System.Drawing.Point(147, 12);
|
||||
this.textBoxCodePageNumber.MaxLength = 3;
|
||||
this.textBoxCodePageNumber.Name = "textBoxCodePageNumber";
|
||||
this.textBoxCodePageNumber.Size = new System.Drawing.Size(219, 20);
|
||||
this.textBoxCodePageNumber.TabIndex = 61;
|
||||
//
|
||||
// contextMenuStripCodeTable
|
||||
//
|
||||
this.contextMenuStripCodeTable.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.unitedStatesToolStripMenuItem,
|
||||
this.multilingualToolStripMenuItem,
|
||||
this.portugalToolStripMenuItem,
|
||||
this.canadaFrenchToolStripMenuItem,
|
||||
this.nordicToolStripMenuItem});
|
||||
this.contextMenuStripCodeTable.Name = "contextMenuStripCodeTable";
|
||||
this.contextMenuStripCodeTable.Size = new System.Drawing.Size(185, 114);
|
||||
//
|
||||
// unitedStatesToolStripMenuItem
|
||||
//
|
||||
this.unitedStatesToolStripMenuItem.Name = "unitedStatesToolStripMenuItem";
|
||||
this.unitedStatesToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
|
||||
this.unitedStatesToolStripMenuItem.Text = "United States (437)";
|
||||
this.unitedStatesToolStripMenuItem.Click += new System.EventHandler(this.unitedStatesToolStripMenuItem_Click);
|
||||
//
|
||||
// multilingualToolStripMenuItem
|
||||
//
|
||||
this.multilingualToolStripMenuItem.Name = "multilingualToolStripMenuItem";
|
||||
this.multilingualToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
|
||||
this.multilingualToolStripMenuItem.Text = "Multilingual (850)";
|
||||
this.multilingualToolStripMenuItem.Click += new System.EventHandler(this.multilingualToolStripMenuItem_Click);
|
||||
//
|
||||
// portugalToolStripMenuItem
|
||||
//
|
||||
this.portugalToolStripMenuItem.Name = "portugalToolStripMenuItem";
|
||||
this.portugalToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
|
||||
this.portugalToolStripMenuItem.Text = "Portugal (860)";
|
||||
this.portugalToolStripMenuItem.Click += new System.EventHandler(this.portugalToolStripMenuItem_Click);
|
||||
//
|
||||
// canadaFrenchToolStripMenuItem
|
||||
//
|
||||
this.canadaFrenchToolStripMenuItem.Name = "canadaFrenchToolStripMenuItem";
|
||||
this.canadaFrenchToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
|
||||
this.canadaFrenchToolStripMenuItem.Text = "Canada-French (863)";
|
||||
this.canadaFrenchToolStripMenuItem.Click += new System.EventHandler(this.canadaFrenchToolStripMenuItem_Click);
|
||||
//
|
||||
// nordicToolStripMenuItem
|
||||
//
|
||||
this.nordicToolStripMenuItem.Name = "nordicToolStripMenuItem";
|
||||
this.nordicToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
|
||||
this.nordicToolStripMenuItem.Text = "Nordic (865)";
|
||||
this.nordicToolStripMenuItem.Click += new System.EventHandler(this.nordicToolStripMenuItem_Click);
|
||||
//
|
||||
// numericUpDownMaxRows
|
||||
//
|
||||
this.numericUpDownMaxRows.Location = new System.Drawing.Point(613, 224);
|
||||
this.numericUpDownMaxRows.Maximum = new decimal(new int[] {
|
||||
99,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numericUpDownMaxRows.Name = "numericUpDownMaxRows";
|
||||
this.numericUpDownMaxRows.Size = new System.Drawing.Size(120, 20);
|
||||
this.numericUpDownMaxRows.TabIndex = 12;
|
||||
//
|
||||
// labelMaxRows
|
||||
//
|
||||
this.labelMaxRows.AutoSize = true;
|
||||
this.labelMaxRows.Location = new System.Drawing.Point(473, 226);
|
||||
this.labelMaxRows.Name = "labelMaxRows";
|
||||
this.labelMaxRows.Size = new System.Drawing.Size(126, 13);
|
||||
this.labelMaxRows.TabIndex = 60;
|
||||
this.labelMaxRows.Text = "Max# of displayable rows";
|
||||
//
|
||||
// comboBoxDiscFormatCode
|
||||
//
|
||||
this.comboBoxDiscFormatCode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBoxDiscFormatCode.FormattingEnabled = true;
|
||||
this.comboBoxDiscFormatCode.Items.AddRange(new object[] {
|
||||
"STL25.01",
|
||||
"STL30.01"});
|
||||
this.comboBoxDiscFormatCode.Location = new System.Drawing.Point(147, 39);
|
||||
this.comboBoxDiscFormatCode.Name = "comboBoxDiscFormatCode";
|
||||
this.comboBoxDiscFormatCode.Size = new System.Drawing.Size(219, 21);
|
||||
this.comboBoxDiscFormatCode.TabIndex = 1;
|
||||
//
|
||||
// labelDiskFormatCode
|
||||
//
|
||||
this.labelDiskFormatCode.AutoSize = true;
|
||||
this.labelDiskFormatCode.Location = new System.Drawing.Point(6, 42);
|
||||
this.labelDiskFormatCode.Name = "labelDiskFormatCode";
|
||||
this.labelDiskFormatCode.Size = new System.Drawing.Size(87, 13);
|
||||
this.labelDiskFormatCode.TabIndex = 58;
|
||||
this.labelDiskFormatCode.Text = "Disc format code";
|
||||
//
|
||||
// labelCodePageNumber
|
||||
//
|
||||
this.labelCodePageNumber.AutoSize = true;
|
||||
this.labelCodePageNumber.Location = new System.Drawing.Point(6, 15);
|
||||
this.labelCodePageNumber.Name = "labelCodePageNumber";
|
||||
this.labelCodePageNumber.Size = new System.Drawing.Size(97, 13);
|
||||
this.labelCodePageNumber.TabIndex = 56;
|
||||
this.labelCodePageNumber.Text = "Code page number";
|
||||
//
|
||||
// textBoxLanguageCode
|
||||
//
|
||||
this.textBoxLanguageCode.Location = new System.Drawing.Point(147, 94);
|
||||
this.textBoxLanguageCode.MaxLength = 32;
|
||||
this.textBoxLanguageCode.Name = "textBoxLanguageCode";
|
||||
this.textBoxLanguageCode.Size = new System.Drawing.Size(219, 20);
|
||||
this.textBoxLanguageCode.TabIndex = 3;
|
||||
//
|
||||
// label14
|
||||
//
|
||||
this.label14.AutoSize = true;
|
||||
this.label14.Location = new System.Drawing.Point(6, 97);
|
||||
this.label14.Name = "label14";
|
||||
this.label14.Size = new System.Drawing.Size(82, 13);
|
||||
this.label14.TabIndex = 54;
|
||||
this.label14.Text = "Language code";
|
||||
//
|
||||
// numericUpDownMaxCharacters
|
||||
//
|
||||
this.numericUpDownMaxCharacters.Location = new System.Drawing.Point(147, 252);
|
||||
this.numericUpDownMaxCharacters.Location = new System.Drawing.Point(613, 198);
|
||||
this.numericUpDownMaxCharacters.Maximum = new decimal(new int[] {
|
||||
99,
|
||||
0,
|
||||
@ -162,13 +310,13 @@
|
||||
0});
|
||||
this.numericUpDownMaxCharacters.Name = "numericUpDownMaxCharacters";
|
||||
this.numericUpDownMaxCharacters.Size = new System.Drawing.Size(120, 20);
|
||||
this.numericUpDownMaxCharacters.TabIndex = 9;
|
||||
this.numericUpDownMaxCharacters.TabIndex = 11;
|
||||
this.numericUpDownMaxCharacters.ValueChanged += new System.EventHandler(this.numericUpDownMaxCharacters_ValueChanged);
|
||||
//
|
||||
// label12
|
||||
//
|
||||
this.label12.AutoSize = true;
|
||||
this.label12.Location = new System.Drawing.Point(7, 254);
|
||||
this.label12.Location = new System.Drawing.Point(473, 200);
|
||||
this.label12.Name = "label12";
|
||||
this.label12.Size = new System.Drawing.Size(133, 13);
|
||||
this.label12.TabIndex = 51;
|
||||
@ -176,7 +324,7 @@
|
||||
//
|
||||
// numericUpDownDiskSequenceNumber
|
||||
//
|
||||
this.numericUpDownDiskSequenceNumber.Location = new System.Drawing.Point(147, 278);
|
||||
this.numericUpDownDiskSequenceNumber.Location = new System.Drawing.Point(613, 250);
|
||||
this.numericUpDownDiskSequenceNumber.Maximum = new decimal(new int[] {
|
||||
9,
|
||||
0,
|
||||
@ -184,11 +332,11 @@
|
||||
0});
|
||||
this.numericUpDownDiskSequenceNumber.Name = "numericUpDownDiskSequenceNumber";
|
||||
this.numericUpDownDiskSequenceNumber.Size = new System.Drawing.Size(120, 20);
|
||||
this.numericUpDownDiskSequenceNumber.TabIndex = 10;
|
||||
this.numericUpDownDiskSequenceNumber.TabIndex = 13;
|
||||
//
|
||||
// numericUpDownTotalNumberOfDiscs
|
||||
//
|
||||
this.numericUpDownTotalNumberOfDiscs.Location = new System.Drawing.Point(147, 304);
|
||||
this.numericUpDownTotalNumberOfDiscs.Location = new System.Drawing.Point(613, 276);
|
||||
this.numericUpDownTotalNumberOfDiscs.Maximum = new decimal(new int[] {
|
||||
9,
|
||||
0,
|
||||
@ -196,11 +344,11 @@
|
||||
0});
|
||||
this.numericUpDownTotalNumberOfDiscs.Name = "numericUpDownTotalNumberOfDiscs";
|
||||
this.numericUpDownTotalNumberOfDiscs.Size = new System.Drawing.Size(120, 20);
|
||||
this.numericUpDownTotalNumberOfDiscs.TabIndex = 11;
|
||||
this.numericUpDownTotalNumberOfDiscs.TabIndex = 14;
|
||||
//
|
||||
// numericUpDownRevisionNumber
|
||||
//
|
||||
this.numericUpDownRevisionNumber.Location = new System.Drawing.Point(147, 226);
|
||||
this.numericUpDownRevisionNumber.Location = new System.Drawing.Point(613, 172);
|
||||
this.numericUpDownRevisionNumber.Maximum = new decimal(new int[] {
|
||||
99,
|
||||
0,
|
||||
@ -208,12 +356,12 @@
|
||||
0});
|
||||
this.numericUpDownRevisionNumber.Name = "numericUpDownRevisionNumber";
|
||||
this.numericUpDownRevisionNumber.Size = new System.Drawing.Size(120, 20);
|
||||
this.numericUpDownRevisionNumber.TabIndex = 8;
|
||||
this.numericUpDownRevisionNumber.TabIndex = 10;
|
||||
//
|
||||
// label11
|
||||
//
|
||||
this.label11.AutoSize = true;
|
||||
this.label11.Location = new System.Drawing.Point(7, 280);
|
||||
this.label11.Location = new System.Drawing.Point(473, 252);
|
||||
this.label11.Name = "label11";
|
||||
this.label11.Size = new System.Drawing.Size(116, 13);
|
||||
this.label11.TabIndex = 49;
|
||||
@ -222,7 +370,7 @@
|
||||
// label10
|
||||
//
|
||||
this.label10.AutoSize = true;
|
||||
this.label10.Location = new System.Drawing.Point(7, 306);
|
||||
this.label10.Location = new System.Drawing.Point(473, 278);
|
||||
this.label10.Name = "label10";
|
||||
this.label10.Size = new System.Drawing.Size(108, 13);
|
||||
this.label10.TabIndex = 48;
|
||||
@ -231,7 +379,7 @@
|
||||
// label9
|
||||
//
|
||||
this.label9.AutoSize = true;
|
||||
this.label9.Location = new System.Drawing.Point(7, 228);
|
||||
this.label9.Location = new System.Drawing.Point(473, 174);
|
||||
this.label9.Name = "label9";
|
||||
this.label9.Size = new System.Drawing.Size(86, 13);
|
||||
this.label9.TabIndex = 47;
|
||||
@ -239,16 +387,16 @@
|
||||
//
|
||||
// textBoxTranslatorsName
|
||||
//
|
||||
this.textBoxTranslatorsName.Location = new System.Drawing.Point(147, 170);
|
||||
this.textBoxTranslatorsName.Location = new System.Drawing.Point(147, 224);
|
||||
this.textBoxTranslatorsName.MaxLength = 32;
|
||||
this.textBoxTranslatorsName.Name = "textBoxTranslatorsName";
|
||||
this.textBoxTranslatorsName.Size = new System.Drawing.Size(219, 20);
|
||||
this.textBoxTranslatorsName.TabIndex = 6;
|
||||
this.textBoxTranslatorsName.TabIndex = 8;
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Location = new System.Drawing.Point(6, 173);
|
||||
this.label8.Location = new System.Drawing.Point(6, 227);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(90, 13);
|
||||
this.label8.TabIndex = 45;
|
||||
@ -256,16 +404,16 @@
|
||||
//
|
||||
// textBoxSubtitleListReferenceCode
|
||||
//
|
||||
this.textBoxSubtitleListReferenceCode.Location = new System.Drawing.Point(147, 200);
|
||||
this.textBoxSubtitleListReferenceCode.Location = new System.Drawing.Point(147, 254);
|
||||
this.textBoxSubtitleListReferenceCode.MaxLength = 16;
|
||||
this.textBoxSubtitleListReferenceCode.Name = "textBoxSubtitleListReferenceCode";
|
||||
this.textBoxSubtitleListReferenceCode.Size = new System.Drawing.Size(219, 20);
|
||||
this.textBoxSubtitleListReferenceCode.TabIndex = 7;
|
||||
this.textBoxSubtitleListReferenceCode.TabIndex = 9;
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Location = new System.Drawing.Point(6, 203);
|
||||
this.label7.Location = new System.Drawing.Point(6, 257);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(132, 13);
|
||||
this.label7.TabIndex = 43;
|
||||
@ -281,18 +429,19 @@
|
||||
"Latin/Arabic",
|
||||
"Latin/Greek",
|
||||
"Latin/Hebrew"});
|
||||
this.comboBoxCharacterCodeTable.Location = new System.Drawing.Point(147, 12);
|
||||
this.comboBoxCharacterCodeTable.Location = new System.Drawing.Point(147, 66);
|
||||
this.comboBoxCharacterCodeTable.Name = "comboBoxCharacterCodeTable";
|
||||
this.comboBoxCharacterCodeTable.Size = new System.Drawing.Size(219, 21);
|
||||
this.comboBoxCharacterCodeTable.TabIndex = 0;
|
||||
this.comboBoxCharacterCodeTable.TabIndex = 2;
|
||||
//
|
||||
// buttonImport
|
||||
//
|
||||
this.buttonImport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonImport.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.buttonImport.Location = new System.Drawing.Point(411, 14);
|
||||
this.buttonImport.Location = new System.Drawing.Point(613, 6);
|
||||
this.buttonImport.Name = "buttonImport";
|
||||
this.buttonImport.Size = new System.Drawing.Size(134, 21);
|
||||
this.buttonImport.TabIndex = 12;
|
||||
this.buttonImport.TabIndex = 15;
|
||||
this.buttonImport.Text = "Import...";
|
||||
this.buttonImport.UseVisualStyleBackColor = true;
|
||||
this.buttonImport.Click += new System.EventHandler(this.buttonImport_Click);
|
||||
@ -300,7 +449,7 @@
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(6, 15);
|
||||
this.label5.Location = new System.Drawing.Point(6, 69);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(106, 13);
|
||||
this.label5.TabIndex = 40;
|
||||
@ -308,32 +457,32 @@
|
||||
//
|
||||
// textBoxTranslatedProgramTitle
|
||||
//
|
||||
this.textBoxTranslatedProgramTitle.Location = new System.Drawing.Point(147, 118);
|
||||
this.textBoxTranslatedProgramTitle.Location = new System.Drawing.Point(147, 172);
|
||||
this.textBoxTranslatedProgramTitle.MaxLength = 32;
|
||||
this.textBoxTranslatedProgramTitle.Name = "textBoxTranslatedProgramTitle";
|
||||
this.textBoxTranslatedProgramTitle.Size = new System.Drawing.Size(219, 20);
|
||||
this.textBoxTranslatedProgramTitle.TabIndex = 4;
|
||||
this.textBoxTranslatedProgramTitle.TabIndex = 6;
|
||||
//
|
||||
// textBoxTranslatedEpisodeTitle
|
||||
//
|
||||
this.textBoxTranslatedEpisodeTitle.Location = new System.Drawing.Point(147, 144);
|
||||
this.textBoxTranslatedEpisodeTitle.Location = new System.Drawing.Point(147, 198);
|
||||
this.textBoxTranslatedEpisodeTitle.MaxLength = 32;
|
||||
this.textBoxTranslatedEpisodeTitle.Name = "textBoxTranslatedEpisodeTitle";
|
||||
this.textBoxTranslatedEpisodeTitle.Size = new System.Drawing.Size(219, 20);
|
||||
this.textBoxTranslatedEpisodeTitle.TabIndex = 5;
|
||||
this.textBoxTranslatedEpisodeTitle.TabIndex = 7;
|
||||
//
|
||||
// textBoxOriginalEpisodeTitle
|
||||
//
|
||||
this.textBoxOriginalEpisodeTitle.Location = new System.Drawing.Point(147, 92);
|
||||
this.textBoxOriginalEpisodeTitle.Location = new System.Drawing.Point(147, 146);
|
||||
this.textBoxOriginalEpisodeTitle.MaxLength = 32;
|
||||
this.textBoxOriginalEpisodeTitle.Name = "textBoxOriginalEpisodeTitle";
|
||||
this.textBoxOriginalEpisodeTitle.Size = new System.Drawing.Size(219, 20);
|
||||
this.textBoxOriginalEpisodeTitle.TabIndex = 3;
|
||||
this.textBoxOriginalEpisodeTitle.TabIndex = 5;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(6, 147);
|
||||
this.label4.Location = new System.Drawing.Point(6, 201);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(116, 13);
|
||||
this.label4.TabIndex = 36;
|
||||
@ -342,7 +491,7 @@
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(6, 121);
|
||||
this.label3.Location = new System.Drawing.Point(6, 175);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(117, 13);
|
||||
this.label3.TabIndex = 35;
|
||||
@ -351,7 +500,7 @@
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(6, 95);
|
||||
this.label2.Location = new System.Drawing.Point(6, 149);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(101, 13);
|
||||
this.label2.TabIndex = 34;
|
||||
@ -359,16 +508,16 @@
|
||||
//
|
||||
// textBoxOriginalProgramTitle
|
||||
//
|
||||
this.textBoxOriginalProgramTitle.Location = new System.Drawing.Point(147, 66);
|
||||
this.textBoxOriginalProgramTitle.Location = new System.Drawing.Point(147, 120);
|
||||
this.textBoxOriginalProgramTitle.MaxLength = 32;
|
||||
this.textBoxOriginalProgramTitle.Name = "textBoxOriginalProgramTitle";
|
||||
this.textBoxOriginalProgramTitle.Size = new System.Drawing.Size(219, 20);
|
||||
this.textBoxOriginalProgramTitle.TabIndex = 2;
|
||||
this.textBoxOriginalProgramTitle.TabIndex = 4;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(6, 69);
|
||||
this.label1.Location = new System.Drawing.Point(6, 123);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(102, 13);
|
||||
this.label1.TabIndex = 32;
|
||||
@ -380,7 +529,7 @@
|
||||
this.tabPageTextAndTiming.Controls.Add(this.label13);
|
||||
this.tabPageTextAndTiming.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPageTextAndTiming.Name = "tabPageTextAndTiming";
|
||||
this.tabPageTextAndTiming.Size = new System.Drawing.Size(656, 379);
|
||||
this.tabPageTextAndTiming.Size = new System.Drawing.Size(750, 396);
|
||||
this.tabPageTextAndTiming.TabIndex = 2;
|
||||
this.tabPageTextAndTiming.Text = "Text and timing information";
|
||||
this.tabPageTextAndTiming.UseVisualStyleBackColor = true;
|
||||
@ -415,7 +564,7 @@
|
||||
this.tabPageErrors.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPageErrors.Name = "tabPageErrors";
|
||||
this.tabPageErrors.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPageErrors.Size = new System.Drawing.Size(656, 379);
|
||||
this.tabPageErrors.Size = new System.Drawing.Size(750, 396);
|
||||
this.tabPageErrors.TabIndex = 1;
|
||||
this.tabPageErrors.Text = "Errors";
|
||||
this.tabPageErrors.UseVisualStyleBackColor = true;
|
||||
@ -429,7 +578,7 @@
|
||||
this.textBoxErrors.Multiline = true;
|
||||
this.textBoxErrors.Name = "textBoxErrors";
|
||||
this.textBoxErrors.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
|
||||
this.textBoxErrors.Size = new System.Drawing.Size(815, 373);
|
||||
this.textBoxErrors.Size = new System.Drawing.Size(909, 344);
|
||||
this.textBoxErrors.TabIndex = 13;
|
||||
//
|
||||
// label6
|
||||
@ -441,28 +590,28 @@
|
||||
this.label6.TabIndex = 12;
|
||||
this.label6.Text = "Errors";
|
||||
//
|
||||
// textBoxLanguageCode
|
||||
// textBoxCountryOfOrigin
|
||||
//
|
||||
this.textBoxLanguageCode.Location = new System.Drawing.Point(147, 40);
|
||||
this.textBoxLanguageCode.MaxLength = 32;
|
||||
this.textBoxLanguageCode.Name = "textBoxLanguageCode";
|
||||
this.textBoxLanguageCode.Size = new System.Drawing.Size(219, 20);
|
||||
this.textBoxLanguageCode.TabIndex = 1;
|
||||
this.textBoxCountryOfOrigin.Location = new System.Drawing.Point(147, 280);
|
||||
this.textBoxCountryOfOrigin.MaxLength = 3;
|
||||
this.textBoxCountryOfOrigin.Name = "textBoxCountryOfOrigin";
|
||||
this.textBoxCountryOfOrigin.Size = new System.Drawing.Size(219, 20);
|
||||
this.textBoxCountryOfOrigin.TabIndex = 62;
|
||||
//
|
||||
// label14
|
||||
// labelCountryOfOrigin
|
||||
//
|
||||
this.label14.AutoSize = true;
|
||||
this.label14.Location = new System.Drawing.Point(6, 43);
|
||||
this.label14.Name = "label14";
|
||||
this.label14.Size = new System.Drawing.Size(82, 13);
|
||||
this.label14.TabIndex = 54;
|
||||
this.label14.Text = "Language code";
|
||||
this.labelCountryOfOrigin.AutoSize = true;
|
||||
this.labelCountryOfOrigin.Location = new System.Drawing.Point(6, 283);
|
||||
this.labelCountryOfOrigin.Name = "labelCountryOfOrigin";
|
||||
this.labelCountryOfOrigin.Size = new System.Drawing.Size(83, 13);
|
||||
this.labelCountryOfOrigin.TabIndex = 63;
|
||||
this.labelCountryOfOrigin.Text = "Country of origin";
|
||||
//
|
||||
// EbuSaveOptions
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(681, 460);
|
||||
this.ClientSize = new System.Drawing.Size(775, 477);
|
||||
this.Controls.Add(this.tabControl1);
|
||||
this.Controls.Add(this.buttonOK);
|
||||
this.Controls.Add(this.buttonCancel);
|
||||
@ -472,6 +621,8 @@
|
||||
this.tabControl1.ResumeLayout(false);
|
||||
this.tabPageHeader.ResumeLayout(false);
|
||||
this.tabPageHeader.PerformLayout();
|
||||
this.contextMenuStripCodeTable.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownMaxRows)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownMaxCharacters)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownDiskSequenceNumber)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownTotalNumberOfDiscs)).EndInit();
|
||||
@ -522,5 +673,19 @@
|
||||
private System.Windows.Forms.Label label12;
|
||||
private System.Windows.Forms.TextBox textBoxLanguageCode;
|
||||
private System.Windows.Forms.Label label14;
|
||||
private System.Windows.Forms.Label labelCodePageNumber;
|
||||
private System.Windows.Forms.ComboBox comboBoxDiscFormatCode;
|
||||
private System.Windows.Forms.Label labelDiskFormatCode;
|
||||
private System.Windows.Forms.NumericUpDown numericUpDownMaxRows;
|
||||
private System.Windows.Forms.Label labelMaxRows;
|
||||
private System.Windows.Forms.TextBox textBoxCodePageNumber;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStripCodeTable;
|
||||
private System.Windows.Forms.ToolStripMenuItem unitedStatesToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem multilingualToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem portugalToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem canadaFrenchToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem nordicToolStripMenuItem;
|
||||
private System.Windows.Forms.TextBox textBoxCountryOfOrigin;
|
||||
private System.Windows.Forms.Label labelCountryOfOrigin;
|
||||
}
|
||||
}
|
@ -25,6 +25,8 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
_subtitle = subtitle;
|
||||
|
||||
FillFromHeader(header);
|
||||
if (!string.IsNullOrEmpty(fileName))
|
||||
{
|
||||
try
|
||||
{
|
||||
FillHeaderFromFile(fileName);
|
||||
@ -33,9 +35,10 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine("EbuOptions unable to read existing file: " + fileName + " - " + ex.Message);
|
||||
}
|
||||
|
||||
string title = Path.GetFileNameWithoutExtension(fileName);
|
||||
textBoxOriginalProgramTitle.Text = title;
|
||||
}
|
||||
|
||||
comboBoxJustificationCode.SelectedIndex = justificationCode;
|
||||
|
||||
this.Text = Configuration.Settings.Language.EbuSaveOtpions.Title;
|
||||
@ -68,6 +71,13 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
private void FillFromHeader(Ebu.EbuGeneralSubtitleInformation header)
|
||||
{
|
||||
textBoxCodePageNumber.Text = header.CodePageNumber;
|
||||
|
||||
if (header.DiskFormatCode == "STL30.01")
|
||||
comboBoxDiscFormatCode.SelectedIndex = 1;
|
||||
else
|
||||
comboBoxDiscFormatCode.SelectedIndex = 0;
|
||||
|
||||
comboBoxCharacterCodeTable.SelectedIndex = int.Parse(header.CharacterCodeTableNumber);
|
||||
textBoxLanguageCode.Text = header.LanguageCode;
|
||||
textBoxOriginalProgramTitle.Text = header.OriginalProgrammeTitle.TrimEnd();
|
||||
@ -76,6 +86,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
textBoxTranslatedEpisodeTitle.Text = header.TranslatedEpisodeTitle.TrimEnd();
|
||||
textBoxTranslatorsName.Text = header.TranslatorsName.TrimEnd();
|
||||
textBoxSubtitleListReferenceCode.Text = header.SubtitleListReferenceCode.TrimEnd();
|
||||
textBoxCountryOfOrigin.Text = header.CountryOfOrigin;
|
||||
|
||||
int number;
|
||||
if (int.TryParse(header.RevisionNumber, out number))
|
||||
@ -86,6 +97,10 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
if (int.TryParse(header.MaximumNumberOfDisplayableCharactersInAnyTextRow, out number))
|
||||
numericUpDownMaxCharacters.Value = number;
|
||||
|
||||
numericUpDownMaxRows.Value = 23;
|
||||
if (int.TryParse(header.MaximumNumberOfDisplayableRows, out number))
|
||||
numericUpDownMaxRows.Value = number;
|
||||
|
||||
if (int.TryParse(header.DiskSequenceNumber, out number))
|
||||
numericUpDownDiskSequenceNumber.Value = number;
|
||||
else
|
||||
@ -98,6 +113,13 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
private void buttonOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
_header.CodePageNumber = textBoxCodePageNumber.Text;
|
||||
|
||||
if (comboBoxDiscFormatCode.SelectedIndex == 1)
|
||||
_header.DiskFormatCode = "STL30.01";
|
||||
else
|
||||
_header.DiskFormatCode = "STL25.01";
|
||||
|
||||
_header.CharacterCodeTableNumber = "0" + comboBoxCharacterCodeTable.SelectedIndex.ToString();
|
||||
_header.OriginalProgrammeTitle = textBoxOriginalProgramTitle.Text.PadRight(32, ' ');
|
||||
_header.OriginalEpisodeTitle = textBoxOriginalEpisodeTitle.Text.PadRight(32, ' ');
|
||||
@ -105,8 +127,12 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
_header.TranslatedEpisodeTitle = textBoxTranslatedEpisodeTitle.Text.PadRight(32, ' ');
|
||||
_header.TranslatorsName = textBoxTranslatorsName.Text.PadRight(32, ' ');
|
||||
_header.SubtitleListReferenceCode = textBoxSubtitleListReferenceCode.Text.PadRight(16, ' ');
|
||||
_header.CountryOfOrigin = textBoxCountryOfOrigin.Text;
|
||||
if (_header.CountryOfOrigin.Length != 3)
|
||||
_header.CountryOfOrigin = "USA";
|
||||
_header.RevisionNumber = numericUpDownRevisionNumber.Value.ToString().PadLeft(2, '0');
|
||||
_header.MaximumNumberOfDisplayableCharactersInAnyTextRow = numericUpDownMaxCharacters.Value.ToString().PadLeft(2, '0');
|
||||
_header.MaximumNumberOfDisplayableRows = numericUpDownMaxRows.Value.ToString().PadLeft(2, '0');
|
||||
_header.DiskSequenceNumber = numericUpDownDiskSequenceNumber.Value.ToString();
|
||||
_header.TotalNumberOfDisks = numericUpDownTotalNumberOfDiscs.Value.ToString();
|
||||
JustificationCode = (byte)comboBoxJustificationCode.SelectedIndex;
|
||||
@ -121,6 +147,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
private void buttonImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
openFileDialog1.Filter = "Ebu stl files (*.stl)|*.stl";
|
||||
openFileDialog1.FileName = string.Empty;
|
||||
if (openFileDialog1.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
FillHeaderFromFile(openFileDialog1.FileName);
|
||||
@ -142,5 +169,30 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
CheckErrors(_subtitle);
|
||||
}
|
||||
|
||||
private void unitedStatesToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
textBoxCodePageNumber.Text = "437";
|
||||
}
|
||||
|
||||
private void multilingualToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
textBoxCodePageNumber.Text = "850";
|
||||
}
|
||||
|
||||
private void portugalToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
textBoxCodePageNumber.Text = "860";
|
||||
}
|
||||
|
||||
private void canadaFrenchToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
textBoxCodePageNumber.Text = "863";
|
||||
}
|
||||
|
||||
private void nordicToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
textBoxCodePageNumber.Text = "865";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -120,4 +120,7 @@
|
||||
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="contextMenuStripCodeTable.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>157, 17</value>
|
||||
</metadata>
|
||||
</root>
|
6
src/Forms/FindDialog.Designer.cs
generated
6
src/Forms/FindDialog.Designer.cs
generated
@ -80,7 +80,7 @@
|
||||
// radioButtonCaseSensitive
|
||||
//
|
||||
this.radioButtonCaseSensitive.AutoSize = true;
|
||||
this.radioButtonCaseSensitive.Location = new System.Drawing.Point(86, 63);
|
||||
this.radioButtonCaseSensitive.Location = new System.Drawing.Point(12, 86);
|
||||
this.radioButtonCaseSensitive.Name = "radioButtonCaseSensitive";
|
||||
this.radioButtonCaseSensitive.Size = new System.Drawing.Size(94, 17);
|
||||
this.radioButtonCaseSensitive.TabIndex = 7;
|
||||
@ -91,7 +91,7 @@
|
||||
// radioButtonRegEx
|
||||
//
|
||||
this.radioButtonRegEx.AutoSize = true;
|
||||
this.radioButtonRegEx.Location = new System.Drawing.Point(196, 63);
|
||||
this.radioButtonRegEx.Location = new System.Drawing.Point(14, 109);
|
||||
this.radioButtonRegEx.Name = "radioButtonRegEx";
|
||||
this.radioButtonRegEx.Size = new System.Drawing.Size(56, 17);
|
||||
this.radioButtonRegEx.TabIndex = 9;
|
||||
@ -103,7 +103,7 @@
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(298, 89);
|
||||
this.ClientSize = new System.Drawing.Size(298, 135);
|
||||
this.Controls.Add(this.radioButtonRegEx);
|
||||
this.Controls.Add(this.radioButtonCaseSensitive);
|
||||
this.Controls.Add(this.radioButtonNormal);
|
||||
|
@ -712,7 +712,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
splitContainer1.SplitterDistance = Configuration.Settings.General.StartListViewWidth;
|
||||
}
|
||||
|
||||
if (Environment.OSVersion.Version.Major < 6) // 6 == Vista/Win2008Server/Win7
|
||||
if (Environment.OSVersion.Version.Major < 6 && Configuration.Settings.General.SubtitleFontName == Utilities.WinXp2kUnicodeFontName) // 6 == Vista/Win2008Server/Win7
|
||||
{
|
||||
string unicodeFontName = Utilities.WinXp2kUnicodeFontName;
|
||||
Configuration.Settings.General.SubtitleFontName = unicodeFontName;
|
||||
@ -814,6 +814,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
toolStripMenuItemSpellCheckMain.Text = _language.Menu.SpellCheck.Title;
|
||||
spellCheckToolStripMenuItem.Text = _language.Menu.SpellCheck.SpellCheck;
|
||||
findDoubleWordsToolStripMenuItem.Text = _language.Menu.SpellCheck.FindDoubleWords;
|
||||
FindDoubleLinesToolStripMenuItem.Text = _language.Menu.SpellCheck.FindDoubleLines;
|
||||
GetDictionariesToolStripMenuItem.Text = _language.Menu.SpellCheck.GetDictionaries;
|
||||
addWordToNamesetcListToolStripMenuItem.Text = _language.Menu.SpellCheck.AddToNamesEtcList;
|
||||
|
||||
@ -5308,6 +5309,8 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
Cursor.Current = Cursors.WaitCursor;
|
||||
List<SubtitleSequence> sub = matroska.GetMatroskaSubtitle(fileName, (int)matroskaSubtitleInfo.TrackNumber, out isValid);
|
||||
Cursor.Current = Cursors.Default;
|
||||
int noOfErrors = 0;
|
||||
string lastError = string.Empty;
|
||||
|
||||
if (isValid)
|
||||
{
|
||||
@ -5318,7 +5321,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
StringBuilder log = new StringBuilder();
|
||||
foreach (SubtitleSequence p in sub)
|
||||
{
|
||||
byte[] buffer;
|
||||
byte[] buffer = null;
|
||||
if (matroskaSubtitleInfo.ContentEncodingType == 0) // compressed with zlib
|
||||
{
|
||||
MemoryStream outStream = new MemoryStream();
|
||||
@ -5331,6 +5334,12 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
outStream.Position = 0;
|
||||
outStream.Read(buffer, 0, buffer.Length);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
TimeCode tc = new TimeCode(TimeSpan.FromMilliseconds(p.StartMilliseconds));
|
||||
lastError = tc.ToString() + ": " + exception.Message + ": " + exception.StackTrace;
|
||||
noOfErrors++;
|
||||
}
|
||||
finally
|
||||
{
|
||||
outStream.Close();
|
||||
@ -5342,7 +5351,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
buffer = p.BinaryData;
|
||||
}
|
||||
if (buffer.Length > 100)
|
||||
if (buffer != null && buffer.Length > 100)
|
||||
{
|
||||
MemoryStream ms = new MemoryStream(buffer);
|
||||
var list = BluRaySupParser.ParseBluRaySup(ms, log, true);
|
||||
@ -5360,6 +5369,11 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
}
|
||||
|
||||
if (noOfErrors > 0)
|
||||
{
|
||||
MessageBox.Show(string.Format("{0} errror(s) occured during extraction of bdsup\r\n\r\n{1}", noOfErrors, lastError));
|
||||
}
|
||||
|
||||
var formSubOcr = new VobSubOcr();
|
||||
formSubOcr.Initialize(subtitles, Configuration.Settings.VobSubOcr);
|
||||
if (formSubOcr.ShowDialog(this) == DialogResult.OK)
|
||||
|
@ -681,7 +681,7 @@
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD2
|
||||
CAAAAk1TRnQBSQFMAgEBAgEAAfABCAHwAQgBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
CAAAAk1TRnQBSQFMAgEBAgEAAfgBCAH4AQgBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
|
16
src/Forms/ReplaceDialog.Designer.cs
generated
16
src/Forms/ReplaceDialog.Designer.cs
generated
@ -43,7 +43,7 @@
|
||||
// radioButtonRegEx
|
||||
//
|
||||
this.radioButtonRegEx.AutoSize = true;
|
||||
this.radioButtonRegEx.Location = new System.Drawing.Point(201, 51);
|
||||
this.radioButtonRegEx.Location = new System.Drawing.Point(17, 97);
|
||||
this.radioButtonRegEx.Name = "radioButtonRegEx";
|
||||
this.radioButtonRegEx.Size = new System.Drawing.Size(56, 17);
|
||||
this.radioButtonRegEx.TabIndex = 3;
|
||||
@ -54,7 +54,7 @@
|
||||
// radioButtonCaseSensitive
|
||||
//
|
||||
this.radioButtonCaseSensitive.AutoSize = true;
|
||||
this.radioButtonCaseSensitive.Location = new System.Drawing.Point(88, 51);
|
||||
this.radioButtonCaseSensitive.Location = new System.Drawing.Point(17, 74);
|
||||
this.radioButtonCaseSensitive.Name = "radioButtonCaseSensitive";
|
||||
this.radioButtonCaseSensitive.Size = new System.Drawing.Size(94, 17);
|
||||
this.radioButtonCaseSensitive.TabIndex = 2;
|
||||
@ -77,7 +77,7 @@
|
||||
//
|
||||
// buttonReplace
|
||||
//
|
||||
this.buttonReplace.Location = new System.Drawing.Point(124, 140);
|
||||
this.buttonReplace.Location = new System.Drawing.Point(124, 180);
|
||||
this.buttonReplace.Name = "buttonReplace";
|
||||
this.buttonReplace.Size = new System.Drawing.Size(75, 21);
|
||||
this.buttonReplace.TabIndex = 6;
|
||||
@ -95,7 +95,7 @@
|
||||
//
|
||||
// buttonReplaceAll
|
||||
//
|
||||
this.buttonReplaceAll.Location = new System.Drawing.Point(205, 140);
|
||||
this.buttonReplaceAll.Location = new System.Drawing.Point(205, 180);
|
||||
this.buttonReplaceAll.Name = "buttonReplaceAll";
|
||||
this.buttonReplaceAll.Size = new System.Drawing.Size(75, 21);
|
||||
this.buttonReplaceAll.TabIndex = 7;
|
||||
@ -105,7 +105,7 @@
|
||||
//
|
||||
// textBoxReplace
|
||||
//
|
||||
this.textBoxReplace.Location = new System.Drawing.Point(15, 104);
|
||||
this.textBoxReplace.Location = new System.Drawing.Point(15, 144);
|
||||
this.textBoxReplace.Name = "textBoxReplace";
|
||||
this.textBoxReplace.Size = new System.Drawing.Size(265, 21);
|
||||
this.textBoxReplace.TabIndex = 4;
|
||||
@ -114,7 +114,7 @@
|
||||
// labelReplaceWith
|
||||
//
|
||||
this.labelReplaceWith.AutoSize = true;
|
||||
this.labelReplaceWith.Location = new System.Drawing.Point(12, 87);
|
||||
this.labelReplaceWith.Location = new System.Drawing.Point(12, 127);
|
||||
this.labelReplaceWith.Name = "labelReplaceWith";
|
||||
this.labelReplaceWith.Size = new System.Drawing.Size(72, 13);
|
||||
this.labelReplaceWith.TabIndex = 14;
|
||||
@ -131,7 +131,7 @@
|
||||
//
|
||||
// buttonFind
|
||||
//
|
||||
this.buttonFind.Location = new System.Drawing.Point(43, 140);
|
||||
this.buttonFind.Location = new System.Drawing.Point(43, 180);
|
||||
this.buttonFind.Name = "buttonFind";
|
||||
this.buttonFind.Size = new System.Drawing.Size(75, 21);
|
||||
this.buttonFind.TabIndex = 5;
|
||||
@ -143,7 +143,7 @@
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(330, 170);
|
||||
this.ClientSize = new System.Drawing.Size(330, 208);
|
||||
this.Controls.Add(this.buttonFind);
|
||||
this.Controls.Add(this.labelFindWhat);
|
||||
this.Controls.Add(this.labelReplaceWith);
|
||||
|
48
src/Forms/VobSubOcr.Designer.cs
generated
48
src/Forms/VobSubOcr.Designer.cs
generated
@ -36,10 +36,11 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
this.normalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.italicToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.importTextWithMatchingTimeCodesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.saveImageAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveAllImagesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.importTextWithMatchingTimeCodesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveAllImagesWithHtmlIndexViewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.labelSubtitleText = new System.Windows.Forms.Label();
|
||||
this.progressBar1 = new System.Windows.Forms.ProgressBar();
|
||||
this.labelStatus = new System.Windows.Forms.Label();
|
||||
@ -101,7 +102,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
|
||||
this.subtitleListView1 = new Nikse.SubtitleEdit.Controls.SubtitleListView();
|
||||
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
|
||||
this.saveAllImagesWithHtmlIndexViewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBoxSubtitleImage)).BeginInit();
|
||||
this.contextMenuStripListview.SuspendLayout();
|
||||
this.groupBoxOcrMethod.SuspendLayout();
|
||||
@ -171,6 +171,18 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(279, 6);
|
||||
//
|
||||
// importTextWithMatchingTimeCodesToolStripMenuItem
|
||||
//
|
||||
this.importTextWithMatchingTimeCodesToolStripMenuItem.Name = "importTextWithMatchingTimeCodesToolStripMenuItem";
|
||||
this.importTextWithMatchingTimeCodesToolStripMenuItem.Size = new System.Drawing.Size(282, 22);
|
||||
this.importTextWithMatchingTimeCodesToolStripMenuItem.Text = "Import text with matching time codes...";
|
||||
this.importTextWithMatchingTimeCodesToolStripMenuItem.Click += new System.EventHandler(this.importTextWithMatchingTimeCodesToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(279, 6);
|
||||
//
|
||||
// saveImageAsToolStripMenuItem
|
||||
//
|
||||
this.saveImageAsToolStripMenuItem.Name = "saveImageAsToolStripMenuItem";
|
||||
@ -185,17 +197,12 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
this.saveAllImagesToolStripMenuItem.Text = "Save all images (png/bdn xml)...";
|
||||
this.saveAllImagesToolStripMenuItem.Click += new System.EventHandler(this.saveAllImagesToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator2
|
||||
// saveAllImagesWithHtmlIndexViewToolStripMenuItem
|
||||
//
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(279, 6);
|
||||
//
|
||||
// importTextWithMatchingTimeCodesToolStripMenuItem
|
||||
//
|
||||
this.importTextWithMatchingTimeCodesToolStripMenuItem.Name = "importTextWithMatchingTimeCodesToolStripMenuItem";
|
||||
this.importTextWithMatchingTimeCodesToolStripMenuItem.Size = new System.Drawing.Size(282, 22);
|
||||
this.importTextWithMatchingTimeCodesToolStripMenuItem.Text = "Import text with matching time codes...";
|
||||
this.importTextWithMatchingTimeCodesToolStripMenuItem.Click += new System.EventHandler(this.importTextWithMatchingTimeCodesToolStripMenuItem_Click);
|
||||
this.saveAllImagesWithHtmlIndexViewToolStripMenuItem.Name = "saveAllImagesWithHtmlIndexViewToolStripMenuItem";
|
||||
this.saveAllImagesWithHtmlIndexViewToolStripMenuItem.Size = new System.Drawing.Size(282, 22);
|
||||
this.saveAllImagesWithHtmlIndexViewToolStripMenuItem.Text = "Save all images with html index view...";
|
||||
this.saveAllImagesWithHtmlIndexViewToolStripMenuItem.Click += new System.EventHandler(this.saveAllImagesWithHtmlIndexViewToolStripMenuItem_Click);
|
||||
//
|
||||
// labelSubtitleText
|
||||
//
|
||||
@ -474,7 +481,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
// labelStartFrom
|
||||
//
|
||||
this.labelStartFrom.AutoSize = true;
|
||||
this.labelStartFrom.Location = new System.Drawing.Point(122, 28);
|
||||
this.labelStartFrom.Location = new System.Drawing.Point(120, 26);
|
||||
this.labelStartFrom.Name = "labelStartFrom";
|
||||
this.labelStartFrom.Size = new System.Drawing.Size(127, 13);
|
||||
this.labelStartFrom.TabIndex = 31;
|
||||
@ -482,7 +489,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
//
|
||||
// numericUpDownStartNumber
|
||||
//
|
||||
this.numericUpDownStartNumber.Location = new System.Drawing.Point(125, 49);
|
||||
this.numericUpDownStartNumber.Location = new System.Drawing.Point(123, 47);
|
||||
this.numericUpDownStartNumber.Maximum = new decimal(new int[] {
|
||||
99999,
|
||||
0,
|
||||
@ -505,7 +512,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
// buttonStop
|
||||
//
|
||||
this.buttonStop.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.buttonStop.Location = new System.Drawing.Point(13, 54);
|
||||
this.buttonStop.Location = new System.Drawing.Point(11, 52);
|
||||
this.buttonStop.Name = "buttonStop";
|
||||
this.buttonStop.Size = new System.Drawing.Size(105, 22);
|
||||
this.buttonStop.TabIndex = 29;
|
||||
@ -517,7 +524,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
//
|
||||
this.buttonStartOcr.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.buttonStartOcr.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.buttonStartOcr.Location = new System.Drawing.Point(13, 26);
|
||||
this.buttonStartOcr.Location = new System.Drawing.Point(11, 24);
|
||||
this.buttonStartOcr.Name = "buttonStartOcr";
|
||||
this.buttonStartOcr.Size = new System.Drawing.Size(105, 22);
|
||||
this.buttonStartOcr.TabIndex = 28;
|
||||
@ -882,13 +889,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
//
|
||||
this.openFileDialog1.FileName = "openFileDialog1";
|
||||
//
|
||||
// saveAllImagesWithHtmlIndexViewToolStripMenuItem
|
||||
//
|
||||
this.saveAllImagesWithHtmlIndexViewToolStripMenuItem.Name = "saveAllImagesWithHtmlIndexViewToolStripMenuItem";
|
||||
this.saveAllImagesWithHtmlIndexViewToolStripMenuItem.Size = new System.Drawing.Size(282, 22);
|
||||
this.saveAllImagesWithHtmlIndexViewToolStripMenuItem.Text = "Save all images with html index view...";
|
||||
this.saveAllImagesWithHtmlIndexViewToolStripMenuItem.Click += new System.EventHandler(this.saveAllImagesWithHtmlIndexViewToolStripMenuItem_Click);
|
||||
//
|
||||
// VobSubOcr
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
@ -61,6 +61,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
Text = text;
|
||||
Image = image;
|
||||
Text = text;
|
||||
Italic = italic;
|
||||
Index = index;
|
||||
}
|
||||
}
|
||||
@ -1376,6 +1377,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
StringBuilder word = new StringBuilder();
|
||||
int lettersItalics = 0;
|
||||
int lettersNonItalics = 0;
|
||||
int lineLettersNonItalics = 0;
|
||||
int wordItalics = 0;
|
||||
int wordNonItalics = 0;
|
||||
bool isItalic = false;
|
||||
@ -1389,12 +1391,14 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
else if (matches[i].Text == Environment.NewLine)
|
||||
{
|
||||
ItalicsWord(line, ref word, ref lettersItalics, ref lettersNonItalics, ref wordItalics, ref wordNonItalics, ref isItalic, "");
|
||||
ItalianLine(paragraph, ref line, ref allItalic, ref wordItalics, ref wordNonItalics, ref isItalic, Environment.NewLine);
|
||||
ItalianLine(paragraph, ref line, ref allItalic, ref wordItalics, ref wordNonItalics, ref isItalic, Environment.NewLine, lineLettersNonItalics);
|
||||
lineLettersNonItalics = 0;
|
||||
}
|
||||
else if (matches[i].Italic)
|
||||
{
|
||||
word.Append(matches[i].Text);
|
||||
lettersItalics += matches[i].Text.Length;
|
||||
lineLettersNonItalics += matches[i].Text.Length;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1406,7 +1410,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
if (word.Length > 0)
|
||||
ItalicsWord(line, ref word, ref lettersItalics, ref lettersNonItalics, ref wordItalics, ref wordNonItalics, ref isItalic, "");
|
||||
if (line.Length > 0)
|
||||
ItalianLine(paragraph, ref line, ref allItalic, ref wordItalics, ref wordNonItalics, ref isItalic, "");
|
||||
ItalianLine(paragraph, ref line, ref allItalic, ref wordItalics, ref wordNonItalics, ref isItalic, "", lineLettersNonItalics);
|
||||
|
||||
if (allItalic)
|
||||
{
|
||||
@ -1419,7 +1423,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
return paragraph.ToString();
|
||||
}
|
||||
|
||||
private static void ItalianLine(StringBuilder paragraph, ref StringBuilder line, ref bool allItalic, ref int wordItalics, ref int wordNonItalics, ref bool isItalic, string appendString)
|
||||
private static void ItalianLine(StringBuilder paragraph, ref StringBuilder line, ref bool allItalic, ref int wordItalics, ref int wordNonItalics, ref bool isItalic, string appendString, int lineLettersNonItalics)
|
||||
{
|
||||
if (isItalic)
|
||||
{
|
||||
@ -1433,7 +1437,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
paragraph.Append("<i>" + temp + "</i>");
|
||||
paragraph.Append(appendString);
|
||||
}
|
||||
else if (wordItalics > 0 && wordNonItalics == 1 && line.ToString().Trim().StartsWith("-"))
|
||||
else if (wordItalics > 0 && wordNonItalics < 2 && lineLettersNonItalics < 3 && line.ToString().Trim().StartsWith("-"))
|
||||
{
|
||||
string temp = line.ToString().Replace("<i>", "").Replace("</i>", "");
|
||||
paragraph.Append("<i>" + temp + "</i>");
|
||||
@ -1470,12 +1474,12 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
else
|
||||
{
|
||||
line.Append(word.ToString());
|
||||
if (isItalic)
|
||||
{
|
||||
line.Append("</i>");
|
||||
isItalic = false;
|
||||
}
|
||||
line.Append(word.ToString());
|
||||
line.Append(appendString);
|
||||
wordNonItalics++;
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
namespace MultiLanguage
|
||||
{
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack=2)]
|
||||
public struct tagUNICODERANGE
|
||||
|
@ -360,7 +360,7 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
int addY;
|
||||
part = CropTopAndBottom(part, out addY);
|
||||
parts.Add(new ImageSplitterItem(startX, verticalItem.Y + addY, part));
|
||||
part.Save(@"d:\temp\cursive.bmp"); // just for debugging
|
||||
//part.Save(@"d:\temp\cursive.bmp"); // just for debugging
|
||||
}
|
||||
return parts;
|
||||
}
|
||||
|
@ -811,6 +811,7 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
{
|
||||
Title = "Spell check",
|
||||
FindDoubleWords = "Find double words",
|
||||
FindDoubleLines = "Find double lines",
|
||||
SpellCheck = "&Spell check...",
|
||||
GetDictionaries = "Get dictionaries...",
|
||||
AddToNamesEtcList = "Add word to names/ect list",
|
||||
|
@ -735,6 +735,7 @@
|
||||
public string Title { get; set; }
|
||||
public string SpellCheck { get; set; }
|
||||
public string FindDoubleWords { get; set; }
|
||||
public string FindDoubleLines { get; set; }
|
||||
public string GetDictionaries { get; set; }
|
||||
public string AddToNamesEtcList { get; set; }
|
||||
}
|
||||
|
@ -250,8 +250,8 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
|
||||
Paragraph p = new Paragraph();
|
||||
p.Text = (line1 + Environment.NewLine + line2).Trim();
|
||||
p.StartTime.TotalMilliseconds = (double)((1000.0 / Configuration.Settings.General.CurrentFrameRate) * startFrame);
|
||||
p.EndTime.TotalMilliseconds = (double)((1000.0 / Configuration.Settings.General.CurrentFrameRate) * endFrame);
|
||||
p.StartTime.TotalMilliseconds = ((1000.0 / Configuration.Settings.General.CurrentFrameRate) * startFrame);
|
||||
p.EndTime.TotalMilliseconds = ((1000.0 / Configuration.Settings.General.CurrentFrameRate) * endFrame);
|
||||
|
||||
subtitle.Paragraphs.Add(p);
|
||||
i += TextLength * 2;
|
||||
|
@ -164,7 +164,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
|
||||
public EbuTextTimingInformation()
|
||||
{
|
||||
SubtitleGroupNumber = 1;
|
||||
SubtitleGroupNumber = 0;
|
||||
ExtensionBlockNumber = 255;
|
||||
CumulativeStatus = 0;
|
||||
VerticalPosition = 0x16;
|
||||
@ -186,12 +186,12 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
buffer[5] = (byte)TimeCodeInHours;
|
||||
buffer[6] = (byte)TimeCodeInMinutes;
|
||||
buffer[7] = (byte)TimeCodeInSeconds;
|
||||
buffer[8] = GetFrameFromMilliseconds(TimeCodeInMilliseconds);
|
||||
buffer[8] = GetFrameFromMilliseconds(TimeCodeInMilliseconds, header.FrameRate);
|
||||
|
||||
buffer[9] = (byte)TimeCodeOutHours;
|
||||
buffer[10] = (byte)TimeCodeOutMinutes;
|
||||
buffer[11] = (byte)TimeCodeOutSeconds;
|
||||
buffer[12] = GetFrameFromMilliseconds(TimeCodeOutMilliseconds);
|
||||
buffer[12] = GetFrameFromMilliseconds(TimeCodeOutMilliseconds, header.FrameRate);
|
||||
|
||||
buffer[13] = VerticalPosition;
|
||||
buffer[14] = JustificationCode;
|
||||
@ -315,8 +315,8 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
{
|
||||
if (i < bytes.Length)
|
||||
buffer[16 + i] = bytes[i];
|
||||
else if (i == bytes.Length)
|
||||
buffer[16 + i] = 0x8f;
|
||||
//else if (i == bytes.Length)
|
||||
// buffer[16 + i] = 0x8f;
|
||||
else
|
||||
buffer[16 + i] = 0x8f;
|
||||
}
|
||||
@ -382,10 +382,10 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
return text;
|
||||
}
|
||||
|
||||
public static byte GetFrameFromMilliseconds(int milliseconds)
|
||||
public static byte GetFrameFromMilliseconds(int milliseconds, double frameRate)
|
||||
{
|
||||
int frame = milliseconds / 41;
|
||||
return (byte)frame;
|
||||
int frame = (int)(milliseconds / (1000.0 / frameRate));
|
||||
return (byte)(frame);
|
||||
}
|
||||
}
|
||||
|
||||
@ -412,11 +412,17 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
public void Save(string fileName, Subtitle subtitle)
|
||||
{
|
||||
EbuGeneralSubtitleInformation header = new EbuGeneralSubtitleInformation();
|
||||
if (subtitle.Header != null && subtitle.Header.Length > 1024 && (subtitle.Header.Contains("STL25") || subtitle.Header.Contains("STL30")))
|
||||
header = ReadHeader(Encoding.UTF8.GetBytes(subtitle.Header));
|
||||
|
||||
EbuSaveOptions saveOptions = new EbuSaveOptions();
|
||||
if (subtitle.Header != null && subtitle.Header.Length > 1024 && (subtitle.Header.Contains("STL25") || subtitle.Header.Contains("STL30")))
|
||||
{
|
||||
header = ReadHeader(Encoding.UTF8.GetBytes(subtitle.Header));
|
||||
saveOptions.Initialize(header, 0, null, subtitle);
|
||||
}
|
||||
else
|
||||
{
|
||||
saveOptions.Initialize(header, 0, fileName, subtitle);
|
||||
}
|
||||
|
||||
if (saveOptions.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
|
||||
@ -435,7 +441,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
if (firstParagraph != null)
|
||||
{
|
||||
TimeCode tc = firstParagraph.StartTime;
|
||||
string firstTimeCode = string.Format("{0:00}{1:00}{2:00}{3:00}", tc.Hours, tc.Minutes, tc.Seconds, EbuTextTimingInformation.GetFrameFromMilliseconds(tc.Milliseconds));
|
||||
string firstTimeCode = string.Format("{0:00}{1:00}{2:00}{3:00}", tc.Hours, tc.Minutes, tc.Seconds, EbuTextTimingInformation.GetFrameFromMilliseconds(tc.Milliseconds, header.FrameRate));
|
||||
if (firstTimeCode.Length == 8)
|
||||
header.TimeCodeFirstInCue = firstTimeCode;
|
||||
}
|
||||
@ -443,6 +449,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
byte[] buffer = ASCIIEncoding.ASCII.GetBytes(header.ToString());
|
||||
fs.Write(buffer, 0, buffer.Length);
|
||||
|
||||
int subtitleNumber = 0;
|
||||
foreach (Paragraph p in subtitle.Paragraphs)
|
||||
{
|
||||
EbuTextTimingInformation tti = new EbuTextTimingInformation();
|
||||
@ -451,7 +458,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
else
|
||||
tti.VerticalPosition = 0x16;
|
||||
tti.JustificationCode = saveOptions.JustificationCode;
|
||||
tti.SubtitleNumber = (ushort)p.Number;
|
||||
tti.SubtitleNumber = (ushort)subtitleNumber;
|
||||
tti.TextField = p.Text;
|
||||
tti.TimeCodeInHours = p.StartTime.Hours;
|
||||
tti.TimeCodeInMinutes = p.StartTime.Minutes;
|
||||
@ -463,6 +470,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
tti.TimeCodeOutMilliseconds = p.EndTime.Milliseconds;
|
||||
buffer = tti.GetBytes(header);
|
||||
fs.Write(buffer, 0, buffer.Length);
|
||||
subtitleNumber++;
|
||||
}
|
||||
fs.Close();
|
||||
}
|
||||
@ -534,6 +542,9 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
header.MaximumNumberOfDisplayableRows = Encoding.ASCII.GetString(buffer, 253, 2);
|
||||
header.TimeCodeStatus = Encoding.ASCII.GetString(buffer, 255, 1);
|
||||
header.TimeCodeStartOfProgramme = Encoding.ASCII.GetString(buffer, 256, 8);
|
||||
header.CountryOfOrigin = Encoding.ASCII.GetString(buffer, 274, 3);
|
||||
header.SpareBytes = Encoding.ASCII.GetString(buffer, 373, 75);
|
||||
header.UserDefinedArea = Encoding.ASCII.GetString(buffer, 448, 576);
|
||||
|
||||
return header;
|
||||
}
|
||||
@ -831,7 +842,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
|
||||
List<EbuTextTimingInformation> list = new List<EbuTextTimingInformation>();
|
||||
int index = StartOfTTI;
|
||||
while (index + TTISize < buffer.Length)
|
||||
while (index + TTISize <= buffer.Length)
|
||||
{
|
||||
var tti = new EbuTextTimingInformation();
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
{
|
||||
|
@ -226,12 +226,6 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
|
||||
}
|
||||
}
|
||||
|
||||
private static byte[] StringToCharPointer(string s)
|
||||
{
|
||||
return Encoding.UTF8.GetBytes(s + "\0");
|
||||
}
|
||||
|
||||
|
||||
public override string PlayerName
|
||||
{
|
||||
get { return "VLC Lib Dynamic"; }
|
||||
|
@ -161,18 +161,12 @@ namespace Nikse.SubtitleEdit.Logic.VobSub
|
||||
private Bitmap GenerateBitmap(Rectangle imageDisplayArea, int imageTopFieldDataAddress, int imageBottomFieldDataAddress, List<Color> fourColors)
|
||||
{
|
||||
var bmp = new Bitmap(imageDisplayArea.Width + 1, imageDisplayArea.Height + 1);
|
||||
|
||||
// Fill with background color
|
||||
Graphics gr = Graphics.FromImage(bmp);
|
||||
gr.FillRectangle(new SolidBrush(fourColors[0]), new Rectangle(0, 0, bmp.Width, bmp.Height));
|
||||
|
||||
var fastBmp = new FastBitmap(bmp);
|
||||
fastBmp.LockImage();
|
||||
GenerateBitmap(_data, fastBmp, 0, imageTopFieldDataAddress, fourColors);
|
||||
GenerateBitmap(_data, fastBmp, 1, imageBottomFieldDataAddress, fourColors);
|
||||
Bitmap cropped = CropBitmapAndUnlok(fastBmp, fourColors[0]);
|
||||
Bitmap cropped = CropBitmapAndUnlok(fastBmp, Color.Transparent);
|
||||
bmp.Dispose();
|
||||
gr.Dispose();
|
||||
return cropped;
|
||||
}
|
||||
|
||||
@ -264,7 +258,7 @@ namespace Nikse.SubtitleEdit.Logic.VobSub
|
||||
|
||||
private static bool IsBackgroundColor(Color c, Color backgroundColor)
|
||||
{
|
||||
return c.ToArgb() == backgroundColor.ToArgb() || c.ToArgb() == Color.FromArgb(0,0,0,0).ToArgb();
|
||||
return c.ToArgb() == backgroundColor.ToArgb() || c.A == 0;
|
||||
}
|
||||
|
||||
private static void GenerateBitmap(byte[] data, FastBitmap bmp, int startY, int dataAddress, List<Color> fourColors)
|
||||
|
Loading…
Reference in New Issue
Block a user