Working on Timed Text 1.0 subtitle format + started on EBU save dialog

git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@388 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
niksedk 2011-04-08 13:22:20 +00:00
parent fb24594c5c
commit e79da4ff4a
7 changed files with 408 additions and 1 deletions

234
src/Forms/EbuSaveOptions.Designer.cs generated Normal file
View File

@ -0,0 +1,234 @@
namespace Nikse.SubtitleEdit.Forms
{
partial class EbuSaveOptions
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.textBox4 = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.textBox6 = new System.Windows.Forms.TextBox();
this.buttonOK = new System.Windows.Forms.Button();
this.buttonCancel = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(23, 21);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(102, 13);
this.label1.TabIndex = 0;
this.label1.Text = "Original program title";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(164, 18);
this.textBox1.MaxLength = 32;
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(219, 20);
this.textBox1.TabIndex = 1;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(23, 47);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(101, 13);
this.label2.TabIndex = 2;
this.label2.Text = "Original episode title";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(23, 73);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(117, 13);
this.label3.TabIndex = 3;
this.label3.Text = "Translated program title";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(23, 99);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(116, 13);
this.label4.TabIndex = 4;
this.label4.Text = "Translated episode title";
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(164, 44);
this.textBox2.MaxLength = 32;
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(219, 20);
this.textBox2.TabIndex = 5;
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(164, 96);
this.textBox3.MaxLength = 32;
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(219, 20);
this.textBox3.TabIndex = 6;
//
// textBox4
//
this.textBox4.Location = new System.Drawing.Point(164, 70);
this.textBox4.MaxLength = 32;
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(219, 20);
this.textBox4.TabIndex = 7;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(23, 125);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(106, 13);
this.label5.TabIndex = 8;
this.label5.Text = "Character code table";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(24, 179);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(34, 13);
this.label6.TabIndex = 10;
this.label6.Text = "Errors";
//
// textBox6
//
this.textBox6.Location = new System.Drawing.Point(27, 195);
this.textBox6.Multiline = true;
this.textBox6.Name = "textBox6";
this.textBox6.Size = new System.Drawing.Size(577, 148);
this.textBox6.TabIndex = 11;
//
// buttonOK
//
this.buttonOK.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonOK.Location = new System.Drawing.Point(448, 349);
this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(75, 21);
this.buttonOK.TabIndex = 19;
this.buttonOK.Text = "Save";
this.buttonOK.UseVisualStyleBackColor = true;
//
// buttonCancel
//
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonCancel.Location = new System.Drawing.Point(529, 349);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(75, 21);
this.buttonCancel.TabIndex = 18;
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
//
// button1
//
this.button1.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.button1.Location = new System.Drawing.Point(512, 13);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(92, 21);
this.button1.TabIndex = 20;
this.button1.Text = "Import...";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// comboBox1
//
this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Location = new System.Drawing.Point(164, 125);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(219, 21);
this.comboBox1.TabIndex = 21;
//
// openFileDialog1
//
this.openFileDialog1.FileName = "openFileDialog1";
//
// EbuSaveOptions
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(629, 378);
this.Controls.Add(this.comboBox1);
this.Controls.Add(this.button1);
this.Controls.Add(this.buttonOK);
this.Controls.Add(this.buttonCancel);
this.Controls.Add(this.textBox6);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
this.Controls.Add(this.textBox4);
this.Controls.Add(this.textBox3);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.label1);
this.Name = "EbuSaveOptions";
this.Text = "EbuSaveOptions";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox textBox6;
private System.Windows.Forms.Button buttonOK;
private System.Windows.Forms.Button buttonCancel;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.OpenFileDialog openFileDialog1;
}
}

View File

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Nikse.SubtitleEdit.Forms
{
public partial class EbuSaveOptions : Form
{
public EbuSaveOptions()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
openFileDialog1.Filter = "Ebu stl files (*.stl)|*.stl";
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
}
}
}
}

View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@ -25,6 +25,7 @@ namespace Nikse.SubtitleEdit.Logic
public LanguageStructure.CompareSubtitles CompareSubtitles;
public LanguageStructure.DvdSubRip DvdSubrip;
public LanguageStructure.DvdSubRipChooseLanguage DvdSubRipChooseLanguage;
public LanguageStructure.EbuSaveOtpions EbuSaveOtpions;
public LanguageStructure.EffectKaraoke EffectKaraoke;
public LanguageStructure.EffectTypewriter EffectTypewriter;
public LanguageStructure.FindDialog FindDialog;
@ -278,6 +279,11 @@ namespace Nikse.SubtitleEdit.Logic
SubtitleImage = "Subtitle image",
};
EbuSaveOtpions = new LanguageStructure.EbuSaveOtpions
{
Title = "EBU save options",
};
EffectKaraoke = new LanguageStructure.EffectKaraoke
{
Title = "Karaoke effect",

View File

@ -206,6 +206,14 @@
public string SubtitleImage { get; set; }
}
public class EbuSaveOtpions
{
public string Title { get; set; }
public string xxx { get; set; }
public string yyy { get; set; }
public string zzz { get; set; }
}
public class EffectKaraoke
{
public string Title { get; set; }

View File

@ -201,7 +201,8 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
else
{
endCode = new TimeCode(TimeSpan.FromMilliseconds(startCode.TotalMilliseconds + 3000));
}
}
startSeconds = endCode.TotalSeconds;
subtitle.Paragraphs.Add(new Paragraph(startCode, endCode, pText.ToString()));
}

View File

@ -177,6 +177,12 @@
<Compile Include="Forms\AdjustDisplayDuration.Designer.cs">
<DependentUpon>AdjustDisplayDuration.cs</DependentUpon>
</Compile>
<Compile Include="Forms\EbuSaveOptions.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\EbuSaveOptions.Designer.cs">
<DependentUpon>EbuSaveOptions.cs</DependentUpon>
</Compile>
<Compile Include="Forms\EffectKaraoke.cs">
<SubType>Form</SubType>
</Compile>
@ -651,6 +657,9 @@
<DependentUpon>AdjustDisplayDuration.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Forms\EbuSaveOptions.resx">
<DependentUpon>EbuSaveOptions.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\EffectKaraoke.resx">
<DependentUpon>EffectKaraoke.cs</DependentUpon>
<SubType>Designer</SubType>