mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 11:12:36 +01:00
Work on WebVTT
This commit is contained in:
parent
c69666b583
commit
738e8404e7
12
src/ui/Forms/Main.Designer.cs
generated
12
src/ui/Forms/Main.Designer.cs
generated
@ -575,6 +575,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
this.timerOriginalTextUndo = new System.Windows.Forms.Timer(this.components);
|
this.timerOriginalTextUndo = new System.Windows.Forms.Timer(this.components);
|
||||||
this.contextMenuStripShowVideoControls = new System.Windows.Forms.ContextMenuStrip(this.components);
|
this.contextMenuStripShowVideoControls = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||||
this.toolStripMenuItemShowVideoControls = new System.Windows.Forms.ToolStripMenuItem();
|
this.toolStripMenuItemShowVideoControls = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.toolStripMenuItemWebVttStyle = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.statusStrip1.SuspendLayout();
|
this.statusStrip1.SuspendLayout();
|
||||||
this.toolStrip1.SuspendLayout();
|
this.toolStrip1.SuspendLayout();
|
||||||
this.menuStrip1.SuspendLayout();
|
this.menuStrip1.SuspendLayout();
|
||||||
@ -2641,6 +2642,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
this.toolStripSeparatorAssa,
|
this.toolStripSeparatorAssa,
|
||||||
this.toolStripMenuItemSetRegion,
|
this.toolStripMenuItemSetRegion,
|
||||||
this.toolStripMenuItemSetLanguage,
|
this.toolStripMenuItemSetLanguage,
|
||||||
|
this.toolStripMenuItemWebVttStyle,
|
||||||
this.toolStripMenuItemWebVTT,
|
this.toolStripMenuItemWebVTT,
|
||||||
this.toolStripMenuItemPreview,
|
this.toolStripMenuItemPreview,
|
||||||
this.toolStripMenuItemDelete,
|
this.toolStripMenuItemDelete,
|
||||||
@ -2674,7 +2676,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
this.toolStripMenuItemSelectedLines,
|
this.toolStripMenuItemSelectedLines,
|
||||||
this.toolStripMenuItemGoogleMicrosoftTranslateSelLine});
|
this.toolStripMenuItemGoogleMicrosoftTranslateSelLine});
|
||||||
this.contextMenuStripListView.Name = "contextMenuStripListView";
|
this.contextMenuStripListView.Name = "contextMenuStripListView";
|
||||||
this.contextMenuStripListView.Size = new System.Drawing.Size(285, 804);
|
this.contextMenuStripListView.Size = new System.Drawing.Size(285, 848);
|
||||||
this.contextMenuStripListView.Closed += new System.Windows.Forms.ToolStripDropDownClosedEventHandler(this.MenuClosed);
|
this.contextMenuStripListView.Closed += new System.Windows.Forms.ToolStripDropDownClosedEventHandler(this.MenuClosed);
|
||||||
this.contextMenuStripListView.Opening += new System.ComponentModel.CancelEventHandler(this.ContextMenuStripListViewOpening);
|
this.contextMenuStripListView.Opening += new System.ComponentModel.CancelEventHandler(this.ContextMenuStripListViewOpening);
|
||||||
this.contextMenuStripListView.Opened += new System.EventHandler(this.MenuOpened);
|
this.contextMenuStripListView.Opened += new System.EventHandler(this.MenuOpened);
|
||||||
@ -5621,6 +5623,13 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
this.toolStripMenuItemShowVideoControls.Text = "Show video controls";
|
this.toolStripMenuItemShowVideoControls.Text = "Show video controls";
|
||||||
this.toolStripMenuItemShowVideoControls.Click += new System.EventHandler(this.toolStripMenuItemShowVideoControls_Click);
|
this.toolStripMenuItemShowVideoControls.Click += new System.EventHandler(this.toolStripMenuItemShowVideoControls_Click);
|
||||||
//
|
//
|
||||||
|
// toolStripMenuItemWebVttStyle
|
||||||
|
//
|
||||||
|
this.toolStripMenuItemWebVttStyle.Name = "toolStripMenuItemWebVttStyle";
|
||||||
|
this.toolStripMenuItemWebVttStyle.Size = new System.Drawing.Size(284, 22);
|
||||||
|
this.toolStripMenuItemWebVttStyle.Text = "WebVTT style...";
|
||||||
|
this.toolStripMenuItemWebVttStyle.Click += new System.EventHandler(this.toolStripMenuItemWebVttStyle_Click);
|
||||||
|
//
|
||||||
// Main
|
// Main
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
@ -6242,5 +6251,6 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemSetLayer;
|
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemSetLayer;
|
||||||
private System.Windows.Forms.NumericUpDown numericUpDownLayer;
|
private System.Windows.Forms.NumericUpDown numericUpDownLayer;
|
||||||
private System.Windows.Forms.Label labelLayer;
|
private System.Windows.Forms.Label labelLayer;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemWebVttStyle;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -35209,5 +35209,14 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
exportBdnXmlPng.ShowDialog(this);
|
exportBdnXmlPng.ShowDialog(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void toolStripMenuItemWebVttStyle_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var styles = WebVttHelper.GetStyles(_subtitle.Header);
|
||||||
|
using (var form = new WebVttStylePicker(styles))
|
||||||
|
{
|
||||||
|
form.ShowDialog(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -857,7 +857,7 @@
|
|||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD2
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD2
|
||||||
CAAAAk1TRnQBSQFMAgEBAgEAAcwBLgHMAS4BEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
CAAAAk1TRnQBSQFMAgEBAgEAAdQBLgHUAS4BEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||||
|
169
src/ui/Forms/VTT/WebVttStylePicker.Designer.cs
generated
Normal file
169
src/ui/Forms/VTT/WebVttStylePicker.Designer.cs
generated
Normal file
@ -0,0 +1,169 @@
|
|||||||
|
namespace Nikse.SubtitleEdit.Forms.VTT
|
||||||
|
{
|
||||||
|
sealed partial class WebVttStylePicker
|
||||||
|
{
|
||||||
|
/// <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.components = new System.ComponentModel.Container();
|
||||||
|
this.listViewExportStyles = new System.Windows.Forms.ListView();
|
||||||
|
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
|
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||||
|
this.toolStripMenuItemSelectAll = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.toolStripMenuItemInverseSelection = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.buttonOK = new System.Windows.Forms.Button();
|
||||||
|
this.buttonCancel = new System.Windows.Forms.Button();
|
||||||
|
this.saveFileDialogStyle = new System.Windows.Forms.SaveFileDialog();
|
||||||
|
this.labelStyles = new System.Windows.Forms.Label();
|
||||||
|
this.groupBoxStyle = new System.Windows.Forms.GroupBox();
|
||||||
|
this.contextMenuStrip1.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// listViewExportStyles
|
||||||
|
//
|
||||||
|
this.listViewExportStyles.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Left)));
|
||||||
|
this.listViewExportStyles.CheckBoxes = true;
|
||||||
|
this.listViewExportStyles.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||||
|
this.columnHeader1});
|
||||||
|
this.listViewExportStyles.ContextMenuStrip = this.contextMenuStrip1;
|
||||||
|
this.listViewExportStyles.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
|
||||||
|
this.listViewExportStyles.HideSelection = false;
|
||||||
|
this.listViewExportStyles.Location = new System.Drawing.Point(15, 36);
|
||||||
|
this.listViewExportStyles.Name = "listViewExportStyles";
|
||||||
|
this.listViewExportStyles.Size = new System.Drawing.Size(180, 187);
|
||||||
|
this.listViewExportStyles.TabIndex = 0;
|
||||||
|
this.listViewExportStyles.UseCompatibleStateImageBehavior = false;
|
||||||
|
this.listViewExportStyles.View = System.Windows.Forms.View.Details;
|
||||||
|
//
|
||||||
|
// contextMenuStrip1
|
||||||
|
//
|
||||||
|
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.toolStripMenuItemSelectAll,
|
||||||
|
this.toolStripMenuItemInverseSelection});
|
||||||
|
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||||
|
this.contextMenuStrip1.Size = new System.Drawing.Size(162, 48);
|
||||||
|
//
|
||||||
|
// toolStripMenuItemSelectAll
|
||||||
|
//
|
||||||
|
this.toolStripMenuItemSelectAll.Name = "toolStripMenuItemSelectAll";
|
||||||
|
this.toolStripMenuItemSelectAll.Size = new System.Drawing.Size(161, 22);
|
||||||
|
this.toolStripMenuItemSelectAll.Text = "Select all";
|
||||||
|
this.toolStripMenuItemSelectAll.Click += new System.EventHandler(this.toolStripMenuItemSelectAll_Click);
|
||||||
|
//
|
||||||
|
// toolStripMenuItemInverseSelection
|
||||||
|
//
|
||||||
|
this.toolStripMenuItemInverseSelection.Name = "toolStripMenuItemInverseSelection";
|
||||||
|
this.toolStripMenuItemInverseSelection.Size = new System.Drawing.Size(161, 22);
|
||||||
|
this.toolStripMenuItemInverseSelection.Text = "Inverse selection";
|
||||||
|
this.toolStripMenuItemInverseSelection.Click += new System.EventHandler(this.toolStripMenuItemInverseSelection_Click);
|
||||||
|
//
|
||||||
|
// buttonOK
|
||||||
|
//
|
||||||
|
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(361, 231);
|
||||||
|
this.buttonOK.Name = "buttonOK";
|
||||||
|
this.buttonOK.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.buttonOK.TabIndex = 4;
|
||||||
|
this.buttonOK.Text = "&OK";
|
||||||
|
this.buttonOK.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
|
||||||
|
//
|
||||||
|
// buttonCancel
|
||||||
|
//
|
||||||
|
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(445, 231);
|
||||||
|
this.buttonCancel.Name = "buttonCancel";
|
||||||
|
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.buttonCancel.TabIndex = 5;
|
||||||
|
this.buttonCancel.Text = "C&ancel";
|
||||||
|
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// saveFileDialogStyle
|
||||||
|
//
|
||||||
|
this.saveFileDialogStyle.OverwritePrompt = false;
|
||||||
|
//
|
||||||
|
// labelStyles
|
||||||
|
//
|
||||||
|
this.labelStyles.AutoSize = true;
|
||||||
|
this.labelStyles.Location = new System.Drawing.Point(12, 20);
|
||||||
|
this.labelStyles.Name = "labelStyles";
|
||||||
|
this.labelStyles.Size = new System.Drawing.Size(35, 13);
|
||||||
|
this.labelStyles.TabIndex = 6;
|
||||||
|
this.labelStyles.Text = "Styles";
|
||||||
|
//
|
||||||
|
// groupBoxStyle
|
||||||
|
//
|
||||||
|
this.groupBoxStyle.Location = new System.Drawing.Point(201, 38);
|
||||||
|
this.groupBoxStyle.Name = "groupBoxStyle";
|
||||||
|
this.groupBoxStyle.Size = new System.Drawing.Size(319, 187);
|
||||||
|
this.groupBoxStyle.TabIndex = 7;
|
||||||
|
this.groupBoxStyle.TabStop = false;
|
||||||
|
this.groupBoxStyle.Text = "Style";
|
||||||
|
//
|
||||||
|
// WebVttIStylePicker
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(532, 264);
|
||||||
|
this.Controls.Add(this.groupBoxStyle);
|
||||||
|
this.Controls.Add(this.labelStyles);
|
||||||
|
this.Controls.Add(this.buttonOK);
|
||||||
|
this.Controls.Add(this.buttonCancel);
|
||||||
|
this.Controls.Add(this.listViewExportStyles);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||||
|
this.KeyPreview = true;
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "WebVttStylePicker";
|
||||||
|
this.ShowIcon = false;
|
||||||
|
this.ShowInTaskbar = false;
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
|
this.Text = "SubStationAlphaStylesExport";
|
||||||
|
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.WebVttImportExport_KeyDown);
|
||||||
|
this.contextMenuStrip1.ResumeLayout(false);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.ListView listViewExportStyles;
|
||||||
|
private System.Windows.Forms.Button buttonOK;
|
||||||
|
private System.Windows.Forms.Button buttonCancel;
|
||||||
|
private System.Windows.Forms.SaveFileDialog saveFileDialogStyle;
|
||||||
|
private System.Windows.Forms.ColumnHeader columnHeader1;
|
||||||
|
private System.Windows.Forms.Label labelStyles;
|
||||||
|
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemSelectAll;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemInverseSelection;
|
||||||
|
private System.Windows.Forms.GroupBox groupBoxStyle;
|
||||||
|
}
|
||||||
|
}
|
63
src/ui/Forms/VTT/WebVttStylePicker.cs
Normal file
63
src/ui/Forms/VTT/WebVttStylePicker.cs
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
using Nikse.SubtitleEdit.Core.Common;
|
||||||
|
using Nikse.SubtitleEdit.Logic;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace Nikse.SubtitleEdit.Forms.VTT
|
||||||
|
{
|
||||||
|
public sealed partial class WebVttStylePicker : Form
|
||||||
|
{
|
||||||
|
private readonly List<WebVttStyle> _styles;
|
||||||
|
public List<WebVttStyle> ImportExportStyles { get; set; }
|
||||||
|
|
||||||
|
public WebVttStylePicker(List<WebVttStyle> styles)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
UiUtil.FixFonts(this);
|
||||||
|
|
||||||
|
_styles = styles;
|
||||||
|
listViewExportStyles.Columns[0].Width = listViewExportStyles.Width - 20;
|
||||||
|
foreach (var style in _styles)
|
||||||
|
{
|
||||||
|
listViewExportStyles.Items.Add(new ListViewItem(style.Name) { Checked = true, Tag = style });
|
||||||
|
}
|
||||||
|
|
||||||
|
Text = LanguageSettings.Current.SubStationAlphaStyles.Export;
|
||||||
|
labelStyles.Text = LanguageSettings.Current.SubStationAlphaStyles.Styles;
|
||||||
|
toolStripMenuItemInverseSelection.Text = LanguageSettings.Current.Main.Menu.Edit.InverseSelection;
|
||||||
|
toolStripMenuItemSelectAll.Text = LanguageSettings.Current.Main.Menu.ContextMenu.SelectAll;
|
||||||
|
buttonOK.Text = LanguageSettings.Current.General.Ok;
|
||||||
|
buttonCancel.Text = LanguageSettings.Current.General.Cancel;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonOK_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void WebVttImportExport_KeyDown(object sender, KeyEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.KeyCode == Keys.Escape)
|
||||||
|
{
|
||||||
|
DialogResult = DialogResult.Cancel;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void toolStripMenuItemSelectAll_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
foreach (ListViewItem item in listViewExportStyles.Items)
|
||||||
|
{
|
||||||
|
item.Checked = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void toolStripMenuItemInverseSelection_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
foreach (ListViewItem item in listViewExportStyles.Items)
|
||||||
|
{
|
||||||
|
item.Checked = !item.Checked;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
126
src/ui/Forms/VTT/WebVttStylePicker.resx
Normal file
126
src/ui/Forms/VTT/WebVttStylePicker.resx
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>172, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="saveFileDialogStyle.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
</root>
|
@ -1366,6 +1366,12 @@
|
|||||||
<Compile Include="Forms\Ocr\VobSubOcrSetItalicFactor.Designer.cs">
|
<Compile Include="Forms\Ocr\VobSubOcrSetItalicFactor.Designer.cs">
|
||||||
<DependentUpon>VobSubOcrSetItalicFactor.cs</DependentUpon>
|
<DependentUpon>VobSubOcrSetItalicFactor.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Forms\VTT\WebVttStylePicker.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Forms\VTT\WebVttStylePicker.Designer.cs">
|
||||||
|
<DependentUpon>WebVttStylePicker.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Forms\VTT\WebVttImportExport.cs">
|
<Compile Include="Forms\VTT\WebVttImportExport.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@ -2139,6 +2145,9 @@
|
|||||||
<EmbeddedResource Include="Forms\Ocr\VobSubOcrSetItalicFactor.resx">
|
<EmbeddedResource Include="Forms\Ocr\VobSubOcrSetItalicFactor.resx">
|
||||||
<DependentUpon>VobSubOcrSetItalicFactor.cs</DependentUpon>
|
<DependentUpon>VobSubOcrSetItalicFactor.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Forms\VTT\WebVttStylePicker.resx">
|
||||||
|
<DependentUpon>WebVttStylePicker.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Forms\VTT\WebVttImportExport.resx">
|
<EmbeddedResource Include="Forms\VTT\WebVttImportExport.resx">
|
||||||
<DependentUpon>WebVttImportExport.cs</DependentUpon>
|
<DependentUpon>WebVttImportExport.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
Loading…
Reference in New Issue
Block a user