mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 22:42:38 +01:00
Export PNG + hunspell spell checking working on linux - thx for linux info Hawke :)
git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@395 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
parent
cb27f24dd3
commit
e20656f117
381
src/Forms/ExportPngXml.Designer.cs
generated
Normal file
381
src/Forms/ExportPngXml.Designer.cs
generated
Normal file
@ -0,0 +1,381 @@
|
|||||||
|
namespace Nikse.SubtitleEdit.Forms
|
||||||
|
{
|
||||||
|
partial class ExportPngXml
|
||||||
|
{
|
||||||
|
/// <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.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||||
|
this.buttonExport = new System.Windows.Forms.Button();
|
||||||
|
this.buttonCancel = new System.Windows.Forms.Button();
|
||||||
|
this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
|
||||||
|
this.progressBar1 = new System.Windows.Forms.ProgressBar();
|
||||||
|
this.groupBoxImageSettings = new System.Windows.Forms.GroupBox();
|
||||||
|
this.checkBoxAntiAlias = new System.Windows.Forms.CheckBox();
|
||||||
|
this.labelSubtitleFontSize = new System.Windows.Forms.Label();
|
||||||
|
this.comboBoxSubtitleFont = new System.Windows.Forms.ComboBox();
|
||||||
|
this.comboBoxSubtitleFontSize = new System.Windows.Forms.ComboBox();
|
||||||
|
this.labelSubtitleFont = new System.Windows.Forms.Label();
|
||||||
|
this.labelBorderWidth = new System.Windows.Forms.Label();
|
||||||
|
this.comboBoxBorderWidth = new System.Windows.Forms.ComboBox();
|
||||||
|
this.panelBorderColor = new System.Windows.Forms.Panel();
|
||||||
|
this.buttonBorderColor = new System.Windows.Forms.Button();
|
||||||
|
this.panelColor = new System.Windows.Forms.Panel();
|
||||||
|
this.buttonColor = new System.Windows.Forms.Button();
|
||||||
|
this.colorDialog1 = new System.Windows.Forms.ColorDialog();
|
||||||
|
this.labelImageResolution = new System.Windows.Forms.Label();
|
||||||
|
this.subtitleListView1 = new Nikse.SubtitleEdit.Controls.SubtitleListView();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||||
|
this.groupBoxImageSettings.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// pictureBox1
|
||||||
|
//
|
||||||
|
this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.pictureBox1.Location = new System.Drawing.Point(12, 243);
|
||||||
|
this.pictureBox1.Name = "pictureBox1";
|
||||||
|
this.pictureBox1.Size = new System.Drawing.Size(698, 132);
|
||||||
|
this.pictureBox1.TabIndex = 1;
|
||||||
|
this.pictureBox1.TabStop = false;
|
||||||
|
//
|
||||||
|
// buttonExport
|
||||||
|
//
|
||||||
|
this.buttonExport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.buttonExport.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||||
|
this.buttonExport.Location = new System.Drawing.Point(503, 381);
|
||||||
|
this.buttonExport.Name = "buttonExport";
|
||||||
|
this.buttonExport.Size = new System.Drawing.Size(126, 21);
|
||||||
|
this.buttonExport.TabIndex = 19;
|
||||||
|
this.buttonExport.Text = "Export all lines...";
|
||||||
|
this.buttonExport.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonExport.Click += new System.EventHandler(this.buttonExport_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(635, 381);
|
||||||
|
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;
|
||||||
|
//
|
||||||
|
// progressBar1
|
||||||
|
//
|
||||||
|
this.progressBar1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.progressBar1.Location = new System.Drawing.Point(12, 381);
|
||||||
|
this.progressBar1.Name = "progressBar1";
|
||||||
|
this.progressBar1.Size = new System.Drawing.Size(485, 21);
|
||||||
|
this.progressBar1.TabIndex = 20;
|
||||||
|
this.progressBar1.Visible = false;
|
||||||
|
//
|
||||||
|
// groupBoxImageSettings
|
||||||
|
//
|
||||||
|
this.groupBoxImageSettings.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.groupBoxImageSettings.Controls.Add(this.checkBoxAntiAlias);
|
||||||
|
this.groupBoxImageSettings.Controls.Add(this.labelSubtitleFontSize);
|
||||||
|
this.groupBoxImageSettings.Controls.Add(this.comboBoxSubtitleFont);
|
||||||
|
this.groupBoxImageSettings.Controls.Add(this.comboBoxSubtitleFontSize);
|
||||||
|
this.groupBoxImageSettings.Controls.Add(this.labelSubtitleFont);
|
||||||
|
this.groupBoxImageSettings.Controls.Add(this.labelBorderWidth);
|
||||||
|
this.groupBoxImageSettings.Controls.Add(this.comboBoxBorderWidth);
|
||||||
|
this.groupBoxImageSettings.Controls.Add(this.panelBorderColor);
|
||||||
|
this.groupBoxImageSettings.Controls.Add(this.buttonBorderColor);
|
||||||
|
this.groupBoxImageSettings.Controls.Add(this.panelColor);
|
||||||
|
this.groupBoxImageSettings.Controls.Add(this.buttonColor);
|
||||||
|
this.groupBoxImageSettings.Location = new System.Drawing.Point(12, 150);
|
||||||
|
this.groupBoxImageSettings.Name = "groupBoxImageSettings";
|
||||||
|
this.groupBoxImageSettings.Size = new System.Drawing.Size(698, 87);
|
||||||
|
this.groupBoxImageSettings.TabIndex = 21;
|
||||||
|
this.groupBoxImageSettings.TabStop = false;
|
||||||
|
this.groupBoxImageSettings.Text = "Image settings";
|
||||||
|
//
|
||||||
|
// checkBoxAntiAlias
|
||||||
|
//
|
||||||
|
this.checkBoxAntiAlias.AutoSize = true;
|
||||||
|
this.checkBoxAntiAlias.Checked = true;
|
||||||
|
this.checkBoxAntiAlias.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||||
|
this.checkBoxAntiAlias.Location = new System.Drawing.Point(276, 55);
|
||||||
|
this.checkBoxAntiAlias.Name = "checkBoxAntiAlias";
|
||||||
|
this.checkBoxAntiAlias.Size = new System.Drawing.Size(66, 17);
|
||||||
|
this.checkBoxAntiAlias.TabIndex = 21;
|
||||||
|
this.checkBoxAntiAlias.Text = "AntiAlias";
|
||||||
|
this.checkBoxAntiAlias.UseVisualStyleBackColor = true;
|
||||||
|
this.checkBoxAntiAlias.CheckedChanged += new System.EventHandler(this.checkBoxAntiAlias_CheckedChanged);
|
||||||
|
//
|
||||||
|
// labelSubtitleFontSize
|
||||||
|
//
|
||||||
|
this.labelSubtitleFontSize.AutoSize = true;
|
||||||
|
this.labelSubtitleFontSize.Location = new System.Drawing.Point(10, 54);
|
||||||
|
this.labelSubtitleFontSize.Name = "labelSubtitleFontSize";
|
||||||
|
this.labelSubtitleFontSize.Size = new System.Drawing.Size(84, 13);
|
||||||
|
this.labelSubtitleFontSize.TabIndex = 20;
|
||||||
|
this.labelSubtitleFontSize.Text = "Subtitle font size";
|
||||||
|
//
|
||||||
|
// comboBoxSubtitleFont
|
||||||
|
//
|
||||||
|
this.comboBoxSubtitleFont.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
|
this.comboBoxSubtitleFont.FormattingEnabled = true;
|
||||||
|
this.comboBoxSubtitleFont.Location = new System.Drawing.Point(100, 24);
|
||||||
|
this.comboBoxSubtitleFont.Name = "comboBoxSubtitleFont";
|
||||||
|
this.comboBoxSubtitleFont.Size = new System.Drawing.Size(121, 21);
|
||||||
|
this.comboBoxSubtitleFont.TabIndex = 17;
|
||||||
|
this.comboBoxSubtitleFont.SelectedValueChanged += new System.EventHandler(this.comboBoxSubtitleFont_SelectedValueChanged);
|
||||||
|
//
|
||||||
|
// comboBoxSubtitleFontSize
|
||||||
|
//
|
||||||
|
this.comboBoxSubtitleFontSize.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
|
this.comboBoxSubtitleFontSize.FormattingEnabled = true;
|
||||||
|
this.comboBoxSubtitleFontSize.Items.AddRange(new object[] {
|
||||||
|
"15",
|
||||||
|
"16",
|
||||||
|
"17",
|
||||||
|
"18",
|
||||||
|
"19",
|
||||||
|
"20",
|
||||||
|
"21",
|
||||||
|
"22",
|
||||||
|
"23",
|
||||||
|
"24",
|
||||||
|
"25",
|
||||||
|
"26",
|
||||||
|
"27",
|
||||||
|
"28",
|
||||||
|
"29",
|
||||||
|
"30",
|
||||||
|
"31",
|
||||||
|
"32",
|
||||||
|
"33",
|
||||||
|
"34",
|
||||||
|
"35",
|
||||||
|
"36",
|
||||||
|
"37",
|
||||||
|
"38",
|
||||||
|
"39",
|
||||||
|
"40",
|
||||||
|
"41",
|
||||||
|
"42",
|
||||||
|
"43",
|
||||||
|
"44",
|
||||||
|
"45",
|
||||||
|
"46",
|
||||||
|
"47",
|
||||||
|
"48",
|
||||||
|
"49",
|
||||||
|
"50",
|
||||||
|
"51",
|
||||||
|
"52",
|
||||||
|
"53",
|
||||||
|
"54",
|
||||||
|
"55",
|
||||||
|
"56",
|
||||||
|
"57",
|
||||||
|
"58",
|
||||||
|
"59",
|
||||||
|
"60",
|
||||||
|
"61",
|
||||||
|
"62",
|
||||||
|
"63",
|
||||||
|
"64",
|
||||||
|
"65",
|
||||||
|
"66",
|
||||||
|
"67",
|
||||||
|
"68",
|
||||||
|
"69",
|
||||||
|
"70",
|
||||||
|
"71",
|
||||||
|
"72",
|
||||||
|
"73",
|
||||||
|
"74",
|
||||||
|
"75",
|
||||||
|
"80",
|
||||||
|
"85",
|
||||||
|
"90",
|
||||||
|
"100"});
|
||||||
|
this.comboBoxSubtitleFontSize.Location = new System.Drawing.Point(100, 51);
|
||||||
|
this.comboBoxSubtitleFontSize.Name = "comboBoxSubtitleFontSize";
|
||||||
|
this.comboBoxSubtitleFontSize.Size = new System.Drawing.Size(121, 21);
|
||||||
|
this.comboBoxSubtitleFontSize.TabIndex = 18;
|
||||||
|
this.comboBoxSubtitleFontSize.SelectedIndexChanged += new System.EventHandler(this.comboBoxSubtitleFontSize_SelectedIndexChanged);
|
||||||
|
//
|
||||||
|
// labelSubtitleFont
|
||||||
|
//
|
||||||
|
this.labelSubtitleFont.AutoSize = true;
|
||||||
|
this.labelSubtitleFont.Location = new System.Drawing.Point(10, 27);
|
||||||
|
this.labelSubtitleFont.Name = "labelSubtitleFont";
|
||||||
|
this.labelSubtitleFont.Size = new System.Drawing.Size(63, 13);
|
||||||
|
this.labelSubtitleFont.TabIndex = 19;
|
||||||
|
this.labelSubtitleFont.Text = "Subtitle font";
|
||||||
|
//
|
||||||
|
// labelBorderWidth
|
||||||
|
//
|
||||||
|
this.labelBorderWidth.AutoSize = true;
|
||||||
|
this.labelBorderWidth.Location = new System.Drawing.Point(470, 56);
|
||||||
|
this.labelBorderWidth.Name = "labelBorderWidth";
|
||||||
|
this.labelBorderWidth.Size = new System.Drawing.Size(66, 13);
|
||||||
|
this.labelBorderWidth.TabIndex = 16;
|
||||||
|
this.labelBorderWidth.Text = "Border width";
|
||||||
|
//
|
||||||
|
// comboBoxBorderWidth
|
||||||
|
//
|
||||||
|
this.comboBoxBorderWidth.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
|
this.comboBoxBorderWidth.FormattingEnabled = true;
|
||||||
|
this.comboBoxBorderWidth.Items.AddRange(new object[] {
|
||||||
|
"0",
|
||||||
|
"1",
|
||||||
|
"2",
|
||||||
|
"3",
|
||||||
|
"4",
|
||||||
|
"5"});
|
||||||
|
this.comboBoxBorderWidth.Location = new System.Drawing.Point(537, 51);
|
||||||
|
this.comboBoxBorderWidth.Name = "comboBoxBorderWidth";
|
||||||
|
this.comboBoxBorderWidth.Size = new System.Drawing.Size(121, 21);
|
||||||
|
this.comboBoxBorderWidth.TabIndex = 15;
|
||||||
|
this.comboBoxBorderWidth.SelectedIndexChanged += new System.EventHandler(this.comboBoxBorderWidth_SelectedIndexChanged);
|
||||||
|
//
|
||||||
|
// panelBorderColor
|
||||||
|
//
|
||||||
|
this.panelBorderColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||||
|
this.panelBorderColor.Location = new System.Drawing.Point(664, 25);
|
||||||
|
this.panelBorderColor.Name = "panelBorderColor";
|
||||||
|
this.panelBorderColor.Size = new System.Drawing.Size(21, 20);
|
||||||
|
this.panelBorderColor.TabIndex = 14;
|
||||||
|
this.panelBorderColor.MouseClick += new System.Windows.Forms.MouseEventHandler(this.panelBorderColor_MouseClick);
|
||||||
|
//
|
||||||
|
// buttonBorderColor
|
||||||
|
//
|
||||||
|
this.buttonBorderColor.Location = new System.Drawing.Point(537, 24);
|
||||||
|
this.buttonBorderColor.Name = "buttonBorderColor";
|
||||||
|
this.buttonBorderColor.Size = new System.Drawing.Size(121, 21);
|
||||||
|
this.buttonBorderColor.TabIndex = 13;
|
||||||
|
this.buttonBorderColor.Text = "Border color";
|
||||||
|
this.buttonBorderColor.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonBorderColor.Click += new System.EventHandler(this.buttonBorderColor_Click);
|
||||||
|
//
|
||||||
|
// panelColor
|
||||||
|
//
|
||||||
|
this.panelColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||||
|
this.panelColor.Location = new System.Drawing.Point(403, 25);
|
||||||
|
this.panelColor.Name = "panelColor";
|
||||||
|
this.panelColor.Size = new System.Drawing.Size(21, 20);
|
||||||
|
this.panelColor.TabIndex = 12;
|
||||||
|
this.panelColor.MouseClick += new System.Windows.Forms.MouseEventHandler(this.panelColor_MouseClick);
|
||||||
|
//
|
||||||
|
// buttonColor
|
||||||
|
//
|
||||||
|
this.buttonColor.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||||
|
this.buttonColor.Location = new System.Drawing.Point(276, 24);
|
||||||
|
this.buttonColor.Name = "buttonColor";
|
||||||
|
this.buttonColor.Size = new System.Drawing.Size(121, 21);
|
||||||
|
this.buttonColor.TabIndex = 11;
|
||||||
|
this.buttonColor.Text = "Color";
|
||||||
|
this.buttonColor.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonColor.Click += new System.EventHandler(this.buttonColor_Click);
|
||||||
|
//
|
||||||
|
// labelImageResolution
|
||||||
|
//
|
||||||
|
this.labelImageResolution.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.labelImageResolution.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
this.labelImageResolution.Location = new System.Drawing.Point(635, 238);
|
||||||
|
this.labelImageResolution.Name = "labelImageResolution";
|
||||||
|
this.labelImageResolution.Size = new System.Drawing.Size(73, 14);
|
||||||
|
this.labelImageResolution.TabIndex = 22;
|
||||||
|
this.labelImageResolution.Text = "320x240";
|
||||||
|
this.labelImageResolution.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
||||||
|
//
|
||||||
|
// subtitleListView1
|
||||||
|
//
|
||||||
|
this.subtitleListView1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.subtitleListView1.FirstVisibleIndex = -1;
|
||||||
|
this.subtitleListView1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.subtitleListView1.FullRowSelect = true;
|
||||||
|
this.subtitleListView1.GridLines = true;
|
||||||
|
this.subtitleListView1.Location = new System.Drawing.Point(12, 12);
|
||||||
|
this.subtitleListView1.Name = "subtitleListView1";
|
||||||
|
this.subtitleListView1.Size = new System.Drawing.Size(698, 131);
|
||||||
|
this.subtitleListView1.TabIndex = 0;
|
||||||
|
this.subtitleListView1.UseCompatibleStateImageBehavior = false;
|
||||||
|
this.subtitleListView1.View = System.Windows.Forms.View.Details;
|
||||||
|
this.subtitleListView1.SelectedIndexChanged += new System.EventHandler(this.subtitleListView1_SelectedIndexChanged);
|
||||||
|
//
|
||||||
|
// ExportPngXml
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(716, 407);
|
||||||
|
this.Controls.Add(this.labelImageResolution);
|
||||||
|
this.Controls.Add(this.groupBoxImageSettings);
|
||||||
|
this.Controls.Add(this.progressBar1);
|
||||||
|
this.Controls.Add(this.buttonExport);
|
||||||
|
this.Controls.Add(this.buttonCancel);
|
||||||
|
this.Controls.Add(this.pictureBox1);
|
||||||
|
this.Controls.Add(this.subtitleListView1);
|
||||||
|
this.KeyPreview = true;
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.MinimumSize = new System.Drawing.Size(730, 430);
|
||||||
|
this.Name = "ExportPngXml";
|
||||||
|
this.ShowIcon = false;
|
||||||
|
this.Text = "ExportPngXml";
|
||||||
|
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ExportPngXml_KeyDown);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||||
|
this.groupBoxImageSettings.ResumeLayout(false);
|
||||||
|
this.groupBoxImageSettings.PerformLayout();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private Controls.SubtitleListView subtitleListView1;
|
||||||
|
private System.Windows.Forms.PictureBox pictureBox1;
|
||||||
|
private System.Windows.Forms.Button buttonExport;
|
||||||
|
private System.Windows.Forms.Button buttonCancel;
|
||||||
|
private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
|
||||||
|
private System.Windows.Forms.ProgressBar progressBar1;
|
||||||
|
private System.Windows.Forms.GroupBox groupBoxImageSettings;
|
||||||
|
private System.Windows.Forms.Label labelBorderWidth;
|
||||||
|
private System.Windows.Forms.ComboBox comboBoxBorderWidth;
|
||||||
|
private System.Windows.Forms.Panel panelBorderColor;
|
||||||
|
private System.Windows.Forms.Button buttonBorderColor;
|
||||||
|
private System.Windows.Forms.Panel panelColor;
|
||||||
|
private System.Windows.Forms.Button buttonColor;
|
||||||
|
private System.Windows.Forms.Label labelSubtitleFontSize;
|
||||||
|
private System.Windows.Forms.ComboBox comboBoxSubtitleFont;
|
||||||
|
private System.Windows.Forms.ComboBox comboBoxSubtitleFontSize;
|
||||||
|
private System.Windows.Forms.Label labelSubtitleFont;
|
||||||
|
private System.Windows.Forms.ColorDialog colorDialog1;
|
||||||
|
private System.Windows.Forms.CheckBox checkBoxAntiAlias;
|
||||||
|
private System.Windows.Forms.Label labelImageResolution;
|
||||||
|
}
|
||||||
|
}
|
251
src/Forms/ExportPngXml.cs
Normal file
251
src/Forms/ExportPngXml.cs
Normal file
@ -0,0 +1,251 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Text;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using System.Drawing.Text;
|
||||||
|
using System.Drawing.Drawing2D;
|
||||||
|
using Nikse.SubtitleEdit.Logic;
|
||||||
|
using System.Xml;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
namespace Nikse.SubtitleEdit.Forms
|
||||||
|
{
|
||||||
|
public sealed partial class ExportPngXml : Form
|
||||||
|
{
|
||||||
|
Subtitle _subtitle;
|
||||||
|
Color _subtitleColor = Color.White;
|
||||||
|
string _subtitleFontName = "Verdana";
|
||||||
|
float _subtitleFontSize = 75.0f;
|
||||||
|
Color _borderColor = Color.Black;
|
||||||
|
float _borderWidth = 2.0f;
|
||||||
|
bool _isLoading = true;
|
||||||
|
|
||||||
|
public ExportPngXml()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string BdnXmlTimeCode(TimeCode timecode)
|
||||||
|
{
|
||||||
|
int frames = timecode.Milliseconds / 40; // 40==25fps (1000/25)
|
||||||
|
return string.Format("{0:00}:{1:00}:{2:00}:{3:00}", timecode.Hours, timecode.Minutes, timecode.Seconds, frames);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonExport_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
SetupImageParameters();
|
||||||
|
|
||||||
|
if (folderBrowserDialog1.ShowDialog(this) == DialogResult.OK)
|
||||||
|
{
|
||||||
|
progressBar1.Value = 0;
|
||||||
|
progressBar1.Maximum = _subtitle.Paragraphs.Count-1;
|
||||||
|
progressBar1.Visible = true;
|
||||||
|
const int height = 1080;
|
||||||
|
const int width = 1920;
|
||||||
|
const int border = 25;
|
||||||
|
int imagesSavedCount = 0;
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
for (int i = 0; i < _subtitle.Paragraphs.Count; i++)
|
||||||
|
{
|
||||||
|
Bitmap bmp = GenerateImageFromText(_subtitle.Paragraphs[i].Text);
|
||||||
|
string numberString = string.Format("{0:0000}", i + 1);
|
||||||
|
if (bmp != null)
|
||||||
|
{
|
||||||
|
|
||||||
|
string fileName = Path.Combine(folderBrowserDialog1.SelectedPath, numberString + ".png");
|
||||||
|
bmp.Save(fileName, System.Drawing.Imaging.ImageFormat.Png);
|
||||||
|
imagesSavedCount++;
|
||||||
|
|
||||||
|
Paragraph p = _subtitle.Paragraphs[i];
|
||||||
|
//<Event InTC="00:00:24:07" OutTC="00:00:31:13" Forced="False">
|
||||||
|
// <Graphic Width="696" Height="111" X="612" Y="930">subtitle_exp_0001.png</Graphic>
|
||||||
|
//</Event>
|
||||||
|
sb.AppendLine("<Event InTC=\"" + BdnXmlTimeCode(p.StartTime) + "\" OutTC=\"" + BdnXmlTimeCode(p.EndTime) + "\" Forced=\"False\">");
|
||||||
|
int x = (width - bmp.Width) / 2;
|
||||||
|
int y = height - (bmp.Height + border);
|
||||||
|
sb.AppendLine(" <Graphic Width=\"" + bmp.Width.ToString() + "\" Height=\"" + bmp.Height.ToString() + "\" X=\"" + x.ToString() + "\" Y=\"" + y.ToString() + "\">" + numberString + ".png</Graphic>");
|
||||||
|
sb.AppendLine("</Event>");
|
||||||
|
|
||||||
|
bmp.Dispose();
|
||||||
|
progressBar1.Value = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
XmlDocument doc = new XmlDocument();
|
||||||
|
Paragraph first = _subtitle.Paragraphs[0];
|
||||||
|
Paragraph last = _subtitle.Paragraphs[_subtitle.Paragraphs.Count - 1];
|
||||||
|
doc.LoadXml("<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + Environment.NewLine +
|
||||||
|
"<BDN Version=\"0.93\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"BD-03-006-0093b BDN File Format.xsd\">" + Environment.NewLine +
|
||||||
|
"<Description>" + Environment.NewLine +
|
||||||
|
"<Name Title=\"subtitle_exp\" Content=\"\"/>" + Environment.NewLine +
|
||||||
|
"<Language Code=\"eng\"/>" + Environment.NewLine +
|
||||||
|
"<Format VideoFormat=\"1080p\" FrameRate=\"25\" DropFrame=\"False\"/>" + Environment.NewLine +
|
||||||
|
"<Events Type=\"Graphic\" FirstEventInTC=\"" + BdnXmlTimeCode(first.StartTime) + "\" LastEventOutTC=\"" + BdnXmlTimeCode(last.EndTime) + "\" NumberofEvents=\"" + imagesSavedCount.ToString() + "\"/>" + Environment.NewLine +
|
||||||
|
"</Description>" + Environment.NewLine +
|
||||||
|
"<Events>" + Environment.NewLine +
|
||||||
|
"</Events>" + Environment.NewLine +
|
||||||
|
"</BDN>");
|
||||||
|
XmlNode events = doc.DocumentElement.SelectSingleNode("Events");
|
||||||
|
events.InnerXml = sb.ToString();
|
||||||
|
|
||||||
|
File.WriteAllText(Path.Combine(folderBrowserDialog1.SelectedPath, "BDN_Index.xml"), doc.OuterXml);
|
||||||
|
progressBar1.Visible = false;
|
||||||
|
MessageBox.Show(string.Format(Configuration.Settings.Language.ExportPngXml.XImagesSavedInY, imagesSavedCount, folderBrowserDialog1.SelectedPath));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetupImageParameters()
|
||||||
|
{
|
||||||
|
if (_isLoading)
|
||||||
|
return;
|
||||||
|
|
||||||
|
_subtitleColor = panelColor.BackColor;
|
||||||
|
_borderColor = panelBorderColor.BackColor;
|
||||||
|
_subtitleFontName = comboBoxSubtitleFont.SelectedItem.ToString();
|
||||||
|
_subtitleFontSize = float.Parse(comboBoxSubtitleFontSize.SelectedItem.ToString());
|
||||||
|
_borderWidth = float.Parse(comboBoxBorderWidth.SelectedItem.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
private Bitmap GenerateImageFromText(string text)
|
||||||
|
{
|
||||||
|
Font font = new System.Drawing.Font(_subtitleFontName, _subtitleFontSize);
|
||||||
|
Bitmap bmp = new Bitmap(400, 200);
|
||||||
|
Graphics g = Graphics.FromImage(bmp);
|
||||||
|
SizeF textSize = g.MeasureString(text, font);
|
||||||
|
g.Dispose();
|
||||||
|
bmp.Dispose();
|
||||||
|
bmp = new Bitmap((int)(textSize.Width * 0.8), (int)(textSize.Height * 0.7));
|
||||||
|
g = Graphics.FromImage(bmp);
|
||||||
|
if (checkBoxAntiAlias.Checked)
|
||||||
|
{
|
||||||
|
g.TextRenderingHint = TextRenderingHint.AntiAlias;
|
||||||
|
g.SmoothingMode = SmoothingMode.AntiAlias;
|
||||||
|
}
|
||||||
|
StringFormat sf = new StringFormat();
|
||||||
|
sf.Alignment = StringAlignment.Center;
|
||||||
|
sf.LineAlignment = StringAlignment.Center;// draw the text to a path
|
||||||
|
System.Drawing.Drawing2D.GraphicsPath path = new System.Drawing.Drawing2D.GraphicsPath();
|
||||||
|
path.AddString(text, font.FontFamily, 0, font.Size, new Point(bmp.Width / 2, bmp.Height / 2), sf);
|
||||||
|
g.FillPath(new SolidBrush(_subtitleColor), path);
|
||||||
|
if (_borderWidth > 0)
|
||||||
|
g.DrawPath(new Pen(_borderColor, _borderWidth), path);
|
||||||
|
g.Dispose();
|
||||||
|
return bmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
internal void Initialize(Subtitle subtitle)
|
||||||
|
{
|
||||||
|
this.Text = Configuration.Settings.Language.ExportPngXml.Title;
|
||||||
|
groupBoxImageSettings.Text = Configuration.Settings.Language.ExportPngXml.ImageSettings;
|
||||||
|
labelSubtitleFont.Text = Configuration.Settings.Language.ExportPngXml.FontFamily;
|
||||||
|
labelSubtitleFontSize.Text = Configuration.Settings.Language.ExportPngXml.FontSize;
|
||||||
|
buttonColor.Text = Configuration.Settings.Language.ExportPngXml.FontColor;
|
||||||
|
checkBoxAntiAlias.Text = Configuration.Settings.Language.ExportPngXml.AntiAlias;
|
||||||
|
buttonBorderColor.Text = Configuration.Settings.Language.ExportPngXml.BorderColor;
|
||||||
|
labelBorderWidth.Text = Configuration.Settings.Language.ExportPngXml.BorderWidth;
|
||||||
|
buttonExport.Text = Configuration.Settings.Language.ExportPngXml.ExportAllLines;
|
||||||
|
buttonCancel.Text = Configuration.Settings.Language.General.Cancel;
|
||||||
|
labelImageResolution.Text = string.Empty;
|
||||||
|
subtitleListView1.InitializeLanguage(Configuration.Settings.Language.General, Configuration.Settings);
|
||||||
|
Utilities.InitializeSubtitleFont(subtitleListView1);
|
||||||
|
subtitleListView1.AutoSizeAllColumns(this);
|
||||||
|
|
||||||
|
_subtitle = subtitle;
|
||||||
|
panelColor.BackColor = _subtitleColor;
|
||||||
|
panelBorderColor.BackColor = _borderColor;
|
||||||
|
comboBoxBorderWidth.SelectedIndex = 1;
|
||||||
|
|
||||||
|
foreach (var x in System.Drawing.FontFamily.Families)
|
||||||
|
{
|
||||||
|
comboBoxSubtitleFont.Items.Add(x.Name);
|
||||||
|
if (string.Compare(x.Name, _subtitleFontName, true) == 0)
|
||||||
|
comboBoxSubtitleFont.SelectedIndex = comboBoxSubtitleFont.Items.Count - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
subtitleListView1.Fill(_subtitle);
|
||||||
|
subtitleListView1.SelectIndexAndEnsureVisible(0);
|
||||||
|
|
||||||
|
_isLoading = false;
|
||||||
|
comboBoxSubtitleFontSize.SelectedIndex = 15;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void subtitleListView1_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
SetupImageParameters();
|
||||||
|
if (subtitleListView1.SelectedItems.Count > 0)
|
||||||
|
{
|
||||||
|
var bmp = GenerateImageFromText(_subtitle.Paragraphs[subtitleListView1.SelectedItems[0].Index].Text);
|
||||||
|
pictureBox1.Image = bmp;
|
||||||
|
labelImageResolution.Text = string.Format("{0}x{1}", bmp.Width, bmp.Height);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonColor_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
colorDialog1.Color = panelColor.BackColor;
|
||||||
|
if (colorDialog1.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
panelColor.BackColor = colorDialog1.Color;
|
||||||
|
subtitleListView1_SelectedIndexChanged(null, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void panelColor_MouseClick(object sender, MouseEventArgs e)
|
||||||
|
{
|
||||||
|
buttonColor_Click(null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void buttonBorderColor_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
colorDialog1.Color = panelBorderColor.BackColor;
|
||||||
|
if (colorDialog1.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
panelBorderColor.BackColor = colorDialog1.Color;
|
||||||
|
subtitleListView1_SelectedIndexChanged(null, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void panelBorderColor_MouseClick(object sender, MouseEventArgs e)
|
||||||
|
{
|
||||||
|
buttonBorderColor_Click(null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void comboBoxSubtitleFont_SelectedValueChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
subtitleListView1_SelectedIndexChanged(null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void comboBoxSubtitleFontSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
subtitleListView1_SelectedIndexChanged(null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void comboBoxBorderWidth_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
subtitleListView1_SelectedIndexChanged(null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void checkBoxAntiAlias_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
subtitleListView1_SelectedIndexChanged(null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ExportPngXml_KeyDown(object sender, KeyEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.KeyCode == Keys.Escape)
|
||||||
|
{
|
||||||
|
DialogResult = DialogResult.Cancel;
|
||||||
|
}
|
||||||
|
else if (e.KeyCode == Keys.F1)
|
||||||
|
{
|
||||||
|
Utilities.ShowHelp(string.Empty);
|
||||||
|
e.SuppressKeyPress = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
126
src/Forms/ExportPngXml.resx
Normal file
126
src/Forms/ExportPngXml.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=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="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="colorDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>186, 17</value>
|
||||||
|
</metadata>
|
||||||
|
</root>
|
510
src/Forms/Main.Designer.cs
generated
510
src/Forms/Main.Designer.cs
generated
@ -84,6 +84,9 @@
|
|||||||
this.toolStripMenuItemManualAnsi = new System.Windows.Forms.ToolStripMenuItem();
|
this.toolStripMenuItemManualAnsi = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.toolStripMenuItemImportText = new System.Windows.Forms.ToolStripMenuItem();
|
this.toolStripMenuItemImportText = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.toolStripMenuItemImportTimeCodes = new System.Windows.Forms.ToolStripMenuItem();
|
this.toolStripMenuItemImportTimeCodes = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.toolStripSeparator22 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
|
this.toolStripMenuItemExport = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.toolStripMenuItemExportPngXml = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
|
this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
@ -216,6 +219,7 @@
|
|||||||
this.toolStripMenuItemPlayRateNormal = new System.Windows.Forms.ToolStripMenuItem();
|
this.toolStripMenuItemPlayRateNormal = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.toolStripMenuItemPlayRateFast = new System.Windows.Forms.ToolStripMenuItem();
|
this.toolStripMenuItemPlayRateFast = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.toolStripMenuItemPlayRateVeryFast = new System.Windows.Forms.ToolStripMenuItem();
|
this.toolStripMenuItemPlayRateVeryFast = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.AudioWaveForm = new Nikse.SubtitleEdit.Controls.WaveForm();
|
||||||
this.tabControlButtons = new System.Windows.Forms.TabControl();
|
this.tabControlButtons = new System.Windows.Forms.TabControl();
|
||||||
this.tabPageTranslate = new System.Windows.Forms.TabPage();
|
this.tabPageTranslate = new System.Windows.Forms.TabPage();
|
||||||
this.labelTranslateTip = new System.Windows.Forms.Label();
|
this.labelTranslateTip = new System.Windows.Forms.Label();
|
||||||
@ -237,6 +241,7 @@
|
|||||||
this.buttonPlayCurrent = new System.Windows.Forms.Button();
|
this.buttonPlayCurrent = new System.Windows.Forms.Button();
|
||||||
this.buttonPlayNext = new System.Windows.Forms.Button();
|
this.buttonPlayNext = new System.Windows.Forms.Button();
|
||||||
this.tabPageCreate = new System.Windows.Forms.TabPage();
|
this.tabPageCreate = new System.Windows.Forms.TabPage();
|
||||||
|
this.timeUpDownVideoPosition = new Nikse.SubtitleEdit.Controls.TimeUpDown();
|
||||||
this.buttonGotoSub = new System.Windows.Forms.Button();
|
this.buttonGotoSub = new System.Windows.Forms.Button();
|
||||||
this.buttonBeforeText = new System.Windows.Forms.Button();
|
this.buttonBeforeText = new System.Windows.Forms.Button();
|
||||||
this.buttonSetEnd = new System.Windows.Forms.Button();
|
this.buttonSetEnd = new System.Windows.Forms.Button();
|
||||||
@ -255,6 +260,7 @@
|
|||||||
this.labelVideoPosition = new System.Windows.Forms.Label();
|
this.labelVideoPosition = new System.Windows.Forms.Label();
|
||||||
this.buttonSecBack1 = new System.Windows.Forms.Button();
|
this.buttonSecBack1 = new System.Windows.Forms.Button();
|
||||||
this.tabPageAdjust = new System.Windows.Forms.TabPage();
|
this.tabPageAdjust = new System.Windows.Forms.TabPage();
|
||||||
|
this.timeUpDownVideoPositionAdjust = new Nikse.SubtitleEdit.Controls.TimeUpDown();
|
||||||
this.buttonAdjustSetEndTime = new System.Windows.Forms.Button();
|
this.buttonAdjustSetEndTime = new System.Windows.Forms.Button();
|
||||||
this.buttonSetEndAndGoToNext = new System.Windows.Forms.Button();
|
this.buttonSetEndAndGoToNext = new System.Windows.Forms.Button();
|
||||||
this.buttonSetStartAndOffsetRest = new System.Windows.Forms.Button();
|
this.buttonSetStartAndOffsetRest = new System.Windows.Forms.Button();
|
||||||
@ -299,12 +305,28 @@
|
|||||||
this.labelAlternateText = new System.Windows.Forms.Label();
|
this.labelAlternateText = new System.Windows.Forms.Label();
|
||||||
this.labelText = new System.Windows.Forms.Label();
|
this.labelText = new System.Windows.Forms.Label();
|
||||||
this.textBoxListViewTextAlternate = new System.Windows.Forms.TextBox();
|
this.textBoxListViewTextAlternate = new System.Windows.Forms.TextBox();
|
||||||
|
this.contextMenuStripTextBoxListView = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||||
|
this.cutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.pasteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.toolStripMenuItemSplitTextAtCursor = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.toolStripSeparator18 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
|
this.selectAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.toolStripSeparator17 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
|
this.normalToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.boldToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.italicToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.underlineToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.colorToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.fontNameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.labelSingleLine = new System.Windows.Forms.Label();
|
this.labelSingleLine = new System.Windows.Forms.Label();
|
||||||
this.buttonAutoBreak = new System.Windows.Forms.Button();
|
this.buttonAutoBreak = new System.Windows.Forms.Button();
|
||||||
this.labelTextLineLengths = new System.Windows.Forms.Label();
|
this.labelTextLineLengths = new System.Windows.Forms.Label();
|
||||||
this.labelTextLineTotal = new System.Windows.Forms.Label();
|
this.labelTextLineTotal = new System.Windows.Forms.Label();
|
||||||
this.labelCharactersPerSecond = new System.Windows.Forms.Label();
|
this.labelCharactersPerSecond = new System.Windows.Forms.Label();
|
||||||
this.buttonUnBreak = new System.Windows.Forms.Button();
|
this.buttonUnBreak = new System.Windows.Forms.Button();
|
||||||
|
this.timeUpDownStartTime = new Nikse.SubtitleEdit.Controls.TimeUpDown();
|
||||||
this.buttonUndoListViewChanges = new System.Windows.Forms.Button();
|
this.buttonUndoListViewChanges = new System.Windows.Forms.Button();
|
||||||
this.labelStartTimeWarning = new System.Windows.Forms.Label();
|
this.labelStartTimeWarning = new System.Windows.Forms.Label();
|
||||||
this.labelDurationWarning = new System.Windows.Forms.Label();
|
this.labelDurationWarning = new System.Windows.Forms.Label();
|
||||||
@ -315,33 +337,14 @@
|
|||||||
this.textBoxListViewText = new System.Windows.Forms.TextBox();
|
this.textBoxListViewText = new System.Windows.Forms.TextBox();
|
||||||
this.labelDuration = new System.Windows.Forms.Label();
|
this.labelDuration = new System.Windows.Forms.Label();
|
||||||
this.labelAutoDuration = new System.Windows.Forms.Label();
|
this.labelAutoDuration = new System.Windows.Forms.Label();
|
||||||
|
this.SubtitleListview1 = new Nikse.SubtitleEdit.Controls.SubtitleListView();
|
||||||
this.tabPage2 = new System.Windows.Forms.TabPage();
|
this.tabPage2 = new System.Windows.Forms.TabPage();
|
||||||
this.textBoxSource = new System.Windows.Forms.TextBox();
|
this.textBoxSource = new System.Windows.Forms.TextBox();
|
||||||
this.panelVideoPlayer = new System.Windows.Forms.Panel();
|
this.panelVideoPlayer = new System.Windows.Forms.Panel();
|
||||||
|
this.mediaPlayer = new Nikse.SubtitleEdit.Controls.VideoPlayerContainer();
|
||||||
this.contextMenuStripEmpty = new System.Windows.Forms.ContextMenuStrip(this.components);
|
this.contextMenuStripEmpty = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||||
this.insertLineToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.insertLineToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.imageListPlayRate = new System.Windows.Forms.ImageList(this.components);
|
this.imageListPlayRate = new System.Windows.Forms.ImageList(this.components);
|
||||||
this.cutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.pasteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.toolStripSeparator18 = new System.Windows.Forms.ToolStripSeparator();
|
|
||||||
this.selectAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.toolStripSeparator17 = new System.Windows.Forms.ToolStripSeparator();
|
|
||||||
this.normalToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.boldToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.italicToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.underlineToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.colorToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.fontNameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.contextMenuStripTextBoxListView = new System.Windows.Forms.ContextMenuStrip(this.components);
|
|
||||||
this.toolStripMenuItemSplitTextAtCursor = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.timeUpDownStartTime = new Nikse.SubtitleEdit.Controls.TimeUpDown();
|
|
||||||
this.SubtitleListview1 = new Nikse.SubtitleEdit.Controls.SubtitleListView();
|
|
||||||
this.mediaPlayer = new Nikse.SubtitleEdit.Controls.VideoPlayerContainer();
|
|
||||||
this.AudioWaveForm = new Nikse.SubtitleEdit.Controls.WaveForm();
|
|
||||||
this.timeUpDownVideoPosition = new Nikse.SubtitleEdit.Controls.TimeUpDown();
|
|
||||||
this.timeUpDownVideoPositionAdjust = new Nikse.SubtitleEdit.Controls.TimeUpDown();
|
|
||||||
this.statusStrip1.SuspendLayout();
|
this.statusStrip1.SuspendLayout();
|
||||||
this.toolStrip1.SuspendLayout();
|
this.toolStrip1.SuspendLayout();
|
||||||
this.menuStrip1.SuspendLayout();
|
this.menuStrip1.SuspendLayout();
|
||||||
@ -371,11 +374,11 @@
|
|||||||
this.tabControlSubtitle.SuspendLayout();
|
this.tabControlSubtitle.SuspendLayout();
|
||||||
this.tabPage1.SuspendLayout();
|
this.tabPage1.SuspendLayout();
|
||||||
this.groupBoxEdit.SuspendLayout();
|
this.groupBoxEdit.SuspendLayout();
|
||||||
|
this.contextMenuStripTextBoxListView.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownDuration)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.numericUpDownDuration)).BeginInit();
|
||||||
this.tabPage2.SuspendLayout();
|
this.tabPage2.SuspendLayout();
|
||||||
this.panelVideoPlayer.SuspendLayout();
|
this.panelVideoPlayer.SuspendLayout();
|
||||||
this.contextMenuStripEmpty.SuspendLayout();
|
this.contextMenuStripEmpty.SuspendLayout();
|
||||||
this.contextMenuStripTextBoxListView.SuspendLayout();
|
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// statusStrip1
|
// statusStrip1
|
||||||
@ -743,6 +746,8 @@
|
|||||||
this.toolStripMenuItemManualAnsi,
|
this.toolStripMenuItemManualAnsi,
|
||||||
this.toolStripMenuItemImportText,
|
this.toolStripMenuItemImportText,
|
||||||
this.toolStripMenuItemImportTimeCodes,
|
this.toolStripMenuItemImportTimeCodes,
|
||||||
|
this.toolStripSeparator22,
|
||||||
|
this.toolStripMenuItemExport,
|
||||||
this.toolStripSeparator10,
|
this.toolStripSeparator10,
|
||||||
this.exitToolStripMenuItem});
|
this.exitToolStripMenuItem});
|
||||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||||
@ -893,6 +898,26 @@
|
|||||||
this.toolStripMenuItemImportTimeCodes.Text = "Import time codes into existing subtitle...";
|
this.toolStripMenuItemImportTimeCodes.Text = "Import time codes into existing subtitle...";
|
||||||
this.toolStripMenuItemImportTimeCodes.Click += new System.EventHandler(this.toolStripMenuItemImportTimeCodes_Click);
|
this.toolStripMenuItemImportTimeCodes.Click += new System.EventHandler(this.toolStripMenuItemImportTimeCodes_Click);
|
||||||
//
|
//
|
||||||
|
// toolStripSeparator22
|
||||||
|
//
|
||||||
|
this.toolStripSeparator22.Name = "toolStripSeparator22";
|
||||||
|
this.toolStripSeparator22.Size = new System.Drawing.Size(331, 6);
|
||||||
|
//
|
||||||
|
// toolStripMenuItemExport
|
||||||
|
//
|
||||||
|
this.toolStripMenuItemExport.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.toolStripMenuItemExportPngXml});
|
||||||
|
this.toolStripMenuItemExport.Name = "toolStripMenuItemExport";
|
||||||
|
this.toolStripMenuItemExport.Size = new System.Drawing.Size(334, 22);
|
||||||
|
this.toolStripMenuItemExport.Text = "Export";
|
||||||
|
//
|
||||||
|
// toolStripMenuItemExportPngXml
|
||||||
|
//
|
||||||
|
this.toolStripMenuItemExportPngXml.Name = "toolStripMenuItemExportPngXml";
|
||||||
|
this.toolStripMenuItemExportPngXml.Size = new System.Drawing.Size(157, 22);
|
||||||
|
this.toolStripMenuItemExportPngXml.Text = "BDN xml/png...";
|
||||||
|
this.toolStripMenuItemExportPngXml.Click += new System.EventHandler(this.toolStripMenuItemExportPngXml_Click);
|
||||||
|
//
|
||||||
// toolStripSeparator10
|
// toolStripSeparator10
|
||||||
//
|
//
|
||||||
this.toolStripSeparator10.Name = "toolStripSeparator10";
|
this.toolStripSeparator10.Name = "toolStripSeparator10";
|
||||||
@ -1957,6 +1982,34 @@
|
|||||||
this.toolStripMenuItemPlayRateVeryFast.Text = "Very fast";
|
this.toolStripMenuItemPlayRateVeryFast.Text = "Very fast";
|
||||||
this.toolStripMenuItemPlayRateVeryFast.Click += new System.EventHandler(this.veryFastToolStripMenuItem_Click);
|
this.toolStripMenuItemPlayRateVeryFast.Click += new System.EventHandler(this.veryFastToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
// AudioWaveForm
|
||||||
|
//
|
||||||
|
this.AudioWaveForm.AllowDrop = true;
|
||||||
|
this.AudioWaveForm.AllowNewSelection = true;
|
||||||
|
this.AudioWaveForm.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.AudioWaveForm.BackColor = System.Drawing.Color.Black;
|
||||||
|
this.AudioWaveForm.BackgroundColor = System.Drawing.Color.Black;
|
||||||
|
this.AudioWaveForm.Color = System.Drawing.Color.GreenYellow;
|
||||||
|
this.AudioWaveForm.DrawGridLines = true;
|
||||||
|
this.AudioWaveForm.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(18)))));
|
||||||
|
this.AudioWaveForm.Location = new System.Drawing.Point(472, 32);
|
||||||
|
this.AudioWaveForm.Margin = new System.Windows.Forms.Padding(0);
|
||||||
|
this.AudioWaveForm.Name = "AudioWaveForm";
|
||||||
|
this.AudioWaveForm.NewSelectionParagraph = null;
|
||||||
|
this.AudioWaveForm.SelectedColor = System.Drawing.Color.Red;
|
||||||
|
this.AudioWaveForm.Size = new System.Drawing.Size(768, 229);
|
||||||
|
this.AudioWaveForm.StartPositionSeconds = 0D;
|
||||||
|
this.AudioWaveForm.TabIndex = 6;
|
||||||
|
this.AudioWaveForm.TextColor = System.Drawing.Color.Gray;
|
||||||
|
this.AudioWaveForm.WaveFormNotLoadedText = "Click to add wave form";
|
||||||
|
this.AudioWaveForm.WavePeaks = null;
|
||||||
|
this.AudioWaveForm.ZoomFactor = 1D;
|
||||||
|
this.AudioWaveForm.Click += new System.EventHandler(this.AudioWaveForm_Click);
|
||||||
|
this.AudioWaveForm.DragDrop += new System.Windows.Forms.DragEventHandler(this.AudioWaveForm_DragDrop);
|
||||||
|
this.AudioWaveForm.DragEnter += new System.Windows.Forms.DragEventHandler(this.AudioWaveForm_DragEnter);
|
||||||
|
//
|
||||||
// tabControlButtons
|
// tabControlButtons
|
||||||
//
|
//
|
||||||
this.tabControlButtons.Controls.Add(this.tabPageTranslate);
|
this.tabControlButtons.Controls.Add(this.tabPageTranslate);
|
||||||
@ -2232,6 +2285,16 @@
|
|||||||
this.tabPageCreate.Text = "Create";
|
this.tabPageCreate.Text = "Create";
|
||||||
this.tabPageCreate.UseVisualStyleBackColor = true;
|
this.tabPageCreate.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
|
// timeUpDownVideoPosition
|
||||||
|
//
|
||||||
|
this.timeUpDownVideoPosition.AutoSize = true;
|
||||||
|
this.timeUpDownVideoPosition.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||||
|
this.timeUpDownVideoPosition.Location = new System.Drawing.Point(86, 192);
|
||||||
|
this.timeUpDownVideoPosition.Margin = new System.Windows.Forms.Padding(4);
|
||||||
|
this.timeUpDownVideoPosition.Name = "timeUpDownVideoPosition";
|
||||||
|
this.timeUpDownVideoPosition.Size = new System.Drawing.Size(92, 25);
|
||||||
|
this.timeUpDownVideoPosition.TabIndex = 12;
|
||||||
|
//
|
||||||
// buttonGotoSub
|
// buttonGotoSub
|
||||||
//
|
//
|
||||||
this.buttonGotoSub.Location = new System.Drawing.Point(6, 58);
|
this.buttonGotoSub.Location = new System.Drawing.Point(6, 58);
|
||||||
@ -2455,6 +2518,16 @@
|
|||||||
this.tabPageAdjust.Text = "Adjust";
|
this.tabPageAdjust.Text = "Adjust";
|
||||||
this.tabPageAdjust.UseVisualStyleBackColor = true;
|
this.tabPageAdjust.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
|
// timeUpDownVideoPositionAdjust
|
||||||
|
//
|
||||||
|
this.timeUpDownVideoPositionAdjust.AutoSize = true;
|
||||||
|
this.timeUpDownVideoPositionAdjust.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||||
|
this.timeUpDownVideoPositionAdjust.Location = new System.Drawing.Point(87, 214);
|
||||||
|
this.timeUpDownVideoPositionAdjust.Margin = new System.Windows.Forms.Padding(4);
|
||||||
|
this.timeUpDownVideoPositionAdjust.Name = "timeUpDownVideoPositionAdjust";
|
||||||
|
this.timeUpDownVideoPositionAdjust.Size = new System.Drawing.Size(92, 25);
|
||||||
|
this.timeUpDownVideoPositionAdjust.TabIndex = 13;
|
||||||
|
//
|
||||||
// buttonAdjustSetEndTime
|
// buttonAdjustSetEndTime
|
||||||
//
|
//
|
||||||
this.buttonAdjustSetEndTime.Location = new System.Drawing.Point(6, 84);
|
this.buttonAdjustSetEndTime.Location = new System.Drawing.Point(6, 84);
|
||||||
@ -2929,6 +3002,126 @@
|
|||||||
this.textBoxListViewTextAlternate.TextChanged += new System.EventHandler(this.textBoxListViewTextAlternate_TextChanged);
|
this.textBoxListViewTextAlternate.TextChanged += new System.EventHandler(this.textBoxListViewTextAlternate_TextChanged);
|
||||||
this.textBoxListViewTextAlternate.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBoxListViewTextAlternate_KeyDown);
|
this.textBoxListViewTextAlternate.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBoxListViewTextAlternate_KeyDown);
|
||||||
//
|
//
|
||||||
|
// contextMenuStripTextBoxListView
|
||||||
|
//
|
||||||
|
this.contextMenuStripTextBoxListView.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.cutToolStripMenuItem,
|
||||||
|
this.copyToolStripMenuItem,
|
||||||
|
this.pasteToolStripMenuItem,
|
||||||
|
this.deleteToolStripMenuItem,
|
||||||
|
this.toolStripMenuItemSplitTextAtCursor,
|
||||||
|
this.toolStripSeparator18,
|
||||||
|
this.selectAllToolStripMenuItem,
|
||||||
|
this.toolStripSeparator17,
|
||||||
|
this.normalToolStripMenuItem1,
|
||||||
|
this.boldToolStripMenuItem1,
|
||||||
|
this.italicToolStripMenuItem1,
|
||||||
|
this.underlineToolStripMenuItem1,
|
||||||
|
this.colorToolStripMenuItem1,
|
||||||
|
this.fontNameToolStripMenuItem});
|
||||||
|
this.contextMenuStripTextBoxListView.Name = "contextMenuStripTextBoxListView";
|
||||||
|
this.contextMenuStripTextBoxListView.Size = new System.Drawing.Size(215, 280);
|
||||||
|
this.contextMenuStripTextBoxListView.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStripTextBoxListView_Opening);
|
||||||
|
//
|
||||||
|
// cutToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.cutToolStripMenuItem.Name = "cutToolStripMenuItem";
|
||||||
|
this.cutToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.X)));
|
||||||
|
this.cutToolStripMenuItem.Size = new System.Drawing.Size(214, 22);
|
||||||
|
this.cutToolStripMenuItem.Text = "Cut";
|
||||||
|
this.cutToolStripMenuItem.Click += new System.EventHandler(this.cutToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
|
// copyToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.copyToolStripMenuItem.Name = "copyToolStripMenuItem";
|
||||||
|
this.copyToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C)));
|
||||||
|
this.copyToolStripMenuItem.Size = new System.Drawing.Size(214, 22);
|
||||||
|
this.copyToolStripMenuItem.Text = "Copy";
|
||||||
|
this.copyToolStripMenuItem.Click += new System.EventHandler(this.copyToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
|
// pasteToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.pasteToolStripMenuItem.Name = "pasteToolStripMenuItem";
|
||||||
|
this.pasteToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.V)));
|
||||||
|
this.pasteToolStripMenuItem.Size = new System.Drawing.Size(214, 22);
|
||||||
|
this.pasteToolStripMenuItem.Text = "Paste";
|
||||||
|
this.pasteToolStripMenuItem.Click += new System.EventHandler(this.pasteToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
|
// deleteToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
|
||||||
|
this.deleteToolStripMenuItem.Size = new System.Drawing.Size(214, 22);
|
||||||
|
this.deleteToolStripMenuItem.Text = "Delete";
|
||||||
|
this.deleteToolStripMenuItem.Click += new System.EventHandler(this.deleteToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
|
// toolStripMenuItemSplitTextAtCursor
|
||||||
|
//
|
||||||
|
this.toolStripMenuItemSplitTextAtCursor.Name = "toolStripMenuItemSplitTextAtCursor";
|
||||||
|
this.toolStripMenuItemSplitTextAtCursor.Size = new System.Drawing.Size(214, 22);
|
||||||
|
this.toolStripMenuItemSplitTextAtCursor.Text = "Split text at cursor position";
|
||||||
|
this.toolStripMenuItemSplitTextAtCursor.Click += new System.EventHandler(this.toolStripMenuItemSplitTextAtCursor_Click);
|
||||||
|
//
|
||||||
|
// toolStripSeparator18
|
||||||
|
//
|
||||||
|
this.toolStripSeparator18.Name = "toolStripSeparator18";
|
||||||
|
this.toolStripSeparator18.Size = new System.Drawing.Size(211, 6);
|
||||||
|
//
|
||||||
|
// selectAllToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.selectAllToolStripMenuItem.Name = "selectAllToolStripMenuItem";
|
||||||
|
this.selectAllToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.A)));
|
||||||
|
this.selectAllToolStripMenuItem.Size = new System.Drawing.Size(214, 22);
|
||||||
|
this.selectAllToolStripMenuItem.Text = "Select all";
|
||||||
|
this.selectAllToolStripMenuItem.Click += new System.EventHandler(this.selectAllToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
|
// toolStripSeparator17
|
||||||
|
//
|
||||||
|
this.toolStripSeparator17.Name = "toolStripSeparator17";
|
||||||
|
this.toolStripSeparator17.Size = new System.Drawing.Size(211, 6);
|
||||||
|
//
|
||||||
|
// normalToolStripMenuItem1
|
||||||
|
//
|
||||||
|
this.normalToolStripMenuItem1.Name = "normalToolStripMenuItem1";
|
||||||
|
this.normalToolStripMenuItem1.Size = new System.Drawing.Size(214, 22);
|
||||||
|
this.normalToolStripMenuItem1.Text = "Normal";
|
||||||
|
this.normalToolStripMenuItem1.Click += new System.EventHandler(this.normalToolStripMenuItem1_Click);
|
||||||
|
//
|
||||||
|
// boldToolStripMenuItem1
|
||||||
|
//
|
||||||
|
this.boldToolStripMenuItem1.Name = "boldToolStripMenuItem1";
|
||||||
|
this.boldToolStripMenuItem1.Size = new System.Drawing.Size(214, 22);
|
||||||
|
this.boldToolStripMenuItem1.Text = "Bold";
|
||||||
|
this.boldToolStripMenuItem1.Click += new System.EventHandler(this.boldToolStripMenuItem1_Click);
|
||||||
|
//
|
||||||
|
// italicToolStripMenuItem1
|
||||||
|
//
|
||||||
|
this.italicToolStripMenuItem1.Name = "italicToolStripMenuItem1";
|
||||||
|
this.italicToolStripMenuItem1.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.I)));
|
||||||
|
this.italicToolStripMenuItem1.Size = new System.Drawing.Size(214, 22);
|
||||||
|
this.italicToolStripMenuItem1.Text = "Italic";
|
||||||
|
this.italicToolStripMenuItem1.Click += new System.EventHandler(this.italicToolStripMenuItem1_Click);
|
||||||
|
//
|
||||||
|
// underlineToolStripMenuItem1
|
||||||
|
//
|
||||||
|
this.underlineToolStripMenuItem1.Name = "underlineToolStripMenuItem1";
|
||||||
|
this.underlineToolStripMenuItem1.Size = new System.Drawing.Size(214, 22);
|
||||||
|
this.underlineToolStripMenuItem1.Text = "Underline";
|
||||||
|
this.underlineToolStripMenuItem1.Click += new System.EventHandler(this.underlineToolStripMenuItem1_Click);
|
||||||
|
//
|
||||||
|
// colorToolStripMenuItem1
|
||||||
|
//
|
||||||
|
this.colorToolStripMenuItem1.Name = "colorToolStripMenuItem1";
|
||||||
|
this.colorToolStripMenuItem1.Size = new System.Drawing.Size(214, 22);
|
||||||
|
this.colorToolStripMenuItem1.Text = "Color...";
|
||||||
|
this.colorToolStripMenuItem1.Click += new System.EventHandler(this.colorToolStripMenuItem1_Click);
|
||||||
|
//
|
||||||
|
// fontNameToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.fontNameToolStripMenuItem.Name = "fontNameToolStripMenuItem";
|
||||||
|
this.fontNameToolStripMenuItem.Size = new System.Drawing.Size(214, 22);
|
||||||
|
this.fontNameToolStripMenuItem.Text = "Font name...";
|
||||||
|
this.fontNameToolStripMenuItem.Click += new System.EventHandler(this.fontNameToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
// labelSingleLine
|
// labelSingleLine
|
||||||
//
|
//
|
||||||
this.labelSingleLine.AutoSize = true;
|
this.labelSingleLine.AutoSize = true;
|
||||||
@ -2988,6 +3181,16 @@
|
|||||||
this.buttonUnBreak.UseVisualStyleBackColor = true;
|
this.buttonUnBreak.UseVisualStyleBackColor = true;
|
||||||
this.buttonUnBreak.Click += new System.EventHandler(this.ButtonUnBreakClick);
|
this.buttonUnBreak.Click += new System.EventHandler(this.ButtonUnBreakClick);
|
||||||
//
|
//
|
||||||
|
// timeUpDownStartTime
|
||||||
|
//
|
||||||
|
this.timeUpDownStartTime.AutoSize = true;
|
||||||
|
this.timeUpDownStartTime.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||||
|
this.timeUpDownStartTime.Location = new System.Drawing.Point(9, 27);
|
||||||
|
this.timeUpDownStartTime.Margin = new System.Windows.Forms.Padding(4);
|
||||||
|
this.timeUpDownStartTime.Name = "timeUpDownStartTime";
|
||||||
|
this.timeUpDownStartTime.Size = new System.Drawing.Size(92, 25);
|
||||||
|
this.timeUpDownStartTime.TabIndex = 0;
|
||||||
|
//
|
||||||
// buttonUndoListViewChanges
|
// buttonUndoListViewChanges
|
||||||
//
|
//
|
||||||
this.buttonUndoListViewChanges.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
this.buttonUndoListViewChanges.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
@ -3109,6 +3312,31 @@
|
|||||||
this.labelAutoDuration.TabIndex = 30;
|
this.labelAutoDuration.TabIndex = 30;
|
||||||
this.labelAutoDuration.Text = "Auto";
|
this.labelAutoDuration.Text = "Auto";
|
||||||
//
|
//
|
||||||
|
// SubtitleListview1
|
||||||
|
//
|
||||||
|
this.SubtitleListview1.AllowDrop = true;
|
||||||
|
this.SubtitleListview1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.SubtitleListview1.ContextMenuStrip = this.contextMenuStripListview;
|
||||||
|
this.SubtitleListview1.FirstVisibleIndex = -1;
|
||||||
|
this.SubtitleListview1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.SubtitleListview1.FullRowSelect = true;
|
||||||
|
this.SubtitleListview1.GridLines = true;
|
||||||
|
this.SubtitleListview1.HideSelection = false;
|
||||||
|
this.SubtitleListview1.Location = new System.Drawing.Point(1, 3);
|
||||||
|
this.SubtitleListview1.Name = "SubtitleListview1";
|
||||||
|
this.SubtitleListview1.Size = new System.Drawing.Size(932, 148);
|
||||||
|
this.SubtitleListview1.SmallImageList = this.imageList1;
|
||||||
|
this.SubtitleListview1.TabIndex = 0;
|
||||||
|
this.SubtitleListview1.UseCompatibleStateImageBehavior = false;
|
||||||
|
this.SubtitleListview1.View = System.Windows.Forms.View.Details;
|
||||||
|
this.SubtitleListview1.SelectedIndexChanged += new System.EventHandler(this.SubtitleListview1_SelectedIndexChanged);
|
||||||
|
this.SubtitleListview1.DragDrop += new System.Windows.Forms.DragEventHandler(this.SubtitleListview1_DragDrop);
|
||||||
|
this.SubtitleListview1.DragEnter += new System.Windows.Forms.DragEventHandler(this.SubtitleListview1_DragEnter);
|
||||||
|
this.SubtitleListview1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SubtitleListview1_KeyDown);
|
||||||
|
this.SubtitleListview1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.SubtitleListview1_MouseDoubleClick);
|
||||||
|
//
|
||||||
// tabPage2
|
// tabPage2
|
||||||
//
|
//
|
||||||
this.tabPage2.Controls.Add(this.textBoxSource);
|
this.tabPage2.Controls.Add(this.textBoxSource);
|
||||||
@ -3153,182 +3381,6 @@
|
|||||||
this.panelVideoPlayer.Size = new System.Drawing.Size(282, 278);
|
this.panelVideoPlayer.Size = new System.Drawing.Size(282, 278);
|
||||||
this.panelVideoPlayer.TabIndex = 5;
|
this.panelVideoPlayer.TabIndex = 5;
|
||||||
//
|
//
|
||||||
// contextMenuStripEmpty
|
|
||||||
//
|
|
||||||
this.contextMenuStripEmpty.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
|
||||||
this.insertLineToolStripMenuItem});
|
|
||||||
this.contextMenuStripEmpty.Name = "contextMenuStripEmpty";
|
|
||||||
this.contextMenuStripEmpty.Size = new System.Drawing.Size(126, 26);
|
|
||||||
//
|
|
||||||
// insertLineToolStripMenuItem
|
|
||||||
//
|
|
||||||
this.insertLineToolStripMenuItem.Name = "insertLineToolStripMenuItem";
|
|
||||||
this.insertLineToolStripMenuItem.Size = new System.Drawing.Size(125, 22);
|
|
||||||
this.insertLineToolStripMenuItem.Text = "Insert line";
|
|
||||||
this.insertLineToolStripMenuItem.Click += new System.EventHandler(this.insertLineToolStripMenuItem_Click);
|
|
||||||
//
|
|
||||||
// imageListPlayRate
|
|
||||||
//
|
|
||||||
this.imageListPlayRate.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageListPlayRate.ImageStream")));
|
|
||||||
this.imageListPlayRate.TransparentColor = System.Drawing.Color.Transparent;
|
|
||||||
this.imageListPlayRate.Images.SetKeyName(0, "FastForward.png");
|
|
||||||
this.imageListPlayRate.Images.SetKeyName(1, "FastForwardHighLight.png");
|
|
||||||
//
|
|
||||||
// cutToolStripMenuItem
|
|
||||||
//
|
|
||||||
this.cutToolStripMenuItem.Name = "cutToolStripMenuItem";
|
|
||||||
this.cutToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.X)));
|
|
||||||
this.cutToolStripMenuItem.Size = new System.Drawing.Size(214, 22);
|
|
||||||
this.cutToolStripMenuItem.Text = "Cut";
|
|
||||||
this.cutToolStripMenuItem.Click += new System.EventHandler(this.cutToolStripMenuItem_Click);
|
|
||||||
//
|
|
||||||
// copyToolStripMenuItem
|
|
||||||
//
|
|
||||||
this.copyToolStripMenuItem.Name = "copyToolStripMenuItem";
|
|
||||||
this.copyToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C)));
|
|
||||||
this.copyToolStripMenuItem.Size = new System.Drawing.Size(214, 22);
|
|
||||||
this.copyToolStripMenuItem.Text = "Copy";
|
|
||||||
this.copyToolStripMenuItem.Click += new System.EventHandler(this.copyToolStripMenuItem_Click);
|
|
||||||
//
|
|
||||||
// pasteToolStripMenuItem
|
|
||||||
//
|
|
||||||
this.pasteToolStripMenuItem.Name = "pasteToolStripMenuItem";
|
|
||||||
this.pasteToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.V)));
|
|
||||||
this.pasteToolStripMenuItem.Size = new System.Drawing.Size(214, 22);
|
|
||||||
this.pasteToolStripMenuItem.Text = "Paste";
|
|
||||||
this.pasteToolStripMenuItem.Click += new System.EventHandler(this.pasteToolStripMenuItem_Click);
|
|
||||||
//
|
|
||||||
// deleteToolStripMenuItem
|
|
||||||
//
|
|
||||||
this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
|
|
||||||
this.deleteToolStripMenuItem.Size = new System.Drawing.Size(214, 22);
|
|
||||||
this.deleteToolStripMenuItem.Text = "Delete";
|
|
||||||
this.deleteToolStripMenuItem.Click += new System.EventHandler(this.deleteToolStripMenuItem_Click);
|
|
||||||
//
|
|
||||||
// toolStripSeparator18
|
|
||||||
//
|
|
||||||
this.toolStripSeparator18.Name = "toolStripSeparator18";
|
|
||||||
this.toolStripSeparator18.Size = new System.Drawing.Size(211, 6);
|
|
||||||
//
|
|
||||||
// selectAllToolStripMenuItem
|
|
||||||
//
|
|
||||||
this.selectAllToolStripMenuItem.Name = "selectAllToolStripMenuItem";
|
|
||||||
this.selectAllToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.A)));
|
|
||||||
this.selectAllToolStripMenuItem.Size = new System.Drawing.Size(214, 22);
|
|
||||||
this.selectAllToolStripMenuItem.Text = "Select all";
|
|
||||||
this.selectAllToolStripMenuItem.Click += new System.EventHandler(this.selectAllToolStripMenuItem_Click);
|
|
||||||
//
|
|
||||||
// toolStripSeparator17
|
|
||||||
//
|
|
||||||
this.toolStripSeparator17.Name = "toolStripSeparator17";
|
|
||||||
this.toolStripSeparator17.Size = new System.Drawing.Size(211, 6);
|
|
||||||
//
|
|
||||||
// normalToolStripMenuItem1
|
|
||||||
//
|
|
||||||
this.normalToolStripMenuItem1.Name = "normalToolStripMenuItem1";
|
|
||||||
this.normalToolStripMenuItem1.Size = new System.Drawing.Size(214, 22);
|
|
||||||
this.normalToolStripMenuItem1.Text = "Normal";
|
|
||||||
this.normalToolStripMenuItem1.Click += new System.EventHandler(this.normalToolStripMenuItem1_Click);
|
|
||||||
//
|
|
||||||
// boldToolStripMenuItem1
|
|
||||||
//
|
|
||||||
this.boldToolStripMenuItem1.Name = "boldToolStripMenuItem1";
|
|
||||||
this.boldToolStripMenuItem1.Size = new System.Drawing.Size(214, 22);
|
|
||||||
this.boldToolStripMenuItem1.Text = "Bold";
|
|
||||||
this.boldToolStripMenuItem1.Click += new System.EventHandler(this.boldToolStripMenuItem1_Click);
|
|
||||||
//
|
|
||||||
// italicToolStripMenuItem1
|
|
||||||
//
|
|
||||||
this.italicToolStripMenuItem1.Name = "italicToolStripMenuItem1";
|
|
||||||
this.italicToolStripMenuItem1.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.I)));
|
|
||||||
this.italicToolStripMenuItem1.Size = new System.Drawing.Size(214, 22);
|
|
||||||
this.italicToolStripMenuItem1.Text = "Italic";
|
|
||||||
this.italicToolStripMenuItem1.Click += new System.EventHandler(this.italicToolStripMenuItem1_Click);
|
|
||||||
//
|
|
||||||
// underlineToolStripMenuItem1
|
|
||||||
//
|
|
||||||
this.underlineToolStripMenuItem1.Name = "underlineToolStripMenuItem1";
|
|
||||||
this.underlineToolStripMenuItem1.Size = new System.Drawing.Size(214, 22);
|
|
||||||
this.underlineToolStripMenuItem1.Text = "Underline";
|
|
||||||
this.underlineToolStripMenuItem1.Click += new System.EventHandler(this.underlineToolStripMenuItem1_Click);
|
|
||||||
//
|
|
||||||
// colorToolStripMenuItem1
|
|
||||||
//
|
|
||||||
this.colorToolStripMenuItem1.Name = "colorToolStripMenuItem1";
|
|
||||||
this.colorToolStripMenuItem1.Size = new System.Drawing.Size(214, 22);
|
|
||||||
this.colorToolStripMenuItem1.Text = "Color...";
|
|
||||||
this.colorToolStripMenuItem1.Click += new System.EventHandler(this.colorToolStripMenuItem1_Click);
|
|
||||||
//
|
|
||||||
// fontNameToolStripMenuItem
|
|
||||||
//
|
|
||||||
this.fontNameToolStripMenuItem.Name = "fontNameToolStripMenuItem";
|
|
||||||
this.fontNameToolStripMenuItem.Size = new System.Drawing.Size(214, 22);
|
|
||||||
this.fontNameToolStripMenuItem.Text = "Font name...";
|
|
||||||
this.fontNameToolStripMenuItem.Click += new System.EventHandler(this.fontNameToolStripMenuItem_Click);
|
|
||||||
//
|
|
||||||
// contextMenuStripTextBoxListView
|
|
||||||
//
|
|
||||||
this.contextMenuStripTextBoxListView.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
|
||||||
this.cutToolStripMenuItem,
|
|
||||||
this.copyToolStripMenuItem,
|
|
||||||
this.pasteToolStripMenuItem,
|
|
||||||
this.deleteToolStripMenuItem,
|
|
||||||
this.toolStripMenuItemSplitTextAtCursor,
|
|
||||||
this.toolStripSeparator18,
|
|
||||||
this.selectAllToolStripMenuItem,
|
|
||||||
this.toolStripSeparator17,
|
|
||||||
this.normalToolStripMenuItem1,
|
|
||||||
this.boldToolStripMenuItem1,
|
|
||||||
this.italicToolStripMenuItem1,
|
|
||||||
this.underlineToolStripMenuItem1,
|
|
||||||
this.colorToolStripMenuItem1,
|
|
||||||
this.fontNameToolStripMenuItem});
|
|
||||||
this.contextMenuStripTextBoxListView.Name = "contextMenuStripTextBoxListView";
|
|
||||||
this.contextMenuStripTextBoxListView.Size = new System.Drawing.Size(215, 302);
|
|
||||||
this.contextMenuStripTextBoxListView.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStripTextBoxListView_Opening);
|
|
||||||
//
|
|
||||||
// toolStripMenuItemSplitTextAtCursor
|
|
||||||
//
|
|
||||||
this.toolStripMenuItemSplitTextAtCursor.Name = "toolStripMenuItemSplitTextAtCursor";
|
|
||||||
this.toolStripMenuItemSplitTextAtCursor.Size = new System.Drawing.Size(214, 22);
|
|
||||||
this.toolStripMenuItemSplitTextAtCursor.Text = "Split text at cursor position";
|
|
||||||
this.toolStripMenuItemSplitTextAtCursor.Click += new System.EventHandler(this.toolStripMenuItemSplitTextAtCursor_Click);
|
|
||||||
//
|
|
||||||
// timeUpDownStartTime
|
|
||||||
//
|
|
||||||
this.timeUpDownStartTime.AutoSize = true;
|
|
||||||
this.timeUpDownStartTime.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
|
||||||
this.timeUpDownStartTime.Location = new System.Drawing.Point(9, 27);
|
|
||||||
this.timeUpDownStartTime.Margin = new System.Windows.Forms.Padding(4);
|
|
||||||
this.timeUpDownStartTime.Name = "timeUpDownStartTime";
|
|
||||||
this.timeUpDownStartTime.Size = new System.Drawing.Size(92, 25);
|
|
||||||
this.timeUpDownStartTime.TabIndex = 0;
|
|
||||||
//
|
|
||||||
// SubtitleListview1
|
|
||||||
//
|
|
||||||
this.SubtitleListview1.AllowDrop = true;
|
|
||||||
this.SubtitleListview1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
|
||||||
| System.Windows.Forms.AnchorStyles.Left)
|
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
|
||||||
this.SubtitleListview1.ContextMenuStrip = this.contextMenuStripListview;
|
|
||||||
this.SubtitleListview1.FirstVisibleIndex = -1;
|
|
||||||
this.SubtitleListview1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
|
||||||
this.SubtitleListview1.FullRowSelect = true;
|
|
||||||
this.SubtitleListview1.GridLines = true;
|
|
||||||
this.SubtitleListview1.HideSelection = false;
|
|
||||||
this.SubtitleListview1.Location = new System.Drawing.Point(1, 3);
|
|
||||||
this.SubtitleListview1.Name = "SubtitleListview1";
|
|
||||||
this.SubtitleListview1.Size = new System.Drawing.Size(932, 148);
|
|
||||||
this.SubtitleListview1.SmallImageList = this.imageList1;
|
|
||||||
this.SubtitleListview1.TabIndex = 0;
|
|
||||||
this.SubtitleListview1.UseCompatibleStateImageBehavior = false;
|
|
||||||
this.SubtitleListview1.View = System.Windows.Forms.View.Details;
|
|
||||||
this.SubtitleListview1.SelectedIndexChanged += new System.EventHandler(this.SubtitleListview1_SelectedIndexChanged);
|
|
||||||
this.SubtitleListview1.DragDrop += new System.Windows.Forms.DragEventHandler(this.SubtitleListview1_DragDrop);
|
|
||||||
this.SubtitleListview1.DragEnter += new System.Windows.Forms.DragEventHandler(this.SubtitleListview1_DragEnter);
|
|
||||||
this.SubtitleListview1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SubtitleListview1_KeyDown);
|
|
||||||
this.SubtitleListview1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.SubtitleListview1_MouseDoubleClick);
|
|
||||||
//
|
|
||||||
// mediaPlayer
|
// mediaPlayer
|
||||||
//
|
//
|
||||||
this.mediaPlayer.AllowDrop = true;
|
this.mediaPlayer.AllowDrop = true;
|
||||||
@ -3349,53 +3401,26 @@
|
|||||||
this.mediaPlayer.DragDrop += new System.Windows.Forms.DragEventHandler(this.mediaPlayer_DragDrop);
|
this.mediaPlayer.DragDrop += new System.Windows.Forms.DragEventHandler(this.mediaPlayer_DragDrop);
|
||||||
this.mediaPlayer.DragEnter += new System.Windows.Forms.DragEventHandler(this.mediaPlayer_DragEnter);
|
this.mediaPlayer.DragEnter += new System.Windows.Forms.DragEventHandler(this.mediaPlayer_DragEnter);
|
||||||
//
|
//
|
||||||
// AudioWaveForm
|
// contextMenuStripEmpty
|
||||||
//
|
//
|
||||||
this.AudioWaveForm.AllowDrop = true;
|
this.contextMenuStripEmpty.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
this.AudioWaveForm.AllowNewSelection = true;
|
this.insertLineToolStripMenuItem});
|
||||||
this.AudioWaveForm.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
this.contextMenuStripEmpty.Name = "contextMenuStripEmpty";
|
||||||
| System.Windows.Forms.AnchorStyles.Left)
|
this.contextMenuStripEmpty.Size = new System.Drawing.Size(126, 26);
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
|
||||||
this.AudioWaveForm.BackColor = System.Drawing.Color.Black;
|
|
||||||
this.AudioWaveForm.BackgroundColor = System.Drawing.Color.Black;
|
|
||||||
this.AudioWaveForm.Color = System.Drawing.Color.GreenYellow;
|
|
||||||
this.AudioWaveForm.DrawGridLines = true;
|
|
||||||
this.AudioWaveForm.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(18)))));
|
|
||||||
this.AudioWaveForm.Location = new System.Drawing.Point(472, 32);
|
|
||||||
this.AudioWaveForm.Margin = new System.Windows.Forms.Padding(0);
|
|
||||||
this.AudioWaveForm.Name = "AudioWaveForm";
|
|
||||||
this.AudioWaveForm.NewSelectionParagraph = null;
|
|
||||||
this.AudioWaveForm.SelectedColor = System.Drawing.Color.Red;
|
|
||||||
this.AudioWaveForm.Size = new System.Drawing.Size(768, 229);
|
|
||||||
this.AudioWaveForm.StartPositionSeconds = 0D;
|
|
||||||
this.AudioWaveForm.TabIndex = 6;
|
|
||||||
this.AudioWaveForm.TextColor = System.Drawing.Color.Gray;
|
|
||||||
this.AudioWaveForm.WaveFormNotLoadedText = "Click to add wave form";
|
|
||||||
this.AudioWaveForm.WavePeaks = null;
|
|
||||||
this.AudioWaveForm.ZoomFactor = 1D;
|
|
||||||
this.AudioWaveForm.Click += new System.EventHandler(this.AudioWaveForm_Click);
|
|
||||||
this.AudioWaveForm.DragDrop += new System.Windows.Forms.DragEventHandler(this.AudioWaveForm_DragDrop);
|
|
||||||
this.AudioWaveForm.DragEnter += new System.Windows.Forms.DragEventHandler(this.AudioWaveForm_DragEnter);
|
|
||||||
//
|
//
|
||||||
// timeUpDownVideoPosition
|
// insertLineToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.timeUpDownVideoPosition.AutoSize = true;
|
this.insertLineToolStripMenuItem.Name = "insertLineToolStripMenuItem";
|
||||||
this.timeUpDownVideoPosition.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
this.insertLineToolStripMenuItem.Size = new System.Drawing.Size(125, 22);
|
||||||
this.timeUpDownVideoPosition.Location = new System.Drawing.Point(86, 192);
|
this.insertLineToolStripMenuItem.Text = "Insert line";
|
||||||
this.timeUpDownVideoPosition.Margin = new System.Windows.Forms.Padding(4);
|
this.insertLineToolStripMenuItem.Click += new System.EventHandler(this.insertLineToolStripMenuItem_Click);
|
||||||
this.timeUpDownVideoPosition.Name = "timeUpDownVideoPosition";
|
|
||||||
this.timeUpDownVideoPosition.Size = new System.Drawing.Size(92, 25);
|
|
||||||
this.timeUpDownVideoPosition.TabIndex = 12;
|
|
||||||
//
|
//
|
||||||
// timeUpDownVideoPositionAdjust
|
// imageListPlayRate
|
||||||
//
|
//
|
||||||
this.timeUpDownVideoPositionAdjust.AutoSize = true;
|
this.imageListPlayRate.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageListPlayRate.ImageStream")));
|
||||||
this.timeUpDownVideoPositionAdjust.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
this.imageListPlayRate.TransparentColor = System.Drawing.Color.Transparent;
|
||||||
this.timeUpDownVideoPositionAdjust.Location = new System.Drawing.Point(87, 214);
|
this.imageListPlayRate.Images.SetKeyName(0, "FastForward.png");
|
||||||
this.timeUpDownVideoPositionAdjust.Margin = new System.Windows.Forms.Padding(4);
|
this.imageListPlayRate.Images.SetKeyName(1, "FastForwardHighLight.png");
|
||||||
this.timeUpDownVideoPositionAdjust.Name = "timeUpDownVideoPositionAdjust";
|
|
||||||
this.timeUpDownVideoPositionAdjust.Size = new System.Drawing.Size(92, 25);
|
|
||||||
this.timeUpDownVideoPositionAdjust.TabIndex = 13;
|
|
||||||
//
|
//
|
||||||
// Main
|
// Main
|
||||||
//
|
//
|
||||||
@ -3459,12 +3484,12 @@
|
|||||||
this.tabPage1.ResumeLayout(false);
|
this.tabPage1.ResumeLayout(false);
|
||||||
this.groupBoxEdit.ResumeLayout(false);
|
this.groupBoxEdit.ResumeLayout(false);
|
||||||
this.groupBoxEdit.PerformLayout();
|
this.groupBoxEdit.PerformLayout();
|
||||||
|
this.contextMenuStripTextBoxListView.ResumeLayout(false);
|
||||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownDuration)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.numericUpDownDuration)).EndInit();
|
||||||
this.tabPage2.ResumeLayout(false);
|
this.tabPage2.ResumeLayout(false);
|
||||||
this.tabPage2.PerformLayout();
|
this.tabPage2.PerformLayout();
|
||||||
this.panelVideoPlayer.ResumeLayout(false);
|
this.panelVideoPlayer.ResumeLayout(false);
|
||||||
this.contextMenuStripEmpty.ResumeLayout(false);
|
this.contextMenuStripEmpty.ResumeLayout(false);
|
||||||
this.contextMenuStripTextBoxListView.ResumeLayout(false);
|
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
@ -3784,6 +3809,9 @@
|
|||||||
private System.Windows.Forms.ToolStripMenuItem underlineToolStripMenuItem1;
|
private System.Windows.Forms.ToolStripMenuItem underlineToolStripMenuItem1;
|
||||||
private System.Windows.Forms.ToolStripMenuItem colorToolStripMenuItem1;
|
private System.Windows.Forms.ToolStripMenuItem colorToolStripMenuItem1;
|
||||||
private System.Windows.Forms.ToolStripMenuItem fontNameToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem fontNameToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator22;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemExport;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemExportPngXml;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9790,5 +9790,12 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void toolStripMenuItemExportPngXml_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ExportPngXml exportBdnXmlPng = new ExportPngXml();
|
||||||
|
exportBdnXmlPng.Initialize(_subtitle);
|
||||||
|
exportBdnXmlPng.ShowDialog(this);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -684,7 +684,7 @@
|
|||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD2
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD2
|
||||||
CAAAAk1TRnQBSQFMAgEBAgEAAVABBAFQAQQBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
CAAAAk1TRnQBSQFMAgEBAgEAAWgBBAFoAQQBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||||
|
@ -37,6 +37,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
string _prefix = string.Empty;
|
string _prefix = string.Empty;
|
||||||
string _postfix = string.Empty;
|
string _postfix = string.Empty;
|
||||||
Hunspell _hunspell;
|
Hunspell _hunspell;
|
||||||
|
LinuxHunspell _linuxHunspell;
|
||||||
string _dictionaryFolder;
|
string _dictionaryFolder;
|
||||||
Paragraph _currentParagraph;
|
Paragraph _currentParagraph;
|
||||||
int _currentIndex;
|
int _currentIndex;
|
||||||
@ -237,11 +238,30 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
}
|
}
|
||||||
|
|
||||||
_changeAllDictionary = new Dictionary<string, string>();
|
_changeAllDictionary = new Dictionary<string, string>();
|
||||||
_hunspell = new Hunspell(dictionary + ".aff", dictionary + ".dic");
|
|
||||||
|
if (Utilities.IsRunningOnLinux())
|
||||||
|
_linuxHunspell = new LinuxHunspell(dictionary + ".aff", dictionary + ".dic");
|
||||||
|
else
|
||||||
|
_hunspell = new Hunspell(dictionary + ".aff", dictionary + ".dic");
|
||||||
|
|
||||||
_wordsIndex--;
|
_wordsIndex--;
|
||||||
PrepareNextWord();
|
PrepareNextWord();
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool DoSpell(string word)
|
||||||
|
{
|
||||||
|
if (_hunspell != null)
|
||||||
|
return _hunspell.Spell(word);
|
||||||
|
else
|
||||||
|
return _linuxHunspell.Spell(word);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<string> DoSuggest(string word)
|
||||||
|
{
|
||||||
|
if (_hunspell != null)
|
||||||
|
return _hunspell.Suggest(word);
|
||||||
|
else
|
||||||
|
return _linuxHunspell.Suggest(word);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ButtonChangeAllClick(object sender, EventArgs e)
|
private void ButtonChangeAllClick(object sender, EventArgs e)
|
||||||
@ -361,7 +381,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
_skipAllList.Add(_currentWord.ToUpper());
|
_skipAllList.Add(_currentWord.ToUpper());
|
||||||
break;
|
break;
|
||||||
case SpellCheckAction.AddToDictionary:
|
case SpellCheckAction.AddToDictionary:
|
||||||
bool correct = _hunspell.Spell(ChangeWord);
|
bool correct = DoSpell(ChangeWord);
|
||||||
if (!correct)
|
if (!correct)
|
||||||
{
|
{
|
||||||
if (_userWordList.IndexOf(ChangeWord) < 0)
|
if (_userWordList.IndexOf(ChangeWord) < 0)
|
||||||
@ -541,7 +561,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bool correct = _hunspell.Spell(_currentWord);
|
bool correct = DoSpell(_currentWord);
|
||||||
if (correct)
|
if (correct)
|
||||||
{
|
{
|
||||||
_noOfCorrectWords++;
|
_noOfCorrectWords++;
|
||||||
@ -553,7 +573,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
List<string> suggestions = new List<string>();
|
List<string> suggestions = new List<string>();
|
||||||
|
|
||||||
if (_currentWord != "Lt'S" && _currentWord != "Sox's") //TODO: get fixed nhunspell
|
if (_currentWord != "Lt'S" && _currentWord != "Sox's") //TODO: get fixed nhunspell
|
||||||
suggestions = _hunspell.Suggest(_currentWord); //TODO: 0.9.6 fails on "Lt'S"
|
suggestions = DoSuggest(_currentWord); //TODO: 0.9.6 fails on "Lt'S"
|
||||||
|
|
||||||
if (AutoFixNames && _currentWord.Length > 1 && suggestions.Contains(_currentWord.Substring(0, 1).ToUpper() + _currentWord.Substring(1)))
|
if (AutoFixNames && _currentWord.Length > 1 && suggestions.Contains(_currentWord.Substring(0, 1).ToUpper() + _currentWord.Substring(1)))
|
||||||
{
|
{
|
||||||
@ -700,7 +720,11 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
}
|
}
|
||||||
|
|
||||||
_changeAllDictionary = new Dictionary<string, string>();
|
_changeAllDictionary = new Dictionary<string, string>();
|
||||||
_hunspell = new Hunspell(dictionary + ".aff", dictionary + ".dic");
|
|
||||||
|
if (Utilities.IsRunningOnLinux())
|
||||||
|
_linuxHunspell = new LinuxHunspell(dictionary + ".aff", dictionary + ".dic");
|
||||||
|
else
|
||||||
|
_hunspell = new Hunspell(dictionary + ".aff", dictionary + ".dic");
|
||||||
|
|
||||||
_currentIndex = 0;
|
_currentIndex = 0;
|
||||||
_currentParagraph = _subtitle.Paragraphs[_currentIndex];
|
_currentParagraph = _subtitle.Paragraphs[_currentIndex];
|
||||||
|
@ -1241,8 +1241,8 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
|
|
||||||
private string Tesseract3DoOcrViaExe(Bitmap bmp, string language)
|
private string Tesseract3DoOcrViaExe(Bitmap bmp, string language)
|
||||||
{
|
{
|
||||||
string tempTiffFileName = Path.GetTempPath() + Guid.NewGuid().ToString() + ".tiff";
|
string tempTiffFileName = Path.GetTempPath() + Guid.NewGuid().ToString() + ".png";
|
||||||
bmp.Save(tempTiffFileName, System.Drawing.Imaging.ImageFormat.Tiff);
|
bmp.Save(tempTiffFileName, System.Drawing.Imaging.ImageFormat.Png);
|
||||||
string tempTextFileName = Path.GetTempPath() + Guid.NewGuid().ToString();
|
string tempTextFileName = Path.GetTempPath() + Guid.NewGuid().ToString();
|
||||||
|
|
||||||
Process process = new Process();
|
Process process = new Process();
|
||||||
|
@ -28,6 +28,7 @@ namespace Nikse.SubtitleEdit.Logic
|
|||||||
public LanguageStructure.EbuSaveOtpions EbuSaveOtpions;
|
public LanguageStructure.EbuSaveOtpions EbuSaveOtpions;
|
||||||
public LanguageStructure.EffectKaraoke EffectKaraoke;
|
public LanguageStructure.EffectKaraoke EffectKaraoke;
|
||||||
public LanguageStructure.EffectTypewriter EffectTypewriter;
|
public LanguageStructure.EffectTypewriter EffectTypewriter;
|
||||||
|
public LanguageStructure.ExportPngXml ExportPngXml;
|
||||||
public LanguageStructure.FindDialog FindDialog;
|
public LanguageStructure.FindDialog FindDialog;
|
||||||
public LanguageStructure.FindSubtitleLine FindSubtitleLine;
|
public LanguageStructure.FindSubtitleLine FindSubtitleLine;
|
||||||
public LanguageStructure.FixCommonErrors FixCommonErrors;
|
public LanguageStructure.FixCommonErrors FixCommonErrors;
|
||||||
@ -299,6 +300,20 @@ namespace Nikse.SubtitleEdit.Logic
|
|||||||
EndDelayInMillisecs = "End delay in millisecs.:"
|
EndDelayInMillisecs = "End delay in millisecs.:"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ExportPngXml = new LanguageStructure.ExportPngXml
|
||||||
|
{
|
||||||
|
Title = "Export BDN XML/PNG",
|
||||||
|
ImageSettings = "Image settings",
|
||||||
|
AntiAlias = "Anti alias",
|
||||||
|
BorderColor = "Border color",
|
||||||
|
BorderWidth = "Border width",
|
||||||
|
ExportAllLines = "Export all lines...",
|
||||||
|
FontColor = "Font color",
|
||||||
|
FontFamily = "Font family",
|
||||||
|
FontSize = "Font size",
|
||||||
|
XImagesSavedInY = "{0} images saved in {1}",
|
||||||
|
};
|
||||||
|
|
||||||
FindDialog = new LanguageStructure.FindDialog
|
FindDialog = new LanguageStructure.FindDialog
|
||||||
{
|
{
|
||||||
Title = "Find",
|
Title = "Find",
|
||||||
|
@ -229,6 +229,20 @@
|
|||||||
public string EndDelayInMillisecs { get; set; }
|
public string EndDelayInMillisecs { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class ExportPngXml
|
||||||
|
{
|
||||||
|
public string Title { get; set; }
|
||||||
|
public string ImageSettings { get; set; }
|
||||||
|
public string FontFamily { get; set; }
|
||||||
|
public string FontSize { get; set; }
|
||||||
|
public string FontColor { get; set; }
|
||||||
|
public string BorderColor { get; set; }
|
||||||
|
public string BorderWidth { get; set; }
|
||||||
|
public string AntiAlias { get; set; }
|
||||||
|
public string ExportAllLines { get; set; }
|
||||||
|
public string XImagesSavedInY { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class FindDialog
|
public class FindDialog
|
||||||
{
|
{
|
||||||
public string Title { get; set; }
|
public string Title { get; set; }
|
||||||
|
65
src/Logic/LinuxHunspell.cs
Normal file
65
src/Logic/LinuxHunspell.cs
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
namespace Nikse.SubtitleEdit.Logic
|
||||||
|
{
|
||||||
|
public class LinuxHunspell
|
||||||
|
{
|
||||||
|
[DllImport ("libhunspell")]
|
||||||
|
private static extern IntPtr Hunspell_create(string affpath, string dpath);
|
||||||
|
|
||||||
|
[DllImport ("libhunspell")]
|
||||||
|
private static extern IntPtr Hunspell_destroy(IntPtr hunspellHandle);
|
||||||
|
|
||||||
|
[DllImport ("libhunspell")]
|
||||||
|
private static extern int Hunspell_spell(IntPtr hunspellHandle, string word);
|
||||||
|
|
||||||
|
[DllImport ("libhunspell")]
|
||||||
|
private static extern int Hunspell_suggest(IntPtr hunspellHandle, IntPtr slst, string word);
|
||||||
|
|
||||||
|
[DllImport ("libhunspell")]
|
||||||
|
private static extern void Hunspell_free_list(IntPtr hunspellHandle, IntPtr slst, int n);
|
||||||
|
|
||||||
|
private IntPtr _hunspellHandle = IntPtr.Zero;
|
||||||
|
|
||||||
|
public LinuxHunspell (string affDirectory, string dicDictory)
|
||||||
|
{
|
||||||
|
//Also search - /usr/share/hunspell
|
||||||
|
_hunspellHandle = Hunspell_create(affDirectory, dicDictory);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Spell(string word)
|
||||||
|
{
|
||||||
|
return Hunspell_spell(_hunspellHandle, word) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<string> Suggest(string word)
|
||||||
|
{
|
||||||
|
IntPtr pointerToAddressStringArray = Marshal.AllocHGlobal(IntPtr.Size);
|
||||||
|
int resultCount = Hunspell_suggest(_hunspellHandle, pointerToAddressStringArray, word);
|
||||||
|
IntPtr addressStringArray = Marshal.ReadIntPtr(pointerToAddressStringArray);
|
||||||
|
List<string> results = new List<string>();
|
||||||
|
for (int i = 0; i < resultCount; i++)
|
||||||
|
{
|
||||||
|
IntPtr addressCharArray = Marshal.ReadIntPtr(addressStringArray, i * 4);
|
||||||
|
int offset = 0;
|
||||||
|
List<byte> bytesList = new List<byte>();
|
||||||
|
byte newByte = Marshal.ReadByte(addressCharArray, offset++);
|
||||||
|
while (newByte != 0)
|
||||||
|
{
|
||||||
|
bytesList.Add(newByte);
|
||||||
|
newByte = Marshal.ReadByte(addressCharArray, offset++);
|
||||||
|
}
|
||||||
|
byte[] bytesArray = new byte[offset];
|
||||||
|
bytesList.CopyTo(bytesArray);
|
||||||
|
string suggestion = System.Text.Encoding.UTF8.GetString(bytesArray);
|
||||||
|
results.Add(suggestion);
|
||||||
|
}
|
||||||
|
Hunspell_free_list(_hunspellHandle, pointerToAddressStringArray, resultCount);
|
||||||
|
Marshal.FreeHGlobal(pointerToAddressStringArray);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -33,6 +33,7 @@ namespace Nikse.SubtitleEdit.Logic.OCR
|
|||||||
List<string> _userWordList = new List<string>();
|
List<string> _userWordList = new List<string>();
|
||||||
List<string> _wordSkipList = new List<string>();
|
List<string> _wordSkipList = new List<string>();
|
||||||
Hunspell _hunspell;
|
Hunspell _hunspell;
|
||||||
|
LinuxHunspell _linuxHunspell;
|
||||||
readonly OcrSpellCheck _spellCheck;
|
readonly OcrSpellCheck _spellCheck;
|
||||||
readonly Form _parentForm;
|
readonly Form _parentForm;
|
||||||
private string _spellCheckDictionaryName;
|
private string _spellCheckDictionaryName;
|
||||||
@ -188,7 +189,10 @@ namespace Nikse.SubtitleEdit.Logic.OCR
|
|||||||
// Load NHunspell spellchecker
|
// Load NHunspell spellchecker
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_hunspell = new Hunspell(dictionary + ".aff", dictionary + ".dic");
|
if (Utilities.IsRunningOnLinux())
|
||||||
|
_linuxHunspell = new LinuxHunspell(dictionary + ".aff", dictionary + ".dic");
|
||||||
|
else
|
||||||
|
_hunspell = new Hunspell(dictionary + ".aff", dictionary + ".dic");
|
||||||
IsDictionaryLoaded = true;
|
IsDictionaryLoaded = true;
|
||||||
_spellCheckDictionaryName = dictionary;
|
_spellCheckDictionaryName = dictionary;
|
||||||
DictionaryCulture = culture;
|
DictionaryCulture = culture;
|
||||||
@ -565,15 +569,15 @@ namespace Nikse.SubtitleEdit.Logic.OCR
|
|||||||
if (Configuration.Settings.Tools.OcrFixUseHardcodedRules)
|
if (Configuration.Settings.Tools.OcrFixUseHardcodedRules)
|
||||||
{
|
{
|
||||||
// e.g. "selectionsu." -> "selections..."
|
// e.g. "selectionsu." -> "selections..."
|
||||||
if (input.EndsWith("u.") && _hunspell != null)
|
if (input.EndsWith("u.") && (_hunspell != null || _linuxHunspell != null))
|
||||||
{
|
{
|
||||||
string[] words = input.Split(" .".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
string[] words = input.Split(" .".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
||||||
if (words.Length > 0)
|
if (words.Length > 0)
|
||||||
{
|
{
|
||||||
string lastWord = words[words.Length - 1].Trim();
|
string lastWord = words[words.Length - 1].Trim();
|
||||||
if (lastWord.Length > 2 &&
|
if (lastWord.Length > 2 &&
|
||||||
!IsWordOrWordsCorrect(_hunspell, lastWord) &&
|
!IsWordOrWordsCorrect(lastWord) &&
|
||||||
IsWordOrWordsCorrect(_hunspell, lastWord.Substring(0, lastWord.Length - 1)))
|
IsWordOrWordsCorrect(lastWord.Substring(0, lastWord.Length - 1)))
|
||||||
input = input.Substring(0, input.Length - 2) + "...";
|
input = input.Substring(0, input.Length - 2) + "...";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -722,7 +726,7 @@ namespace Nikse.SubtitleEdit.Logic.OCR
|
|||||||
{
|
{
|
||||||
List<string> localIgnoreWords = new List<string>();
|
List<string> localIgnoreWords = new List<string>();
|
||||||
wordsNotFound = 0;
|
wordsNotFound = 0;
|
||||||
if (_hunspell == null)
|
if (_hunspell == null && _linuxHunspell == null)
|
||||||
return line;
|
return line;
|
||||||
|
|
||||||
string tempLine = line;
|
string tempLine = line;
|
||||||
@ -760,9 +764,9 @@ namespace Nikse.SubtitleEdit.Logic.OCR
|
|||||||
string word = words[i];
|
string word = words[i];
|
||||||
if (!IsWordKnownOrNumber(word, line) && !localIgnoreWords.Contains(word))
|
if (!IsWordKnownOrNumber(word, line) && !localIgnoreWords.Contains(word))
|
||||||
{
|
{
|
||||||
bool correct = _hunspell.Spell(word);
|
bool correct = DoSpell(word);
|
||||||
if (!correct)
|
if (!correct)
|
||||||
correct = _hunspell.Spell(word.Trim('\''));
|
correct = DoSpell(word.Trim('\''));
|
||||||
if (!correct)
|
if (!correct)
|
||||||
{
|
{
|
||||||
wordsNotFound++;
|
wordsNotFound++;
|
||||||
@ -777,7 +781,7 @@ namespace Nikse.SubtitleEdit.Logic.OCR
|
|||||||
guesses = (List<string>)CreateGuessesFromLetters(word);
|
guesses = (List<string>)CreateGuessesFromLetters(word);
|
||||||
|
|
||||||
string wordWithCasingChanged = GetWordWithDominatedCasing(word);
|
string wordWithCasingChanged = GetWordWithDominatedCasing(word);
|
||||||
if (_hunspell.Spell(word.ToLower()))
|
if (DoSpell(word.ToLower()))
|
||||||
guesses.Insert(0, wordWithCasingChanged);
|
guesses.Insert(0, wordWithCasingChanged);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -794,7 +798,7 @@ namespace Nikse.SubtitleEdit.Logic.OCR
|
|||||||
}
|
}
|
||||||
foreach (string guess in guesses)
|
foreach (string guess in guesses)
|
||||||
{
|
{
|
||||||
if (IsWordOrWordsCorrect(_hunspell, guess))
|
if (IsWordOrWordsCorrect(guess))
|
||||||
{
|
{
|
||||||
string replacedLine = ReplaceWord(line, word, guess);
|
string replacedLine = ReplaceWord(line, word, guess);
|
||||||
if (replacedLine != line)
|
if (replacedLine != line)
|
||||||
@ -816,7 +820,7 @@ namespace Nikse.SubtitleEdit.Logic.OCR
|
|||||||
List<string> suggestions = new List<string>();
|
List<string> suggestions = new List<string>();
|
||||||
|
|
||||||
if (word != "Lt'S" && word != "Sox's") //TODO: get fixed nhunspell
|
if (word != "Lt'S" && word != "Sox's") //TODO: get fixed nhunspell
|
||||||
suggestions = _hunspell.Suggest(word); // 0.9.6 fails on "Lt'S"
|
suggestions = DoSuggest(word); // 0.9.6 fails on "Lt'S"
|
||||||
|
|
||||||
SpellcheckOcrTextResult res = SpellcheckOcrText(line, bitmap, words, i, word, suggestions);
|
SpellcheckOcrTextResult res = SpellcheckOcrText(line, bitmap, words, i, word, suggestions);
|
||||||
if (res.FixedWholeLine)
|
if (res.FixedWholeLine)
|
||||||
@ -1022,11 +1026,27 @@ namespace Nikse.SubtitleEdit.Logic.OCR
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsWordOrWordsCorrect(Hunspell hunspell, string word)
|
public bool DoSpell(string word)
|
||||||
|
{
|
||||||
|
if (_hunspell != null)
|
||||||
|
return _hunspell.Spell(word);
|
||||||
|
else
|
||||||
|
return _linuxHunspell.Spell(word);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<string> DoSuggest(string word)
|
||||||
|
{
|
||||||
|
if (_hunspell != null)
|
||||||
|
return _hunspell.Suggest(word);
|
||||||
|
else
|
||||||
|
return _linuxHunspell.Suggest(word);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsWordOrWordsCorrect(string word)
|
||||||
{
|
{
|
||||||
foreach (string s in word.Split(' '))
|
foreach (string s in word.Split(' '))
|
||||||
{
|
{
|
||||||
if (!hunspell.Spell(s))
|
if (!DoSpell(s))
|
||||||
{
|
{
|
||||||
if (!IsWordKnownOrNumber(word, word))
|
if (!IsWordKnownOrNumber(word, word))
|
||||||
return false;
|
return false;
|
||||||
|
@ -195,6 +195,12 @@
|
|||||||
<Compile Include="Forms\EffectTypewriter.Designer.cs">
|
<Compile Include="Forms\EffectTypewriter.Designer.cs">
|
||||||
<DependentUpon>EffectTypewriter.cs</DependentUpon>
|
<DependentUpon>EffectTypewriter.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Forms\ExportPngXml.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Forms\ExportPngXml.Designer.cs">
|
||||||
|
<DependentUpon>ExportPngXml.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Forms\FindDialog.cs">
|
<Compile Include="Forms\FindDialog.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@ -497,6 +503,7 @@
|
|||||||
<Compile Include="Logic\FastBitmap.cs" />
|
<Compile Include="Logic\FastBitmap.cs" />
|
||||||
<Compile Include="Logic\IfoParser.cs" />
|
<Compile Include="Logic\IfoParser.cs" />
|
||||||
<Compile Include="Logic\Language.cs" />
|
<Compile Include="Logic\Language.cs" />
|
||||||
|
<Compile Include="Logic\LinuxHunspell.cs" />
|
||||||
<Compile Include="Logic\Networking\NikseWebServiceSession.cs">
|
<Compile Include="Logic\Networking\NikseWebServiceSession.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@ -668,6 +675,9 @@
|
|||||||
<DependentUpon>EffectTypewriter.cs</DependentUpon>
|
<DependentUpon>EffectTypewriter.cs</DependentUpon>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Forms\ExportPngXml.resx">
|
||||||
|
<DependentUpon>ExportPngXml.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Forms\FindDialog.resx">
|
<EmbeddedResource Include="Forms\FindDialog.resx">
|
||||||
<DependentUpon>FindDialog.cs</DependentUpon>
|
<DependentUpon>FindDialog.cs</DependentUpon>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
|
Loading…
Reference in New Issue
Block a user