diff --git a/Ocr/Latin.nocr b/Ocr/Latin.nocr index 06902cfc1..2409621c0 100644 Binary files a/Ocr/Latin.nocr and b/Ocr/Latin.nocr differ diff --git a/libse/Settings.cs b/libse/Settings.cs index abf638a25..d48768669 100644 --- a/libse/Settings.cs +++ b/libse/Settings.cs @@ -1398,6 +1398,7 @@ $HorzAlign = Center public int LineOcrLinesToAutoGuess { get; set; } public int LineOcrMinLineHeight { get; set; } public int LineOcrMaxLineHeight { get; set; } + public int LineOcrMaxErrorPixels { get; set; } public string LastBinaryImageCompareDb { get; set; } public string LastBinaryImageSpellCheck { get; set; } public bool BinaryAutoDetectBestDb { get; set; } @@ -1427,6 +1428,7 @@ $HorzAlign = Center AutoBreakSubtitleIfMoreThanTwoLines = true; ItalicFactor = 0.2f; LineOcrLinesToAutoGuess = 100; + LineOcrMaxErrorPixels = 45; BinaryAutoDetectBestDb = true; CaptureTopAlign = false; UnfocusedAttentionBlinkCount = 50; @@ -5292,6 +5294,12 @@ $HorzAlign = Center settings.VobSubOcr.LineOcrMaxLineHeight = Convert.ToInt32(subNode.InnerText, CultureInfo.InvariantCulture); } + subNode = node.SelectSingleNode("LineOcrMaxErrorPixels"); + if (subNode != null) + { + settings.VobSubOcr.LineOcrMaxErrorPixels = Convert.ToInt32(subNode.InnerText, CultureInfo.InvariantCulture); + } + subNode = node.SelectSingleNode("LastBinaryImageCompareDb"); if (subNode != null) { @@ -7507,6 +7515,7 @@ $HorzAlign = Center textWriter.WriteElementString("LineOcrLinesToAutoGuess", settings.VobSubOcr.LineOcrLinesToAutoGuess.ToString(CultureInfo.InvariantCulture)); textWriter.WriteElementString("LineOcrMinLineHeight", settings.VobSubOcr.LineOcrMinLineHeight.ToString(CultureInfo.InvariantCulture)); textWriter.WriteElementString("LineOcrMaxLineHeight", settings.VobSubOcr.LineOcrMaxLineHeight.ToString(CultureInfo.InvariantCulture)); + textWriter.WriteElementString("LineOcrMaxErrorPixels", settings.VobSubOcr.LineOcrMaxErrorPixels.ToString(CultureInfo.InvariantCulture)); textWriter.WriteElementString("LastBinaryImageCompareDb", settings.VobSubOcr.LastBinaryImageCompareDb); textWriter.WriteElementString("LastBinaryImageSpellCheck", settings.VobSubOcr.LastBinaryImageSpellCheck); textWriter.WriteElementString("BinaryAutoDetectBestDb", settings.VobSubOcr.BinaryAutoDetectBestDb.ToString(CultureInfo.InvariantCulture)); diff --git a/src/Forms/Ocr/AddBetterMultiMatchNOcr.Designer.cs b/src/Forms/Ocr/AddBetterMultiMatchNOcr.Designer.cs new file mode 100644 index 000000000..ff4621217 --- /dev/null +++ b/src/Forms/Ocr/AddBetterMultiMatchNOcr.Designer.cs @@ -0,0 +1,217 @@ +namespace Nikse.SubtitleEdit.Forms.Ocr +{ + partial class AddBetterMultiMatchNOcr + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.groupBoxInspectItems = new System.Windows.Forms.GroupBox(); + this.label1 = new System.Windows.Forms.Label(); + this.checkBoxItalic = new System.Windows.Forms.CheckBox(); + this.labelText = new System.Windows.Forms.Label(); + this.textBoxText = new System.Windows.Forms.TextBox(); + this.numericUpDownExpandCount = new System.Windows.Forms.NumericUpDown(); + this.labelImageInfo = new System.Windows.Forms.Label(); + this.pictureBoxInspectItem = new System.Windows.Forms.PictureBox(); + this.listBoxInspectItems = new System.Windows.Forms.ListBox(); + this.buttonCancel = new System.Windows.Forms.Button(); + this.buttonOK = new System.Windows.Forms.Button(); + this.groupBoxInspectItems.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownExpandCount)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxInspectItem)).BeginInit(); + this.SuspendLayout(); + // + // groupBoxInspectItems + // + this.groupBoxInspectItems.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.groupBoxInspectItems.Controls.Add(this.label1); + this.groupBoxInspectItems.Controls.Add(this.checkBoxItalic); + this.groupBoxInspectItems.Controls.Add(this.labelText); + this.groupBoxInspectItems.Controls.Add(this.textBoxText); + this.groupBoxInspectItems.Controls.Add(this.numericUpDownExpandCount); + this.groupBoxInspectItems.Controls.Add(this.labelImageInfo); + this.groupBoxInspectItems.Controls.Add(this.pictureBoxInspectItem); + this.groupBoxInspectItems.Controls.Add(this.listBoxInspectItems); + this.groupBoxInspectItems.Location = new System.Drawing.Point(12, 12); + this.groupBoxInspectItems.Name = "groupBoxInspectItems"; + this.groupBoxInspectItems.Size = new System.Drawing.Size(569, 381); + this.groupBoxInspectItems.TabIndex = 4; + this.groupBoxInspectItems.TabStop = false; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(253, 19); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(73, 13); + this.label1.TabIndex = 1; + this.label1.Text = "Expand count"; + // + // checkBoxItalic + // + this.checkBoxItalic.AutoSize = true; + this.checkBoxItalic.Location = new System.Drawing.Point(253, 130); + this.checkBoxItalic.Name = "checkBoxItalic"; + this.checkBoxItalic.Size = new System.Drawing.Size(58, 17); + this.checkBoxItalic.TabIndex = 4; + this.checkBoxItalic.Text = "Is &italic"; + this.checkBoxItalic.UseVisualStyleBackColor = true; + // + // labelText + // + this.labelText.AutoSize = true; + this.labelText.Location = new System.Drawing.Point(252, 86); + this.labelText.Name = "labelText"; + this.labelText.Size = new System.Drawing.Size(28, 13); + this.labelText.TabIndex = 31; + this.labelText.Text = "Text"; + // + // textBoxText + // + this.textBoxText.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.textBoxText.Location = new System.Drawing.Point(252, 102); + this.textBoxText.Name = "textBoxText"; + this.textBoxText.Size = new System.Drawing.Size(100, 23); + this.textBoxText.TabIndex = 3; + // + // numericUpDownExpandCount + // + this.numericUpDownExpandCount.Location = new System.Drawing.Point(252, 38); + this.numericUpDownExpandCount.Maximum = new decimal(new int[] { + 3, + 0, + 0, + 0}); + this.numericUpDownExpandCount.Minimum = new decimal(new int[] { + 2, + 0, + 0, + 0}); + this.numericUpDownExpandCount.Name = "numericUpDownExpandCount"; + this.numericUpDownExpandCount.Size = new System.Drawing.Size(63, 20); + this.numericUpDownExpandCount.TabIndex = 2; + this.numericUpDownExpandCount.Value = new decimal(new int[] { + 2, + 0, + 0, + 0}); + // + // labelImageInfo + // + this.labelImageInfo.AutoSize = true; + this.labelImageInfo.Location = new System.Drawing.Point(253, 168); + this.labelImageInfo.Name = "labelImageInfo"; + this.labelImageInfo.Size = new System.Drawing.Size(45, 13); + this.labelImageInfo.TabIndex = 5; + this.labelImageInfo.Text = "Preview"; + // + // pictureBoxInspectItem + // + this.pictureBoxInspectItem.BackColor = System.Drawing.Color.Red; + this.pictureBoxInspectItem.Location = new System.Drawing.Point(253, 184); + this.pictureBoxInspectItem.Name = "pictureBoxInspectItem"; + this.pictureBoxInspectItem.Size = new System.Drawing.Size(52, 52); + this.pictureBoxInspectItem.TabIndex = 23; + this.pictureBoxInspectItem.TabStop = false; + // + // listBoxInspectItems + // + this.listBoxInspectItems.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.listBoxInspectItems.Enabled = false; + this.listBoxInspectItems.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.listBoxInspectItems.FormattingEnabled = true; + this.listBoxInspectItems.Location = new System.Drawing.Point(6, 19); + this.listBoxInspectItems.Name = "listBoxInspectItems"; + this.listBoxInspectItems.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple; + this.listBoxInspectItems.Size = new System.Drawing.Size(240, 342); + this.listBoxInspectItems.TabIndex = 0; + // + // 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(506, 399); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(75, 23); + this.buttonCancel.TabIndex = 3; + this.buttonCancel.Text = "C&ancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + // + // buttonOK + // + this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK; + this.buttonOK.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.buttonOK.Location = new System.Drawing.Point(425, 399); + this.buttonOK.Name = "buttonOK"; + this.buttonOK.Size = new System.Drawing.Size(75, 23); + this.buttonOK.TabIndex = 5; + this.buttonOK.Text = "&OK"; + this.buttonOK.UseVisualStyleBackColor = true; + // + // AddBetterMultiMatchNOcr + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(593, 434); + this.Controls.Add(this.groupBoxInspectItems); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.buttonOK); + this.KeyPreview = true; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "AddBetterMultiMatchNOcr"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "AddBetterMultiMatchNOcr"; + this.groupBoxInspectItems.ResumeLayout(false); + this.groupBoxInspectItems.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownExpandCount)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxInspectItem)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.GroupBox groupBoxInspectItems; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.CheckBox checkBoxItalic; + private System.Windows.Forms.Label labelText; + private System.Windows.Forms.TextBox textBoxText; + private System.Windows.Forms.NumericUpDown numericUpDownExpandCount; + private System.Windows.Forms.Label labelImageInfo; + private System.Windows.Forms.PictureBox pictureBoxInspectItem; + private System.Windows.Forms.ListBox listBoxInspectItems; + private System.Windows.Forms.Button buttonCancel; + private System.Windows.Forms.Button buttonOK; + } +} \ No newline at end of file diff --git a/src/Forms/Ocr/AddBetterMultiMatchNOcr.cs b/src/Forms/Ocr/AddBetterMultiMatchNOcr.cs new file mode 100644 index 000000000..5b83393f2 --- /dev/null +++ b/src/Forms/Ocr/AddBetterMultiMatchNOcr.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace Nikse.SubtitleEdit.Forms.Ocr +{ + public partial class AddBetterMultiMatchNOcr : Form + { + public AddBetterMultiMatchNOcr() + { + InitializeComponent(); + } + } +} diff --git a/src/Forms/Ocr/AddBetterMultiMatchNOcr.resx b/src/Forms/Ocr/AddBetterMultiMatchNOcr.resx new file mode 100644 index 000000000..1af7de150 --- /dev/null +++ b/src/Forms/Ocr/AddBetterMultiMatchNOcr.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/src/Forms/Ocr/BinaryOcrChooseEditDb.Designer.cs b/src/Forms/Ocr/BinaryOcrChooseEditDb.Designer.cs new file mode 100644 index 000000000..b9eb7985e --- /dev/null +++ b/src/Forms/Ocr/BinaryOcrChooseEditDb.Designer.cs @@ -0,0 +1,160 @@ +namespace Nikse.SubtitleEdit.Forms.Ocr +{ + sealed partial class BinaryOcrChooseEditDb + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.buttonEditCharacterDatabase = new System.Windows.Forms.Button(); + this.buttonNewCharacterDatabase = new System.Windows.Forms.Button(); + this.label2 = new System.Windows.Forms.Label(); + this.comboBoxNOcrLanguage = new System.Windows.Forms.ComboBox(); + this.comboBoxCharacterDatabase = new System.Windows.Forms.ComboBox(); + this.labelImageDatabase = new System.Windows.Forms.Label(); + this.buttonCancel = new System.Windows.Forms.Button(); + this.buttonOK = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // buttonEditCharacterDatabase + // + this.buttonEditCharacterDatabase.Location = new System.Drawing.Point(215, 51); + this.buttonEditCharacterDatabase.Name = "buttonEditCharacterDatabase"; + this.buttonEditCharacterDatabase.Size = new System.Drawing.Size(86, 23); + this.buttonEditCharacterDatabase.TabIndex = 5; + this.buttonEditCharacterDatabase.Text = "Edit"; + this.buttonEditCharacterDatabase.UseVisualStyleBackColor = true; + this.buttonEditCharacterDatabase.Click += new System.EventHandler(this.buttonEditCharacterDatabase_Click); + // + // buttonNewCharacterDatabase + // + this.buttonNewCharacterDatabase.Location = new System.Drawing.Point(307, 51); + this.buttonNewCharacterDatabase.Name = "buttonNewCharacterDatabase"; + this.buttonNewCharacterDatabase.Size = new System.Drawing.Size(86, 23); + this.buttonNewCharacterDatabase.TabIndex = 4; + this.buttonNewCharacterDatabase.Text = "New"; + this.buttonNewCharacterDatabase.UseVisualStyleBackColor = true; + this.buttonNewCharacterDatabase.Click += new System.EventHandler(this.buttonNewCharacterDatabase_Click); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(18, 108); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(124, 13); + this.label2.TabIndex = 37; + this.label2.Text = "nOCR fallback dictionary"; + // + // comboBoxNOcrLanguage + // + this.comboBoxNOcrLanguage.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxNOcrLanguage.FormattingEnabled = true; + this.comboBoxNOcrLanguage.Location = new System.Drawing.Point(21, 124); + this.comboBoxNOcrLanguage.Name = "comboBoxNOcrLanguage"; + this.comboBoxNOcrLanguage.Size = new System.Drawing.Size(188, 21); + this.comboBoxNOcrLanguage.TabIndex = 36; + // + // comboBoxCharacterDatabase + // + this.comboBoxCharacterDatabase.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxCharacterDatabase.FormattingEnabled = true; + this.comboBoxCharacterDatabase.Location = new System.Drawing.Point(21, 51); + this.comboBoxCharacterDatabase.Name = "comboBoxCharacterDatabase"; + this.comboBoxCharacterDatabase.Size = new System.Drawing.Size(188, 21); + this.comboBoxCharacterDatabase.TabIndex = 39; + // + // labelImageDatabase + // + this.labelImageDatabase.AutoSize = true; + this.labelImageDatabase.Location = new System.Drawing.Point(18, 35); + this.labelImageDatabase.Name = "labelImageDatabase"; + this.labelImageDatabase.Size = new System.Drawing.Size(83, 13); + this.labelImageDatabase.TabIndex = 38; + this.labelImageDatabase.Text = "Image database"; + // + // buttonCancel + // + this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.buttonCancel.Location = new System.Drawing.Point(320, 171); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(75, 23); + this.buttonCancel.TabIndex = 41; + this.buttonCancel.Text = "C&ancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); + // + // buttonOK + // + this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOK.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.buttonOK.Location = new System.Drawing.Point(239, 171); + this.buttonOK.Name = "buttonOK"; + this.buttonOK.Size = new System.Drawing.Size(75, 23); + this.buttonOK.TabIndex = 40; + this.buttonOK.Text = "&OK"; + this.buttonOK.UseVisualStyleBackColor = true; + this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); + // + // BinaryOcrChooseEditDb + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(407, 206); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.buttonOK); + this.Controls.Add(this.comboBoxCharacterDatabase); + this.Controls.Add(this.labelImageDatabase); + this.Controls.Add(this.label2); + this.Controls.Add(this.comboBoxNOcrLanguage); + this.Controls.Add(this.buttonEditCharacterDatabase); + this.Controls.Add(this.buttonNewCharacterDatabase); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.KeyPreview = true; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "BinaryOcrChooseEditDb"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "BinaryOcrChooseEditDb"; + this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.BinaryOcrChooseEditDb_KeyDown); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button buttonEditCharacterDatabase; + private System.Windows.Forms.Button buttonNewCharacterDatabase; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.ComboBox comboBoxNOcrLanguage; + private System.Windows.Forms.ComboBox comboBoxCharacterDatabase; + private System.Windows.Forms.Label labelImageDatabase; + private System.Windows.Forms.Button buttonCancel; + private System.Windows.Forms.Button buttonOK; + } +} \ No newline at end of file diff --git a/src/Forms/Ocr/BinaryOcrChooseEditDb.cs b/src/Forms/Ocr/BinaryOcrChooseEditDb.cs new file mode 100644 index 000000000..0cf8f1b75 --- /dev/null +++ b/src/Forms/Ocr/BinaryOcrChooseEditDb.cs @@ -0,0 +1,136 @@ +using System; +using Nikse.SubtitleEdit.Core; +using System.IO; +using System.Windows.Forms; +using Nikse.SubtitleEdit.Logic.Ocr.Binary; + +namespace Nikse.SubtitleEdit.Forms.Ocr +{ + public sealed partial class BinaryOcrChooseEditDb : Form + { + public string ImageCompareDatabaseName { get; private set; } + + public BinaryOcrChooseEditDb(string binaryImageDb) + { + InitializeComponent(); + + buttonNewCharacterDatabase.Text = Configuration.Settings.Language.VobSubOcr.New; + buttonEditCharacterDatabase.Text = Configuration.Settings.Language.VobSubOcr.Edit; + buttonOK.Text = Configuration.Settings.Language.General.Ok; + buttonCancel.Text = Configuration.Settings.Language.General.Cancel; + labelImageDatabase.Text = Configuration.Settings.Language.VobSubOcr.ImageDatabase; + Text = Configuration.Settings.Language.VobSubOcr.ImageDatabase; + + var imageCompareDbName = string.Empty; + var nOcrDbName = string.Empty; + ImageCompareDatabaseName = binaryImageDb; + if (!string.IsNullOrEmpty(binaryImageDb)) + { + var parts = binaryImageDb.Split('+'); + if (parts.Length > 0) + { + imageCompareDbName = parts[0]; + if (parts.Length > 1) + { + nOcrDbName = parts[1]; + } + } + } + + comboBoxNOcrLanguage.Items.Clear(); + comboBoxNOcrLanguage.Items.Add(string.Empty); + foreach (string fileName in Directory.GetFiles(Configuration.OcrDirectory, "*.nocr")) + { + string s = Path.GetFileNameWithoutExtension(fileName); + comboBoxNOcrLanguage.Items.Add(s); + if (s == nOcrDbName) + { + comboBoxNOcrLanguage.SelectedIndex = comboBoxNOcrLanguage.Items.Count - 1; + } + } + + comboBoxCharacterDatabase.Items.Clear(); + foreach (string s in BinaryOcrDb.GetDatabases()) + { + comboBoxCharacterDatabase.Items.Add(s); + if (s == imageCompareDbName) + { + comboBoxCharacterDatabase.SelectedIndex = comboBoxCharacterDatabase.Items.Count - 1; + } + } + } + + private void BinaryOcrChooseEditDb_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Escape) + { + e.SuppressKeyPress = true; + DialogResult = DialogResult.Cancel; + } + } + + private void buttonOK_Click(object sender, EventArgs e) + { + ImageCompareDatabaseName = comboBoxCharacterDatabase.Text; + if (string.IsNullOrEmpty(ImageCompareDatabaseName)) + { + return; + } + + var nOcrDatabase = comboBoxNOcrLanguage.Text; + if (!string.IsNullOrEmpty(nOcrDatabase)) + { + ImageCompareDatabaseName += "+" + nOcrDatabase; + } + + DialogResult = DialogResult.OK; + } + + private void buttonCancel_Click(object sender, EventArgs e) + { + DialogResult = DialogResult.Cancel; + } + + private void buttonNewCharacterDatabase_Click(object sender, EventArgs e) + { + using (var newFolder = new VobSubOcrNewFolder(false)) + { + if (newFolder.ShowDialog(this) == DialogResult.OK) + { + try + { + string fileName = Path.Combine(Configuration.OcrDirectory, newFolder.FolderName + ".db"); + if (File.Exists(fileName)) + { + MessageBox.Show("OCR db already exists!"); + return; + } + + comboBoxCharacterDatabase.Items.Add(newFolder.FolderName); + comboBoxCharacterDatabase.SelectedIndex = comboBoxCharacterDatabase.Items.Count - 1; + var binaryOcrDb = new BinaryOcrDb(fileName); + binaryOcrDb.Save(); + } + catch (Exception exception) + { + MessageBox.Show(exception.Message); + } + } + } + } + + private void buttonEditCharacterDatabase_Click(object sender, EventArgs e) + { + var fileName = Path.Combine(Configuration.OcrDirectory, comboBoxCharacterDatabase.SelectedItem + ".db"); + var binaryOcrDb = new BinaryOcrDb(fileName); + binaryOcrDb.LoadCompareImages(); + using (var formVobSubEditCharacters = new VobSubEditCharacters( null, binaryOcrDb)) + { + if (formVobSubEditCharacters.ShowDialog() == DialogResult.OK) + { + binaryOcrDb.Save(); + } + } + } + } +} diff --git a/src/Forms/Ocr/BinaryOcrChooseEditDb.resx b/src/Forms/Ocr/BinaryOcrChooseEditDb.resx new file mode 100644 index 000000000..1af7de150 --- /dev/null +++ b/src/Forms/Ocr/BinaryOcrChooseEditDb.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/src/Forms/Ocr/VobSubEditCharacters.cs b/src/Forms/Ocr/VobSubEditCharacters.cs index b3c46e994..73b22b869 100644 --- a/src/Forms/Ocr/VobSubEditCharacters.cs +++ b/src/Forms/Ocr/VobSubEditCharacters.cs @@ -4,23 +4,17 @@ using Nikse.SubtitleEdit.Logic.Ocr.Binary; using System; using System.Collections.Generic; using System.Drawing; -using System.IO; using System.Windows.Forms; -using System.Xml; namespace Nikse.SubtitleEdit.Forms.Ocr { public sealed partial class VobSubEditCharacters : Form { - private readonly XmlDocument _compareDoc = new XmlDocument(); - private readonly string _directoryPath; private List _italics = new List(); internal List Additions { get; } private readonly BinaryOcrDb _binOcrDb; - public XmlDocument ImageCompareDocument => _compareDoc; - - internal VobSubEditCharacters(string databaseFolderName, List additions, BinaryOcrDb binOcrDb) + internal VobSubEditCharacters(List additions, BinaryOcrDb binOcrDb) { UiUtil.PreInitialize(this); InitializeComponent(); @@ -47,17 +41,6 @@ namespace Nikse.SubtitleEdit.Forms.Ocr labelImageInfo.Text = string.Empty; pictureBox1.SizeMode = PictureBoxSizeMode.AutoSize; - - _directoryPath = Configuration.VobSubCompareDirectory + databaseFolderName + Path.DirectorySeparatorChar; - if (!File.Exists(_directoryPath + "Images.xml")) - { - _compareDoc.LoadXml(""); - } - else - { - _compareDoc.Load(_directoryPath + "Images.xml"); - } - Refill(Additions); Text = Configuration.Settings.Language.VobSubEditCharacters.Title; @@ -137,25 +120,6 @@ namespace Nikse.SubtitleEdit.Forms.Ocr } } } - else - { - foreach (XmlNode node in _compareDoc.DocumentElement.ChildNodes) - { - if (node.Attributes["Text"] != null) - { - string text = node.Attributes["Text"].InnerText; - string name = node.InnerText; - foreach (VobSubOcr.ImageCompareAddition a in additions) - { - if (name == a.Name) - { - listBoxFileNames.Items.Add("[" + text + "] " + node.InnerText); - _italics.Add(node.Attributes["Italic"] != null); - } - } - } - } - } if (listBoxFileNames.Items.Count > 0) { @@ -191,22 +155,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr count++; } } - else - { - foreach (XmlNode node in _compareDoc.DocumentElement.SelectNodes("Item")) - { - if (node.Attributes.Count >= 1) - { - string text = node.Attributes["Text"].InnerText; - if (!texts.Contains(text)) - { - texts.Add(text); - } - - count++; - } - } - } + texts.Sort(); labelCount.Text = $"{count:#,##0}"; @@ -250,21 +199,6 @@ namespace Nikse.SubtitleEdit.Forms.Ocr } } } - else - { - foreach (XmlNode node in _compareDoc.DocumentElement.ChildNodes) - { - if (node.Attributes["Text"] != null) - { - string text = node.Attributes["Text"].InnerText; - if (text == target) - { - listBoxFileNames.Items.Add(node.InnerText); - _italics.Add(node.Attributes["Italic"] != null); - } - } - } - } if (listBoxFileNames.Items.Count > 0) { @@ -308,8 +242,6 @@ namespace Nikse.SubtitleEdit.Forms.Ocr private void ListBoxFileNamesSelectedIndexChanged(object sender, EventArgs e) { checkBoxItalic.Checked = _italics[listBoxFileNames.SelectedIndex]; - string name = listBoxFileNames.Items[listBoxFileNames.SelectedIndex].ToString(); - string databaseName = _directoryPath + "Images.db"; Bitmap bmp = null; labelExpandCount.Text = string.Empty; labelImageInfo.Text = string.Empty; @@ -326,19 +258,6 @@ namespace Nikse.SubtitleEdit.Forms.Ocr } } } - else if (File.Exists(databaseName)) - { - using (var f = new FileStream(databaseName, FileMode.Open)) - { - if (name.Contains(']')) - { - name = name.Substring(name.IndexOf(']') + 1).Trim(); - } - - f.Position = Convert.ToInt64(name); - bmp = new ManagedBitmap(f).ToOldBitmap(); - } - } if (bmp == null) { @@ -402,7 +321,6 @@ namespace Nikse.SubtitleEdit.Forms.Ocr return; } - string target = GetSelectedFileName(); string newText = textBoxText.Text; int oldTextItem = comboBoxTexts.SelectedIndex; int oldListBoxFileNamesIndex = listBoxFileNames.SelectedIndex; @@ -472,74 +390,6 @@ namespace Nikse.SubtitleEdit.Forms.Ocr } } listBoxFileNames.Focus(); - return; - } - - XmlNode node = _compareDoc.DocumentElement.SelectSingleNode("Item[.='" + target + "']"); - if (node != null) - { - node.Attributes["Text"].InnerText = newText; - - if (Additions != null && Additions.Count > 0) - { - foreach (var a in Additions) - { - if (target.StartsWith(a.Name, StringComparison.Ordinal)) - { - a.Text = newText; - a.Italic = checkBoxItalic.Checked; - break; - } - } - } - - if (checkBoxItalic.Checked) - { - if (node.Attributes["Italic"] == null) - { - XmlAttribute italic = node.OwnerDocument.CreateAttribute("Italic"); - italic.InnerText = "true"; - node.Attributes.Append(italic); - } - } - else - { - if (node.Attributes["Italic"] != null) - { - node.Attributes.RemoveNamedItem("Italic"); - } - } - - Refill(Additions); - if (Additions == null || Additions.Count == 0) - { - for (int i = 0; i < comboBoxTexts.Items.Count; i++) - { - if (comboBoxTexts.Items[i].ToString() == newText) - { - comboBoxTexts.SelectedIndex = i; - for (int j = 0; j < listBoxFileNames.Items.Count; j++) - { - if (GetFileName(j).StartsWith(target, StringComparison.Ordinal)) - { - listBoxFileNames.SelectedIndex = j; - } - } - return; - } - } - } - else - { - for (int i = 0; i < listBoxFileNames.Items.Count; i++) - { - if (listBoxFileNames.Items[i].ToString().Contains(target)) - { - listBoxFileNames.SelectedIndex = i; - return; - } - } - } } } @@ -551,7 +401,6 @@ namespace Nikse.SubtitleEdit.Forms.Ocr } int oldComboBoxIndex = comboBoxTexts.SelectedIndex; - string target = GetSelectedFileName(); if (_binOcrDb != null) { @@ -585,35 +434,6 @@ namespace Nikse.SubtitleEdit.Forms.Ocr { comboBoxTexts.SelectedIndex = oldComboBoxIndex; } - - return; - } - - XmlNode node = _compareDoc.DocumentElement.SelectSingleNode("Item[.='" + target + "']"); - if (node != null) - { - _compareDoc.DocumentElement.RemoveChild(node); - if (Additions != null && Additions.Count > 0) - { - for (int i = Additions.Count - 1; i >= 0; i--) - { - if (Additions[i].Name == target) - { - Additions.RemoveAt(i); - Refill(Additions); - break; - } - } - } - - Refill(Additions); - if (Additions == null || Additions.Count == 0) - { - if (oldComboBoxIndex < comboBoxTexts.Items.Count) - { - comboBoxTexts.SelectedIndex = oldComboBoxIndex; - } - } } } diff --git a/src/Forms/Ocr/VobSubNOcrCharacterInspect.Designer.cs b/src/Forms/Ocr/VobSubNOcrCharacterInspect.Designer.cs index e8f958aeb..82502c926 100644 --- a/src/Forms/Ocr/VobSubNOcrCharacterInspect.Designer.cs +++ b/src/Forms/Ocr/VobSubNOcrCharacterInspect.Designer.cs @@ -28,11 +28,15 @@ /// private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); this.buttonOK = new System.Windows.Forms.Button(); this.buttonCancel = new System.Windows.Forms.Button(); this.groupBoxInspectItems = new System.Windows.Forms.GroupBox(); + this.labelImageSize = new System.Windows.Forms.Label(); this.pictureBoxInspectItem = new System.Windows.Forms.PictureBox(); this.listBoxInspectItems = new System.Windows.Forms.ListBox(); + this.contextMenuStripAddBetterMultiMatch = new System.Windows.Forms.ContextMenuStrip(this.components); + this.addBetterMultiMatchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.groupBoxCurrentCompareImage = new System.Windows.Forms.GroupBox(); this.buttonEditDB = new System.Windows.Forms.Button(); this.buttonZoomOut = new System.Windows.Forms.Button(); @@ -45,11 +49,129 @@ this.buttonDelete = new System.Windows.Forms.Button(); this.buttonUpdate = new System.Windows.Forms.Button(); this.textBoxText = new System.Windows.Forms.TextBox(); - this.labelImageSize = new System.Windows.Forms.Label(); + this.contextMenuStripLetters = new System.Windows.Forms.ContextMenuStrip(this.components); + this.latinToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.àToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.àToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.éToolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); + this.éToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); + this.èToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.èToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.íToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.íToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ïToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.ïToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.óToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.óToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.òToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.òToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.úToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.úToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.üToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); + this.üToolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); + this.çToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.çToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.germanToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.äToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); + this.äToolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); + this.öToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); + this.öToolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); + this.üToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.üToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.ßToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.italianToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.àToolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem(); + this.àToolStripMenuItem5 = new System.Windows.Forms.ToolStripMenuItem(); + this.èToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); + this.èToolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); + this.éToolStripMenuItem6 = new System.Windows.Forms.ToolStripMenuItem(); + this.éToolStripMenuItem7 = new System.Windows.Forms.ToolStripMenuItem(); + this.ìToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ìToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.òToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); + this.òToolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); + this.ùToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ùToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.nordicToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.aeToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.AeToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); + this.øToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.øToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.åToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.åToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.äToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.äToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.öToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.öToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.polishToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ąToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ąToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.ćToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ćToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.ęToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ęToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.łToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.łToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.ńToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ńToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.óToolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem(); + this.óToolStripMenuItem5 = new System.Windows.Forms.ToolStripMenuItem(); + this.śToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.śToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.źToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.źToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.żToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.żToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.portugueseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ãToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ãToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.õToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.õToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.áToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); + this.áToolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); + this.éToolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem(); + this.éToolStripMenuItem5 = new System.Windows.Forms.ToolStripMenuItem(); + this.íToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); + this.íToolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); + this.óToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); + this.óToolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); + this.úToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); + this.úToolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); + this.âToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.âToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.êToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.êToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.ôToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.ôToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.àToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); + this.àToolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); + this.çToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); + this.çToolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); + this.spanishToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.áToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.áToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.éToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.éToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem6 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem7 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem8 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem9 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem10 = new System.Windows.Forms.ToolStripMenuItem(); + this.ñToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ñToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItemMusicSymbol1 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItemMusicSymbol2 = new System.Windows.Forms.ToolStripMenuItem(); this.groupBoxInspectItems.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxInspectItem)).BeginInit(); + this.contextMenuStripAddBetterMultiMatch.SuspendLayout(); this.groupBoxCurrentCompareImage.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxCharacter)).BeginInit(); + this.contextMenuStripLetters.SuspendLayout(); this.SuspendLayout(); // // buttonOK @@ -90,6 +212,15 @@ this.groupBoxInspectItems.TabStop = false; this.groupBoxInspectItems.Text = "Inspect items"; // + // labelImageSize + // + this.labelImageSize.AutoSize = true; + this.labelImageSize.Location = new System.Drawing.Point(252, 179); + this.labelImageSize.Name = "labelImageSize"; + this.labelImageSize.Size = new System.Drawing.Size(49, 13); + this.labelImageSize.TabIndex = 31; + this.labelImageSize.Text = "labelSize"; + // // pictureBoxInspectItem // this.pictureBoxInspectItem.BackColor = System.Drawing.Color.Red; @@ -103,6 +234,7 @@ // this.listBoxInspectItems.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left))); + this.listBoxInspectItems.ContextMenuStrip = this.contextMenuStripAddBetterMultiMatch; this.listBoxInspectItems.FormattingEnabled = true; this.listBoxInspectItems.Location = new System.Drawing.Point(6, 19); this.listBoxInspectItems.Name = "listBoxInspectItems"; @@ -110,6 +242,20 @@ this.listBoxInspectItems.TabIndex = 12; this.listBoxInspectItems.SelectedIndexChanged += new System.EventHandler(this.listBoxInspectItems_SelectedIndexChanged); // + // contextMenuStripAddBetterMultiMatch + // + this.contextMenuStripAddBetterMultiMatch.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.addBetterMultiMatchToolStripMenuItem}); + this.contextMenuStripAddBetterMultiMatch.Name = "contextMenuStripAddBetterMultiMatch"; + this.contextMenuStripAddBetterMultiMatch.Size = new System.Drawing.Size(199, 26); + // + // addBetterMultiMatchToolStripMenuItem + // + this.addBetterMultiMatchToolStripMenuItem.Name = "addBetterMultiMatchToolStripMenuItem"; + this.addBetterMultiMatchToolStripMenuItem.Size = new System.Drawing.Size(198, 22); + this.addBetterMultiMatchToolStripMenuItem.Text = "Add better multi match"; + this.addBetterMultiMatchToolStripMenuItem.Click += new System.EventHandler(this.addBetterMultiMatchToolStripMenuItem_Click); + // // groupBoxCurrentCompareImage // this.groupBoxCurrentCompareImage.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -237,20 +383,837 @@ // // textBoxText // + this.textBoxText.ContextMenuStrip = this.contextMenuStripLetters; this.textBoxText.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.textBoxText.Location = new System.Drawing.Point(14, 35); this.textBoxText.Name = "textBoxText"; this.textBoxText.Size = new System.Drawing.Size(100, 22); this.textBoxText.TabIndex = 1; // - // labelImageSize + // contextMenuStripLetters // - this.labelImageSize.AutoSize = true; - this.labelImageSize.Location = new System.Drawing.Point(252, 179); - this.labelImageSize.Name = "labelImageSize"; - this.labelImageSize.Size = new System.Drawing.Size(49, 13); - this.labelImageSize.TabIndex = 31; - this.labelImageSize.Text = "labelSize"; + this.contextMenuStripLetters.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.latinToolStripMenuItem, + this.germanToolStripMenuItem, + this.italianToolStripMenuItem, + this.nordicToolStripMenuItem, + this.polishToolStripMenuItem, + this.portugueseToolStripMenuItem, + this.spanishToolStripMenuItem, + this.toolStripMenuItemMusicSymbol1, + this.toolStripMenuItemMusicSymbol2}); + this.contextMenuStripLetters.Name = "contextMenuStripLetters"; + this.contextMenuStripLetters.Size = new System.Drawing.Size(135, 202); + // + // latinToolStripMenuItem + // + this.latinToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.àToolStripMenuItem1, + this.àToolStripMenuItem, + this.éToolStripMenuItem3, + this.éToolStripMenuItem2, + this.èToolStripMenuItem1, + this.èToolStripMenuItem, + this.íToolStripMenuItem1, + this.íToolStripMenuItem, + this.ïToolStripMenuItem1, + this.ïToolStripMenuItem, + this.óToolStripMenuItem1, + this.óToolStripMenuItem, + this.òToolStripMenuItem, + this.òToolStripMenuItem1, + this.úToolStripMenuItem1, + this.úToolStripMenuItem, + this.üToolStripMenuItem2, + this.üToolStripMenuItem3, + this.çToolStripMenuItem1, + this.çToolStripMenuItem}); + this.latinToolStripMenuItem.Name = "latinToolStripMenuItem"; + this.latinToolStripMenuItem.Size = new System.Drawing.Size(134, 22); + this.latinToolStripMenuItem.Text = "Catalan"; + // + // àToolStripMenuItem1 + // + this.àToolStripMenuItem1.Name = "àToolStripMenuItem1"; + this.àToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.àToolStripMenuItem1.Text = "à"; + // + // àToolStripMenuItem + // + this.àToolStripMenuItem.Name = "àToolStripMenuItem"; + this.àToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.àToolStripMenuItem.Text = "À"; + // + // éToolStripMenuItem3 + // + this.éToolStripMenuItem3.Name = "éToolStripMenuItem3"; + this.éToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); + this.éToolStripMenuItem3.Text = "é"; + // + // éToolStripMenuItem2 + // + this.éToolStripMenuItem2.Name = "éToolStripMenuItem2"; + this.éToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); + this.éToolStripMenuItem2.Text = "É"; + // + // èToolStripMenuItem1 + // + this.èToolStripMenuItem1.Name = "èToolStripMenuItem1"; + this.èToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.èToolStripMenuItem1.Text = "è"; + // + // èToolStripMenuItem + // + this.èToolStripMenuItem.Name = "èToolStripMenuItem"; + this.èToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.èToolStripMenuItem.Text = "È"; + // + // íToolStripMenuItem1 + // + this.íToolStripMenuItem1.Name = "íToolStripMenuItem1"; + this.íToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.íToolStripMenuItem1.Text = "í"; + // + // íToolStripMenuItem + // + this.íToolStripMenuItem.Name = "íToolStripMenuItem"; + this.íToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.íToolStripMenuItem.Text = "Í"; + // + // ïToolStripMenuItem1 + // + this.ïToolStripMenuItem1.Name = "ïToolStripMenuItem1"; + this.ïToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.ïToolStripMenuItem1.Text = "ï"; + // + // ïToolStripMenuItem + // + this.ïToolStripMenuItem.Name = "ïToolStripMenuItem"; + this.ïToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.ïToolStripMenuItem.Text = "Ï"; + // + // óToolStripMenuItem1 + // + this.óToolStripMenuItem1.Name = "óToolStripMenuItem1"; + this.óToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.óToolStripMenuItem1.Text = "ó"; + // + // óToolStripMenuItem + // + this.óToolStripMenuItem.Name = "óToolStripMenuItem"; + this.óToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.óToolStripMenuItem.Text = "Ó"; + // + // òToolStripMenuItem + // + this.òToolStripMenuItem.Name = "òToolStripMenuItem"; + this.òToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.òToolStripMenuItem.Text = "ò"; + // + // òToolStripMenuItem1 + // + this.òToolStripMenuItem1.Name = "òToolStripMenuItem1"; + this.òToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.òToolStripMenuItem1.Text = "Ò"; + // + // úToolStripMenuItem1 + // + this.úToolStripMenuItem1.Name = "úToolStripMenuItem1"; + this.úToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.úToolStripMenuItem1.Text = "ú"; + // + // úToolStripMenuItem + // + this.úToolStripMenuItem.Name = "úToolStripMenuItem"; + this.úToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.úToolStripMenuItem.Text = "Ú"; + // + // üToolStripMenuItem2 + // + this.üToolStripMenuItem2.Name = "üToolStripMenuItem2"; + this.üToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); + this.üToolStripMenuItem2.Text = "ü"; + // + // üToolStripMenuItem3 + // + this.üToolStripMenuItem3.Name = "üToolStripMenuItem3"; + this.üToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); + this.üToolStripMenuItem3.Text = "Ü"; + // + // çToolStripMenuItem1 + // + this.çToolStripMenuItem1.Name = "çToolStripMenuItem1"; + this.çToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.çToolStripMenuItem1.Text = "ç"; + // + // çToolStripMenuItem + // + this.çToolStripMenuItem.Name = "çToolStripMenuItem"; + this.çToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.çToolStripMenuItem.Text = "Ç"; + // + // germanToolStripMenuItem + // + this.germanToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.äToolStripMenuItem2, + this.äToolStripMenuItem3, + this.öToolStripMenuItem2, + this.öToolStripMenuItem3, + this.üToolStripMenuItem, + this.üToolStripMenuItem1, + this.ßToolStripMenuItem}); + this.germanToolStripMenuItem.Name = "germanToolStripMenuItem"; + this.germanToolStripMenuItem.Size = new System.Drawing.Size(134, 22); + this.germanToolStripMenuItem.Text = "German"; + // + // äToolStripMenuItem2 + // + this.äToolStripMenuItem2.Name = "äToolStripMenuItem2"; + this.äToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); + this.äToolStripMenuItem2.Text = "ä"; + // + // äToolStripMenuItem3 + // + this.äToolStripMenuItem3.Name = "äToolStripMenuItem3"; + this.äToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); + this.äToolStripMenuItem3.Text = "Ä"; + // + // öToolStripMenuItem2 + // + this.öToolStripMenuItem2.Name = "öToolStripMenuItem2"; + this.öToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); + this.öToolStripMenuItem2.Text = "ö"; + // + // öToolStripMenuItem3 + // + this.öToolStripMenuItem3.Name = "öToolStripMenuItem3"; + this.öToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); + this.öToolStripMenuItem3.Text = "Ö"; + // + // üToolStripMenuItem + // + this.üToolStripMenuItem.Name = "üToolStripMenuItem"; + this.üToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.üToolStripMenuItem.Text = "ü"; + // + // üToolStripMenuItem1 + // + this.üToolStripMenuItem1.Name = "üToolStripMenuItem1"; + this.üToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.üToolStripMenuItem1.Text = "Ü"; + // + // ßToolStripMenuItem + // + this.ßToolStripMenuItem.Name = "ßToolStripMenuItem"; + this.ßToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.ßToolStripMenuItem.Text = "ß"; + // + // italianToolStripMenuItem + // + this.italianToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.àToolStripMenuItem4, + this.àToolStripMenuItem5, + this.èToolStripMenuItem2, + this.èToolStripMenuItem3, + this.éToolStripMenuItem6, + this.éToolStripMenuItem7, + this.ìToolStripMenuItem, + this.ìToolStripMenuItem1, + this.òToolStripMenuItem2, + this.òToolStripMenuItem3, + this.ùToolStripMenuItem, + this.ùToolStripMenuItem1}); + this.italianToolStripMenuItem.Name = "italianToolStripMenuItem"; + this.italianToolStripMenuItem.Size = new System.Drawing.Size(134, 22); + this.italianToolStripMenuItem.Text = "Italian"; + // + // àToolStripMenuItem4 + // + this.àToolStripMenuItem4.Name = "àToolStripMenuItem4"; + this.àToolStripMenuItem4.Size = new System.Drawing.Size(83, 22); + this.àToolStripMenuItem4.Text = "à"; + // + // àToolStripMenuItem5 + // + this.àToolStripMenuItem5.Name = "àToolStripMenuItem5"; + this.àToolStripMenuItem5.Size = new System.Drawing.Size(83, 22); + this.àToolStripMenuItem5.Text = "À"; + // + // èToolStripMenuItem2 + // + this.èToolStripMenuItem2.Name = "èToolStripMenuItem2"; + this.èToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); + this.èToolStripMenuItem2.Text = "è"; + // + // èToolStripMenuItem3 + // + this.èToolStripMenuItem3.Name = "èToolStripMenuItem3"; + this.èToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); + this.èToolStripMenuItem3.Text = "È"; + // + // éToolStripMenuItem6 + // + this.éToolStripMenuItem6.Name = "éToolStripMenuItem6"; + this.éToolStripMenuItem6.Size = new System.Drawing.Size(83, 22); + this.éToolStripMenuItem6.Text = "é"; + // + // éToolStripMenuItem7 + // + this.éToolStripMenuItem7.Name = "éToolStripMenuItem7"; + this.éToolStripMenuItem7.Size = new System.Drawing.Size(83, 22); + this.éToolStripMenuItem7.Text = "É"; + // + // ìToolStripMenuItem + // + this.ìToolStripMenuItem.Name = "ìToolStripMenuItem"; + this.ìToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.ìToolStripMenuItem.Text = "ì"; + // + // ìToolStripMenuItem1 + // + this.ìToolStripMenuItem1.Name = "ìToolStripMenuItem1"; + this.ìToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.ìToolStripMenuItem1.Text = "Ì"; + // + // òToolStripMenuItem2 + // + this.òToolStripMenuItem2.Name = "òToolStripMenuItem2"; + this.òToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); + this.òToolStripMenuItem2.Text = "ò"; + // + // òToolStripMenuItem3 + // + this.òToolStripMenuItem3.Name = "òToolStripMenuItem3"; + this.òToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); + this.òToolStripMenuItem3.Text = "Ò"; + // + // ùToolStripMenuItem + // + this.ùToolStripMenuItem.Name = "ùToolStripMenuItem"; + this.ùToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.ùToolStripMenuItem.Text = "ù"; + // + // ùToolStripMenuItem1 + // + this.ùToolStripMenuItem1.Name = "ùToolStripMenuItem1"; + this.ùToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.ùToolStripMenuItem1.Text = "Ù"; + // + // nordicToolStripMenuItem + // + this.nordicToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.aeToolStripMenuItem1, + this.AeToolStripMenuItem2, + this.øToolStripMenuItem, + this.øToolStripMenuItem1, + this.åToolStripMenuItem, + this.åToolStripMenuItem1, + this.äToolStripMenuItem, + this.äToolStripMenuItem1, + this.öToolStripMenuItem, + this.öToolStripMenuItem1}); + this.nordicToolStripMenuItem.Name = "nordicToolStripMenuItem"; + this.nordicToolStripMenuItem.Size = new System.Drawing.Size(134, 22); + this.nordicToolStripMenuItem.Text = "Nordic"; + // + // aeToolStripMenuItem1 + // + this.aeToolStripMenuItem1.Name = "aeToolStripMenuItem1"; + this.aeToolStripMenuItem1.Size = new System.Drawing.Size(84, 22); + this.aeToolStripMenuItem1.Text = "æ"; + // + // AeToolStripMenuItem2 + // + this.AeToolStripMenuItem2.Name = "AeToolStripMenuItem2"; + this.AeToolStripMenuItem2.Size = new System.Drawing.Size(84, 22); + this.AeToolStripMenuItem2.Text = "Æ"; + // + // øToolStripMenuItem + // + this.øToolStripMenuItem.Name = "øToolStripMenuItem"; + this.øToolStripMenuItem.Size = new System.Drawing.Size(84, 22); + this.øToolStripMenuItem.Text = "ø"; + // + // øToolStripMenuItem1 + // + this.øToolStripMenuItem1.Name = "øToolStripMenuItem1"; + this.øToolStripMenuItem1.Size = new System.Drawing.Size(84, 22); + this.øToolStripMenuItem1.Text = "Ø"; + // + // åToolStripMenuItem + // + this.åToolStripMenuItem.Name = "åToolStripMenuItem"; + this.åToolStripMenuItem.Size = new System.Drawing.Size(84, 22); + this.åToolStripMenuItem.Text = "å"; + // + // åToolStripMenuItem1 + // + this.åToolStripMenuItem1.Name = "åToolStripMenuItem1"; + this.åToolStripMenuItem1.Size = new System.Drawing.Size(84, 22); + this.åToolStripMenuItem1.Text = "Å"; + // + // äToolStripMenuItem + // + this.äToolStripMenuItem.Name = "äToolStripMenuItem"; + this.äToolStripMenuItem.Size = new System.Drawing.Size(84, 22); + this.äToolStripMenuItem.Text = "ä"; + // + // äToolStripMenuItem1 + // + this.äToolStripMenuItem1.Name = "äToolStripMenuItem1"; + this.äToolStripMenuItem1.Size = new System.Drawing.Size(84, 22); + this.äToolStripMenuItem1.Text = "Ä"; + // + // öToolStripMenuItem + // + this.öToolStripMenuItem.Name = "öToolStripMenuItem"; + this.öToolStripMenuItem.Size = new System.Drawing.Size(84, 22); + this.öToolStripMenuItem.Text = "ö"; + // + // öToolStripMenuItem1 + // + this.öToolStripMenuItem1.Name = "öToolStripMenuItem1"; + this.öToolStripMenuItem1.Size = new System.Drawing.Size(84, 22); + this.öToolStripMenuItem1.Text = "Ö"; + // + // polishToolStripMenuItem + // + this.polishToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.ąToolStripMenuItem, + this.ąToolStripMenuItem1, + this.ćToolStripMenuItem, + this.ćToolStripMenuItem1, + this.ęToolStripMenuItem, + this.ęToolStripMenuItem1, + this.łToolStripMenuItem, + this.łToolStripMenuItem1, + this.ńToolStripMenuItem, + this.ńToolStripMenuItem1, + this.óToolStripMenuItem4, + this.óToolStripMenuItem5, + this.śToolStripMenuItem, + this.śToolStripMenuItem1, + this.źToolStripMenuItem, + this.źToolStripMenuItem1, + this.żToolStripMenuItem, + this.żToolStripMenuItem1}); + this.polishToolStripMenuItem.Name = "polishToolStripMenuItem"; + this.polishToolStripMenuItem.Size = new System.Drawing.Size(134, 22); + this.polishToolStripMenuItem.Text = "Polish"; + // + // ąToolStripMenuItem + // + this.ąToolStripMenuItem.Name = "ąToolStripMenuItem"; + this.ąToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.ąToolStripMenuItem.Text = "ą"; + // + // ąToolStripMenuItem1 + // + this.ąToolStripMenuItem1.Name = "ąToolStripMenuItem1"; + this.ąToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.ąToolStripMenuItem1.Text = "Ą"; + // + // ćToolStripMenuItem + // + this.ćToolStripMenuItem.Name = "ćToolStripMenuItem"; + this.ćToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.ćToolStripMenuItem.Text = "ć"; + // + // ćToolStripMenuItem1 + // + this.ćToolStripMenuItem1.Name = "ćToolStripMenuItem1"; + this.ćToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.ćToolStripMenuItem1.Text = "Ć"; + // + // ęToolStripMenuItem + // + this.ęToolStripMenuItem.Name = "ęToolStripMenuItem"; + this.ęToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.ęToolStripMenuItem.Text = "ę"; + // + // ęToolStripMenuItem1 + // + this.ęToolStripMenuItem1.Name = "ęToolStripMenuItem1"; + this.ęToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.ęToolStripMenuItem1.Text = "Ę"; + // + // łToolStripMenuItem + // + this.łToolStripMenuItem.Name = "łToolStripMenuItem"; + this.łToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.łToolStripMenuItem.Text = "ł"; + // + // łToolStripMenuItem1 + // + this.łToolStripMenuItem1.Name = "łToolStripMenuItem1"; + this.łToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.łToolStripMenuItem1.Text = "Ł"; + // + // ńToolStripMenuItem + // + this.ńToolStripMenuItem.Name = "ńToolStripMenuItem"; + this.ńToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.ńToolStripMenuItem.Text = "ń"; + // + // ńToolStripMenuItem1 + // + this.ńToolStripMenuItem1.Name = "ńToolStripMenuItem1"; + this.ńToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.ńToolStripMenuItem1.Text = "Ń"; + // + // óToolStripMenuItem4 + // + this.óToolStripMenuItem4.Name = "óToolStripMenuItem4"; + this.óToolStripMenuItem4.Size = new System.Drawing.Size(83, 22); + this.óToolStripMenuItem4.Text = "ó"; + // + // óToolStripMenuItem5 + // + this.óToolStripMenuItem5.Name = "óToolStripMenuItem5"; + this.óToolStripMenuItem5.Size = new System.Drawing.Size(83, 22); + this.óToolStripMenuItem5.Text = "Ó"; + // + // śToolStripMenuItem + // + this.śToolStripMenuItem.Name = "śToolStripMenuItem"; + this.śToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.śToolStripMenuItem.Text = "ś"; + // + // śToolStripMenuItem1 + // + this.śToolStripMenuItem1.Name = "śToolStripMenuItem1"; + this.śToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.śToolStripMenuItem1.Text = "Ś"; + // + // źToolStripMenuItem + // + this.źToolStripMenuItem.Name = "źToolStripMenuItem"; + this.źToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.źToolStripMenuItem.Text = "ź"; + // + // źToolStripMenuItem1 + // + this.źToolStripMenuItem1.Name = "źToolStripMenuItem1"; + this.źToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.źToolStripMenuItem1.Text = "Ź"; + // + // żToolStripMenuItem + // + this.żToolStripMenuItem.Name = "żToolStripMenuItem"; + this.żToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.żToolStripMenuItem.Text = "ż"; + // + // żToolStripMenuItem1 + // + this.żToolStripMenuItem1.Name = "żToolStripMenuItem1"; + this.żToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.żToolStripMenuItem1.Text = "Ż"; + // + // portugueseToolStripMenuItem + // + this.portugueseToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.ãToolStripMenuItem, + this.ãToolStripMenuItem1, + this.õToolStripMenuItem, + this.õToolStripMenuItem1, + this.áToolStripMenuItem2, + this.áToolStripMenuItem3, + this.éToolStripMenuItem4, + this.éToolStripMenuItem5, + this.íToolStripMenuItem2, + this.íToolStripMenuItem3, + this.óToolStripMenuItem2, + this.óToolStripMenuItem3, + this.úToolStripMenuItem2, + this.úToolStripMenuItem3, + this.âToolStripMenuItem, + this.âToolStripMenuItem1, + this.êToolStripMenuItem, + this.êToolStripMenuItem1, + this.ôToolStripMenuItem1, + this.ôToolStripMenuItem, + this.àToolStripMenuItem2, + this.àToolStripMenuItem3, + this.çToolStripMenuItem2, + this.çToolStripMenuItem3}); + this.portugueseToolStripMenuItem.Name = "portugueseToolStripMenuItem"; + this.portugueseToolStripMenuItem.Size = new System.Drawing.Size(134, 22); + this.portugueseToolStripMenuItem.Text = "Portuguese"; + // + // ãToolStripMenuItem + // + this.ãToolStripMenuItem.Name = "ãToolStripMenuItem"; + this.ãToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.ãToolStripMenuItem.Text = "ã"; + // + // ãToolStripMenuItem1 + // + this.ãToolStripMenuItem1.Name = "ãToolStripMenuItem1"; + this.ãToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.ãToolStripMenuItem1.Text = "Ã"; + // + // õToolStripMenuItem + // + this.õToolStripMenuItem.Name = "õToolStripMenuItem"; + this.õToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.õToolStripMenuItem.Text = "õ"; + // + // õToolStripMenuItem1 + // + this.õToolStripMenuItem1.Name = "õToolStripMenuItem1"; + this.õToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.õToolStripMenuItem1.Text = "Õ"; + // + // áToolStripMenuItem2 + // + this.áToolStripMenuItem2.Name = "áToolStripMenuItem2"; + this.áToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); + this.áToolStripMenuItem2.Text = "á"; + // + // áToolStripMenuItem3 + // + this.áToolStripMenuItem3.Name = "áToolStripMenuItem3"; + this.áToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); + this.áToolStripMenuItem3.Text = "Á"; + // + // éToolStripMenuItem4 + // + this.éToolStripMenuItem4.Name = "éToolStripMenuItem4"; + this.éToolStripMenuItem4.Size = new System.Drawing.Size(83, 22); + this.éToolStripMenuItem4.Text = "é"; + // + // éToolStripMenuItem5 + // + this.éToolStripMenuItem5.Name = "éToolStripMenuItem5"; + this.éToolStripMenuItem5.Size = new System.Drawing.Size(83, 22); + this.éToolStripMenuItem5.Text = "É"; + // + // íToolStripMenuItem2 + // + this.íToolStripMenuItem2.Name = "íToolStripMenuItem2"; + this.íToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); + this.íToolStripMenuItem2.Text = "í"; + // + // íToolStripMenuItem3 + // + this.íToolStripMenuItem3.Name = "íToolStripMenuItem3"; + this.íToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); + this.íToolStripMenuItem3.Text = "Í"; + // + // óToolStripMenuItem2 + // + this.óToolStripMenuItem2.Name = "óToolStripMenuItem2"; + this.óToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); + this.óToolStripMenuItem2.Text = "ó"; + // + // óToolStripMenuItem3 + // + this.óToolStripMenuItem3.Name = "óToolStripMenuItem3"; + this.óToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); + this.óToolStripMenuItem3.Text = "Ó"; + // + // úToolStripMenuItem2 + // + this.úToolStripMenuItem2.Name = "úToolStripMenuItem2"; + this.úToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); + this.úToolStripMenuItem2.Text = "ú"; + // + // úToolStripMenuItem3 + // + this.úToolStripMenuItem3.Name = "úToolStripMenuItem3"; + this.úToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); + this.úToolStripMenuItem3.Text = "Ú"; + // + // âToolStripMenuItem + // + this.âToolStripMenuItem.Name = "âToolStripMenuItem"; + this.âToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.âToolStripMenuItem.Text = "â"; + // + // âToolStripMenuItem1 + // + this.âToolStripMenuItem1.Name = "âToolStripMenuItem1"; + this.âToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.âToolStripMenuItem1.Text = "Â"; + // + // êToolStripMenuItem + // + this.êToolStripMenuItem.Name = "êToolStripMenuItem"; + this.êToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.êToolStripMenuItem.Text = "ê"; + // + // êToolStripMenuItem1 + // + this.êToolStripMenuItem1.Name = "êToolStripMenuItem1"; + this.êToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.êToolStripMenuItem1.Text = "Ê"; + // + // ôToolStripMenuItem1 + // + this.ôToolStripMenuItem1.Name = "ôToolStripMenuItem1"; + this.ôToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.ôToolStripMenuItem1.Text = "ô"; + // + // ôToolStripMenuItem + // + this.ôToolStripMenuItem.Name = "ôToolStripMenuItem"; + this.ôToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.ôToolStripMenuItem.Text = "Ô"; + // + // àToolStripMenuItem2 + // + this.àToolStripMenuItem2.Name = "àToolStripMenuItem2"; + this.àToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); + this.àToolStripMenuItem2.Text = "à"; + // + // àToolStripMenuItem3 + // + this.àToolStripMenuItem3.Name = "àToolStripMenuItem3"; + this.àToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); + this.àToolStripMenuItem3.Text = "À"; + // + // çToolStripMenuItem2 + // + this.çToolStripMenuItem2.Name = "çToolStripMenuItem2"; + this.çToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); + this.çToolStripMenuItem2.Text = "ç"; + // + // çToolStripMenuItem3 + // + this.çToolStripMenuItem3.Name = "çToolStripMenuItem3"; + this.çToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); + this.çToolStripMenuItem3.Text = "Ç"; + // + // spanishToolStripMenuItem + // + this.spanishToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.áToolStripMenuItem, + this.áToolStripMenuItem1, + this.éToolStripMenuItem, + this.éToolStripMenuItem1, + this.toolStripMenuItem1, + this.toolStripMenuItem6, + this.toolStripMenuItem4, + this.toolStripMenuItem7, + this.toolStripMenuItem5, + this.toolStripMenuItem8, + this.toolStripMenuItem9, + this.toolStripMenuItem10, + this.ñToolStripMenuItem, + this.ñToolStripMenuItem1, + this.toolStripMenuItem2, + this.toolStripMenuItem3}); + this.spanishToolStripMenuItem.Name = "spanishToolStripMenuItem"; + this.spanishToolStripMenuItem.Size = new System.Drawing.Size(134, 22); + this.spanishToolStripMenuItem.Text = "Spanish"; + // + // áToolStripMenuItem + // + this.áToolStripMenuItem.Name = "áToolStripMenuItem"; + this.áToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.áToolStripMenuItem.Text = "á"; + // + // áToolStripMenuItem1 + // + this.áToolStripMenuItem1.Name = "áToolStripMenuItem1"; + this.áToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.áToolStripMenuItem1.Text = "Á"; + // + // éToolStripMenuItem + // + this.éToolStripMenuItem.Name = "éToolStripMenuItem"; + this.éToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.éToolStripMenuItem.Text = "é"; + // + // éToolStripMenuItem1 + // + this.éToolStripMenuItem1.Name = "éToolStripMenuItem1"; + this.éToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.éToolStripMenuItem1.Text = "É"; + // + // toolStripMenuItem1 + // + this.toolStripMenuItem1.Name = "toolStripMenuItem1"; + this.toolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.toolStripMenuItem1.Text = "í"; + // + // toolStripMenuItem6 + // + this.toolStripMenuItem6.Name = "toolStripMenuItem6"; + this.toolStripMenuItem6.Size = new System.Drawing.Size(83, 22); + this.toolStripMenuItem6.Text = "Í"; + // + // toolStripMenuItem4 + // + this.toolStripMenuItem4.Name = "toolStripMenuItem4"; + this.toolStripMenuItem4.Size = new System.Drawing.Size(83, 22); + this.toolStripMenuItem4.Text = "ó"; + // + // toolStripMenuItem7 + // + this.toolStripMenuItem7.Name = "toolStripMenuItem7"; + this.toolStripMenuItem7.Size = new System.Drawing.Size(83, 22); + this.toolStripMenuItem7.Text = "Ó"; + // + // toolStripMenuItem5 + // + this.toolStripMenuItem5.Name = "toolStripMenuItem5"; + this.toolStripMenuItem5.Size = new System.Drawing.Size(83, 22); + this.toolStripMenuItem5.Text = "ú"; + // + // toolStripMenuItem8 + // + this.toolStripMenuItem8.Name = "toolStripMenuItem8"; + this.toolStripMenuItem8.Size = new System.Drawing.Size(83, 22); + this.toolStripMenuItem8.Text = "Ú"; + // + // toolStripMenuItem9 + // + this.toolStripMenuItem9.Name = "toolStripMenuItem9"; + this.toolStripMenuItem9.Size = new System.Drawing.Size(83, 22); + this.toolStripMenuItem9.Text = "ü"; + // + // toolStripMenuItem10 + // + this.toolStripMenuItem10.Name = "toolStripMenuItem10"; + this.toolStripMenuItem10.Size = new System.Drawing.Size(83, 22); + this.toolStripMenuItem10.Text = "Ü"; + // + // ñToolStripMenuItem + // + this.ñToolStripMenuItem.Name = "ñToolStripMenuItem"; + this.ñToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.ñToolStripMenuItem.Text = "ñ"; + // + // ñToolStripMenuItem1 + // + this.ñToolStripMenuItem1.Name = "ñToolStripMenuItem1"; + this.ñToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.ñToolStripMenuItem1.Text = "Ñ"; + // + // toolStripMenuItem2 + // + this.toolStripMenuItem2.Name = "toolStripMenuItem2"; + this.toolStripMenuItem2.Size = new System.Drawing.Size(83, 22); + this.toolStripMenuItem2.Text = "¿"; + // + // toolStripMenuItem3 + // + this.toolStripMenuItem3.Name = "toolStripMenuItem3"; + this.toolStripMenuItem3.Size = new System.Drawing.Size(83, 22); + this.toolStripMenuItem3.Text = "¡"; + // + // toolStripMenuItemMusicSymbol1 + // + this.toolStripMenuItemMusicSymbol1.Name = "toolStripMenuItemMusicSymbol1"; + this.toolStripMenuItemMusicSymbol1.Size = new System.Drawing.Size(134, 22); + this.toolStripMenuItemMusicSymbol1.Text = "♪"; + // + // toolStripMenuItemMusicSymbol2 + // + this.toolStripMenuItemMusicSymbol2.Name = "toolStripMenuItemMusicSymbol2"; + this.toolStripMenuItemMusicSymbol2.Size = new System.Drawing.Size(134, 22); + this.toolStripMenuItemMusicSymbol2.Text = "♫"; // // VobSubNOcrCharacterInspect // @@ -267,14 +1230,16 @@ this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "VobSubNOcrCharacterInspect"; + this.Text = "nOCR character inspect"; this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.VobSubNOcrCharacterInspect_KeyDown); this.groupBoxInspectItems.ResumeLayout(false); this.groupBoxInspectItems.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxInspectItem)).EndInit(); + this.contextMenuStripAddBetterMultiMatch.ResumeLayout(false); this.groupBoxCurrentCompareImage.ResumeLayout(false); this.groupBoxCurrentCompareImage.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxCharacter)).EndInit(); + this.contextMenuStripLetters.ResumeLayout(false); this.ResumeLayout(false); } @@ -299,5 +1264,124 @@ private System.Windows.Forms.PictureBox pictureBoxCharacter; private System.Windows.Forms.Button buttonEditDB; private System.Windows.Forms.Label labelImageSize; + private System.Windows.Forms.ContextMenuStrip contextMenuStripAddBetterMultiMatch; + private System.Windows.Forms.ToolStripMenuItem addBetterMultiMatchToolStripMenuItem; + private System.Windows.Forms.ContextMenuStrip contextMenuStripLetters; + private System.Windows.Forms.ToolStripMenuItem latinToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem àToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem àToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem éToolStripMenuItem3; + private System.Windows.Forms.ToolStripMenuItem éToolStripMenuItem2; + private System.Windows.Forms.ToolStripMenuItem èToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem èToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem íToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem íToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ïToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem ïToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem óToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem óToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem òToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem òToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem úToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem úToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem üToolStripMenuItem2; + private System.Windows.Forms.ToolStripMenuItem üToolStripMenuItem3; + private System.Windows.Forms.ToolStripMenuItem çToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem çToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem germanToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem äToolStripMenuItem2; + private System.Windows.Forms.ToolStripMenuItem äToolStripMenuItem3; + private System.Windows.Forms.ToolStripMenuItem öToolStripMenuItem2; + private System.Windows.Forms.ToolStripMenuItem öToolStripMenuItem3; + private System.Windows.Forms.ToolStripMenuItem üToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem üToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem ßToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem italianToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem àToolStripMenuItem4; + private System.Windows.Forms.ToolStripMenuItem àToolStripMenuItem5; + private System.Windows.Forms.ToolStripMenuItem èToolStripMenuItem2; + private System.Windows.Forms.ToolStripMenuItem èToolStripMenuItem3; + private System.Windows.Forms.ToolStripMenuItem éToolStripMenuItem6; + private System.Windows.Forms.ToolStripMenuItem éToolStripMenuItem7; + private System.Windows.Forms.ToolStripMenuItem ìToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ìToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem òToolStripMenuItem2; + private System.Windows.Forms.ToolStripMenuItem òToolStripMenuItem3; + private System.Windows.Forms.ToolStripMenuItem ùToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ùToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem nordicToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem aeToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem AeToolStripMenuItem2; + private System.Windows.Forms.ToolStripMenuItem øToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem øToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem åToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem åToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem äToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem äToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem öToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem öToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem polishToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ąToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ąToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem ćToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ćToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem ęToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ęToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem łToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem łToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem ńToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ńToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem óToolStripMenuItem4; + private System.Windows.Forms.ToolStripMenuItem óToolStripMenuItem5; + private System.Windows.Forms.ToolStripMenuItem śToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem śToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem źToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem źToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem żToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem żToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem portugueseToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ãToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ãToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem õToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem õToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem áToolStripMenuItem2; + private System.Windows.Forms.ToolStripMenuItem áToolStripMenuItem3; + private System.Windows.Forms.ToolStripMenuItem éToolStripMenuItem4; + private System.Windows.Forms.ToolStripMenuItem éToolStripMenuItem5; + private System.Windows.Forms.ToolStripMenuItem íToolStripMenuItem2; + private System.Windows.Forms.ToolStripMenuItem íToolStripMenuItem3; + private System.Windows.Forms.ToolStripMenuItem óToolStripMenuItem2; + private System.Windows.Forms.ToolStripMenuItem óToolStripMenuItem3; + private System.Windows.Forms.ToolStripMenuItem úToolStripMenuItem2; + private System.Windows.Forms.ToolStripMenuItem úToolStripMenuItem3; + private System.Windows.Forms.ToolStripMenuItem âToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem âToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem êToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem êToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem ôToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem ôToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem àToolStripMenuItem2; + private System.Windows.Forms.ToolStripMenuItem àToolStripMenuItem3; + private System.Windows.Forms.ToolStripMenuItem çToolStripMenuItem2; + private System.Windows.Forms.ToolStripMenuItem çToolStripMenuItem3; + private System.Windows.Forms.ToolStripMenuItem spanishToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem áToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem áToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem éToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem éToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem6; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem4; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem7; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem5; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem8; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem9; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem10; + private System.Windows.Forms.ToolStripMenuItem ñToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ñToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemMusicSymbol1; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemMusicSymbol2; } } \ No newline at end of file diff --git a/src/Forms/Ocr/VobSubNOcrCharacterInspect.cs b/src/Forms/Ocr/VobSubNOcrCharacterInspect.cs index 142ce3ca4..ed7337c1f 100644 --- a/src/Forms/Ocr/VobSubNOcrCharacterInspect.cs +++ b/src/Forms/Ocr/VobSubNOcrCharacterInspect.cs @@ -14,6 +14,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr private List _matchList; private List _nocrChars; private NOcrChar _nocrChar; + private NOcrDb _nocrDb; private VobSubOcr _vobSubOcr; private Bitmap _bitmap; private Bitmap _bitmap2; @@ -25,6 +26,32 @@ namespace Nikse.SubtitleEdit.Forms.Ocr InitializeComponent(); UiUtil.FixFonts(this); labelImageSize.Text = string.Empty; + + foreach (ToolStripItem toolStripItem in contextMenuStripLetters.Items) + { + if (toolStripItem is ToolStripDropDownItem i && i.HasDropDownItems) + { + foreach (ToolStripItem item in i.DropDownItems) + { + item.Click += InsertLanguageCharacter; + } + } + else + { + toolStripItem.Click += InsertLanguageCharacter; + } + } + } + + private void InsertLanguageCharacter(object sender, EventArgs e) + { + if (sender is ToolStripMenuItem toolStripMenuItem) + { + var start = textBoxText.SelectionStart; + textBoxText.SelectedText = toolStripMenuItem.Text; + textBoxText.SelectionLength = 0; + textBoxText.SelectionStart = start + toolStripMenuItem.Text.Length; + } } private void VobSubNOcrCharacterInspect_KeyDown(object sender, KeyEventArgs e) @@ -43,6 +70,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr bitmap = nbmp.GetBitmap(); _bitmap2 = bitmap; _nocrChars = nOcrDb.OcrCharacters; + _nocrDb = nOcrDb; _matchList = new List(); _vobSubOcr = vobSubOcr; @@ -309,8 +337,21 @@ namespace Nikse.SubtitleEdit.Forms.Ocr private void buttonEditDB_Click(object sender, EventArgs e) { - var form = new VobSubNOcrEdit(_nocrChars, pictureBoxInspectItem.Image as Bitmap, null); + var form = new VobSubNOcrEdit(_nocrDb, pictureBoxInspectItem.Image as Bitmap, null); form.ShowDialog(this); } + + private void addBetterMultiMatchToolStripMenuItem_Click(object sender, EventArgs e) + { + using (var form = new AddBetterMultiMatchNOcr()) + { + // form.Initialize(listBoxInspectItems.SelectedIndex, _matches, _splitterItems); + if (form.ShowDialog(this) == DialogResult.OK) + { + //_binOcrDb.Add(form.ExpandedMatch); + DialogResult = DialogResult.OK; + } + } + } } } diff --git a/src/Forms/Ocr/VobSubNOcrCharacterInspect.resx b/src/Forms/Ocr/VobSubNOcrCharacterInspect.resx index 1af7de150..9a893c9dd 100644 --- a/src/Forms/Ocr/VobSubNOcrCharacterInspect.resx +++ b/src/Forms/Ocr/VobSubNOcrCharacterInspect.resx @@ -117,4 +117,10 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17, 17 + + + 202, 17 + \ No newline at end of file diff --git a/src/Forms/Ocr/VobSubNOcrEdit.Designer.cs b/src/Forms/Ocr/VobSubNOcrEdit.Designer.cs index ee1364daa..47b7b3884 100644 --- a/src/Forms/Ocr/VobSubNOcrEdit.Designer.cs +++ b/src/Forms/Ocr/VobSubNOcrEdit.Designer.cs @@ -191,6 +191,7 @@ this.listBoxlinesBackground.Size = new System.Drawing.Size(151, 95); this.listBoxlinesBackground.TabIndex = 40; this.listBoxlinesBackground.SelectedIndexChanged += new System.EventHandler(this.listBoxlinesBackground_SelectedIndexChanged); + this.listBoxlinesBackground.KeyDown += new System.Windows.Forms.KeyEventHandler(this.listBoxlinesBackground_KeyDown); // // contextMenuStripLinesBackground // @@ -224,6 +225,7 @@ this.listBoxLinesForeground.Size = new System.Drawing.Size(151, 95); this.listBoxLinesForeground.TabIndex = 38; this.listBoxLinesForeground.SelectedIndexChanged += new System.EventHandler(this.listBoxLinesForeground_SelectedIndexChanged); + this.listBoxLinesForeground.KeyDown += new System.Windows.Forms.KeyEventHandler(this.listBoxLinesForeground_KeyDown); // // contextMenuLinesForeground // @@ -387,7 +389,7 @@ this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "VobSubNOcrEdit"; + this.Text = "nOCR DB"; this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.VobSubNOcrEdit_KeyDown); this.groupBoxCurrentCompareImage.ResumeLayout(false); this.groupBoxCurrentCompareImage.PerformLayout(); diff --git a/src/Forms/Ocr/VobSubNOcrEdit.cs b/src/Forms/Ocr/VobSubNOcrEdit.cs index 04502e4b0..10c3dd435 100644 --- a/src/Forms/Ocr/VobSubNOcrEdit.cs +++ b/src/Forms/Ocr/VobSubNOcrEdit.cs @@ -24,13 +24,13 @@ namespace Nikse.SubtitleEdit.Forms.Ocr private int _historyIndex = -1; public bool Changed { get; private set; } - public VobSubNOcrEdit(List nocrChars, Bitmap bitmap, string fileName) + public VobSubNOcrEdit(NOcrDb nOcrDb, Bitmap bitmap, string fileName) { UiUtil.PreInitialize(this); InitializeComponent(); UiUtil.FixFonts(this); - _nocrChars = nocrChars; + _nocrChars = nOcrDb.OcrCharacters; _bitmap = bitmap; FillComboBox(); @@ -41,7 +41,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr SizePictureBox(); } - labelInfo.Text = $"{nocrChars.Count:#,###,##0} elements in database"; + labelInfo.Text = $"{_nocrChars.Count:#,###,##0} elements in database"; labelNOcrCharInfo.Text = string.Empty; if (!string.IsNullOrEmpty(fileName)) { @@ -575,5 +575,22 @@ namespace Nikse.SubtitleEdit.Forms.Ocr } } + private void listBoxLinesForeground_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Delete) + { + e.SuppressKeyPress = true; + removeForegroundToolStripMenuItem_Click(null, null); + } + } + + private void listBoxlinesBackground_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Delete) + { + e.SuppressKeyPress = true; + removeBackToolStripMenuItem_Click(null, null); + } + } } } diff --git a/src/Forms/Ocr/VobSubNOcrTrain.cs b/src/Forms/Ocr/VobSubNOcrTrain.cs index e769f7364..9fae1c4d4 100644 --- a/src/Forms/Ocr/VobSubNOcrTrain.cs +++ b/src/Forms/Ocr/VobSubNOcrTrain.cs @@ -64,7 +64,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr private void buttonTrain_Click(object sender, EventArgs e) { - if (buttonTrain.Text == "Abort") + if (buttonTrain.Text == Configuration.Settings.Language.SpellCheck.Abort) { _abort = true; return; @@ -76,7 +76,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr } _abort = false; - buttonTrain.Text = "Abort"; + buttonTrain.Text = Configuration.Settings.Language.SpellCheck.Abort; buttonOK.Enabled = false; int numberOfCharactersLeaned = 0; @@ -155,14 +155,14 @@ namespace Nikse.SubtitleEdit.Forms.Ocr private void TrainLetter(ref int numberOfCharactersLeaned, ref int numberOfCharactersSkipped, NOcrDb nOcrD, List charactersLearned, string s, bool bold) { Bitmap bmp = GenerateImageFromTextWithStyle("H " + s, bold); - var nbmp = new NikseBitmap(bmp); - nbmp.MakeTwoColor(280); - nbmp.CropTop(0, Color.FromArgb(0, 0, 0, 0)); - var list = NikseBitmapImageSplitter.SplitBitmapToLettersNew(nbmp, 10, false, false, 25); + var nikseBitmap = new NikseBitmap(bmp); + nikseBitmap.MakeTwoColor(280); + nikseBitmap.CropTop(0, Color.FromArgb(0, 0, 0, 0)); + var list = NikseBitmapImageSplitter.SplitBitmapToLettersNew(nikseBitmap, 10, false, false, 25); if (list.Count == 3) { var item = list[2]; - NOcrChar match = nOcrD.GetMatch(item.NikseBitmap, item.Top, false, false, 0); + var match = nOcrD.GetMatch(item.NikseBitmap, item.Top, false, false, 0, 25); if (match == null || match.Text != s) { labelInfo.Refresh(); @@ -186,6 +186,57 @@ namespace Nikse.SubtitleEdit.Forms.Ocr numberOfCharactersSkipped++; } } + else + { + + if (list.Count == 4) + { + // e.g. quote (") + var expandItem = VobSubOcr.GetExpandedSelectionNew(nikseBitmap, new List { list[2], list[3] }); + var match = nOcrD.GetMatchExpanded(nikseBitmap, expandItem); + if (match != null && match.Text == s) + { + numberOfCharactersSkipped++; + return; + } + + var nOcrChar = new NOcrChar(s) + { + Width = expandItem.NikseBitmap.Width, + Height = expandItem.NikseBitmap.Height, + MarginTop = expandItem.Top, + ExpandCount = 2, + }; + VobSubOcrNOcrCharacter.GenerateLineSegments((int)numericUpDownSegmentsPerCharacter.Value + 5, checkBoxVeryAccurate.Checked, nOcrChar, expandItem.NikseBitmap); + nOcrD.Add(nOcrChar); + return; + } + + if (list.Count == 5) + { + // e.g. "%" + var expandItem = VobSubOcr.GetExpandedSelectionNew(nikseBitmap, new List { list[2], list[3], list[4] }); + var match = nOcrD.GetMatchExpanded(nikseBitmap, expandItem); + if (match != null && match.Text == s) + { + numberOfCharactersSkipped++; + return; + } + + var nOcrChar = new NOcrChar(s) + { + Width = expandItem.NikseBitmap.Width, + Height = expandItem.NikseBitmap.Height, + MarginTop = expandItem.Top, + ExpandCount = 3, + }; + nOcrD.Add(nOcrChar); + VobSubOcrNOcrCharacter.GenerateLineSegments((int)numericUpDownSegmentsPerCharacter.Value + 10, checkBoxVeryAccurate.Checked, nOcrChar, expandItem.NikseBitmap); + return; + } + + numberOfCharactersSkipped++; + } } private Bitmap GenerateImageFromTextWithStyle(string text, bool bold) diff --git a/src/Forms/Ocr/VobSubOcr.Designer.cs b/src/Forms/Ocr/VobSubOcr.Designer.cs index 25f2a1e72..953cd2db4 100644 --- a/src/Forms/Ocr/VobSubOcr.Designer.cs +++ b/src/Forms/Ocr/VobSubOcr.Designer.cs @@ -51,28 +51,17 @@ namespace Nikse.SubtitleEdit.Forms.Ocr this.buttonCancel = new System.Windows.Forms.Button(); this.groupBoxOcrMethod = new System.Windows.Forms.GroupBox(); this.comboBoxOcrMethod = new System.Windows.Forms.ComboBox(); - this.groupBoxNOCR = new System.Windows.Forms.GroupBox(); - this.buttonLineOcrEditLanguage = new System.Windows.Forms.Button(); - this.buttonLineOcrNewLanguage = new System.Windows.Forms.Button(); - this.label2 = new System.Windows.Forms.Label(); - this.comboBoxNOcrLanguage = new System.Windows.Forms.ComboBox(); - this.checkBoxNOcrItalic = new System.Windows.Forms.CheckBox(); - this.checkBoxNOcrCorrect = new System.Windows.Forms.CheckBox(); - this.checkBoxRightToLeftNOCR = new System.Windows.Forms.CheckBox(); - this.numericUpDownNumberOfPixelsIsSpaceNOCR = new System.Windows.Forms.NumericUpDown(); - this.labelNumberOfPixelsIsSpaceNOCR = new System.Windows.Forms.Label(); this.groupBoxImageCompareMethod = new System.Windows.Forms.GroupBox(); + this.buttonChooseEditBinaryImageCompareDb = new System.Windows.Forms.Button(); this.labelMinLineSplitHeight = new System.Windows.Forms.Label(); this.comboBoxLineSplitMinLineHeight = new System.Windows.Forms.ComboBox(); this.labelMaxErrorPercent = new System.Windows.Forms.Label(); this.numericUpDownMaxErrorPct = new System.Windows.Forms.NumericUpDown(); this.checkBoxRightToLeft = new System.Windows.Forms.CheckBox(); this.numericUpDownPixelsIsSpace = new System.Windows.Forms.NumericUpDown(); - this.buttonEditCharacterDatabase = new System.Windows.Forms.Button(); this.labelNoOfPixelsIsSpace = new System.Windows.Forms.Label(); this.comboBoxCharacterDatabase = new System.Windows.Forms.ComboBox(); this.labelImageDatabase = new System.Windows.Forms.Label(); - this.buttonNewCharacterDatabase = new System.Windows.Forms.Button(); this.GroupBoxTesseractMethod = new System.Windows.Forms.GroupBox(); this.checkBoxTesseractFallback = new System.Windows.Forms.CheckBox(); this.labelTesseractEngineMode = new System.Windows.Forms.Label(); @@ -85,6 +74,18 @@ namespace Nikse.SubtitleEdit.Forms.Ocr this.groupBoxModiMethod = new System.Windows.Forms.GroupBox(); this.label1 = new System.Windows.Forms.Label(); this.comboBoxModiLanguage = new System.Windows.Forms.ComboBox(); + this.groupBoxNOCR = new System.Windows.Forms.GroupBox(); + this.numericUpDownNOcrMaxWrongPixels = new System.Windows.Forms.NumericUpDown(); + this.labelNOcrMaxWrongPixels = new System.Windows.Forms.Label(); + this.buttonLineOcrEditLanguage = new System.Windows.Forms.Button(); + this.buttonLineOcrNewLanguage = new System.Windows.Forms.Button(); + this.label2 = new System.Windows.Forms.Label(); + this.comboBoxNOcrLanguage = new System.Windows.Forms.ComboBox(); + this.checkBoxNOcrItalic = new System.Windows.Forms.CheckBox(); + this.checkBoxNOcrCorrect = new System.Windows.Forms.CheckBox(); + this.checkBoxRightToLeftNOCR = new System.Windows.Forms.CheckBox(); + this.numericUpDownNumberOfPixelsIsSpaceNOCR = new System.Windows.Forms.NumericUpDown(); + this.labelNumberOfPixelsIsSpaceNOCR = new System.Windows.Forms.Label(); this.groupBoxOCRControls = new System.Windows.Forms.GroupBox(); this.labelStartFrom = new System.Windows.Forms.Label(); this.numericUpDownStartNumber = new System.Windows.Forms.NumericUpDown(); @@ -153,13 +154,14 @@ namespace Nikse.SubtitleEdit.Forms.Ocr this.timerHideStatus = new System.Windows.Forms.Timer(this.components); this.contextMenuStripListview.SuspendLayout(); this.groupBoxOcrMethod.SuspendLayout(); - this.groupBoxNOCR.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownNumberOfPixelsIsSpaceNOCR)).BeginInit(); this.groupBoxImageCompareMethod.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMaxErrorPct)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownPixelsIsSpace)).BeginInit(); this.GroupBoxTesseractMethod.SuspendLayout(); this.groupBoxModiMethod.SuspendLayout(); + this.groupBoxNOCR.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownNOcrMaxWrongPixels)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownNumberOfPixelsIsSpaceNOCR)).BeginInit(); this.groupBoxOCRControls.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownStartNumber)).BeginInit(); this.groupBoxOcrAutoFix.SuspendLayout(); @@ -466,137 +468,18 @@ namespace Nikse.SubtitleEdit.Forms.Ocr this.comboBoxOcrMethod.TabIndex = 0; this.comboBoxOcrMethod.SelectedIndexChanged += new System.EventHandler(this.ComboBoxOcrMethodSelectedIndexChanged); // - // groupBoxNOCR - // - this.groupBoxNOCR.Controls.Add(this.buttonLineOcrEditLanguage); - this.groupBoxNOCR.Controls.Add(this.buttonLineOcrNewLanguage); - this.groupBoxNOCR.Controls.Add(this.label2); - this.groupBoxNOCR.Controls.Add(this.comboBoxNOcrLanguage); - this.groupBoxNOCR.Controls.Add(this.checkBoxNOcrItalic); - this.groupBoxNOCR.Controls.Add(this.checkBoxNOcrCorrect); - this.groupBoxNOCR.Controls.Add(this.checkBoxRightToLeftNOCR); - this.groupBoxNOCR.Controls.Add(this.numericUpDownNumberOfPixelsIsSpaceNOCR); - this.groupBoxNOCR.Controls.Add(this.labelNumberOfPixelsIsSpaceNOCR); - this.groupBoxNOCR.Location = new System.Drawing.Point(7, 38); - this.groupBoxNOCR.Name = "groupBoxNOCR"; - this.groupBoxNOCR.Size = new System.Drawing.Size(366, 131); - this.groupBoxNOCR.TabIndex = 7; - this.groupBoxNOCR.TabStop = false; - this.groupBoxNOCR.Text = "nOCR"; - // - // buttonLineOcrEditLanguage - // - this.buttonLineOcrEditLanguage.Location = new System.Drawing.Point(210, 97); - this.buttonLineOcrEditLanguage.Name = "buttonLineOcrEditLanguage"; - this.buttonLineOcrEditLanguage.Size = new System.Drawing.Size(68, 23); - this.buttonLineOcrEditLanguage.TabIndex = 41; - this.buttonLineOcrEditLanguage.Text = "Edit"; - this.buttonLineOcrEditLanguage.UseVisualStyleBackColor = true; - this.buttonLineOcrEditLanguage.Click += new System.EventHandler(this.buttonLineOcrEditLanguage_Click); - // - // buttonLineOcrNewLanguage - // - this.buttonLineOcrNewLanguage.Location = new System.Drawing.Point(283, 97); - this.buttonLineOcrNewLanguage.Name = "buttonLineOcrNewLanguage"; - this.buttonLineOcrNewLanguage.Size = new System.Drawing.Size(68, 23); - this.buttonLineOcrNewLanguage.TabIndex = 40; - this.buttonLineOcrNewLanguage.Text = "New"; - this.buttonLineOcrNewLanguage.UseVisualStyleBackColor = true; - this.buttonLineOcrNewLanguage.Click += new System.EventHandler(this.buttonLineOcrNewLanguage_Click); - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(11, 101); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(54, 13); - this.label2.TabIndex = 35; - this.label2.Text = "Language"; - // - // comboBoxNOcrLanguage - // - this.comboBoxNOcrLanguage.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBoxNOcrLanguage.FormattingEnabled = true; - this.comboBoxNOcrLanguage.Location = new System.Drawing.Point(74, 97); - this.comboBoxNOcrLanguage.Name = "comboBoxNOcrLanguage"; - this.comboBoxNOcrLanguage.Size = new System.Drawing.Size(130, 21); - this.comboBoxNOcrLanguage.TabIndex = 34; - this.comboBoxNOcrLanguage.SelectedIndexChanged += new System.EventHandler(this.comboBoxNOcrLanguage_SelectedIndexChanged); - // - // checkBoxNOcrItalic - // - this.checkBoxNOcrItalic.AutoSize = true; - this.checkBoxNOcrItalic.Location = new System.Drawing.Point(15, 42); - this.checkBoxNOcrItalic.Name = "checkBoxNOcrItalic"; - this.checkBoxNOcrItalic.Size = new System.Drawing.Size(92, 17); - this.checkBoxNOcrItalic.TabIndex = 8; - this.checkBoxNOcrItalic.Text = "Contains italic"; - this.checkBoxNOcrItalic.UseVisualStyleBackColor = true; - // - // checkBoxNOcrCorrect - // - this.checkBoxNOcrCorrect.AutoSize = true; - this.checkBoxNOcrCorrect.Location = new System.Drawing.Point(235, 17); - this.checkBoxNOcrCorrect.Name = "checkBoxNOcrCorrect"; - this.checkBoxNOcrCorrect.Size = new System.Drawing.Size(116, 17); - this.checkBoxNOcrCorrect.TabIndex = 7; - this.checkBoxNOcrCorrect.Text = "Draw missing texts"; - this.checkBoxNOcrCorrect.UseVisualStyleBackColor = true; - // - // checkBoxRightToLeftNOCR - // - this.checkBoxRightToLeftNOCR.AutoSize = true; - this.checkBoxRightToLeftNOCR.Location = new System.Drawing.Point(235, 40); - this.checkBoxRightToLeftNOCR.Name = "checkBoxRightToLeftNOCR"; - this.checkBoxRightToLeftNOCR.Size = new System.Drawing.Size(83, 17); - this.checkBoxRightToLeftNOCR.TabIndex = 6; - this.checkBoxRightToLeftNOCR.Text = "Right to left"; - this.checkBoxRightToLeftNOCR.UseVisualStyleBackColor = true; - // - // numericUpDownNumberOfPixelsIsSpaceNOCR - // - this.numericUpDownNumberOfPixelsIsSpaceNOCR.Location = new System.Drawing.Point(122, 17); - this.numericUpDownNumberOfPixelsIsSpaceNOCR.Maximum = new decimal(new int[] { - 50, - 0, - 0, - 0}); - this.numericUpDownNumberOfPixelsIsSpaceNOCR.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.numericUpDownNumberOfPixelsIsSpaceNOCR.Name = "numericUpDownNumberOfPixelsIsSpaceNOCR"; - this.numericUpDownNumberOfPixelsIsSpaceNOCR.Size = new System.Drawing.Size(50, 21); - this.numericUpDownNumberOfPixelsIsSpaceNOCR.TabIndex = 5; - this.numericUpDownNumberOfPixelsIsSpaceNOCR.Value = new decimal(new int[] { - 12, - 0, - 0, - 0}); - // - // labelNumberOfPixelsIsSpaceNOCR - // - this.labelNumberOfPixelsIsSpaceNOCR.AutoSize = true; - this.labelNumberOfPixelsIsSpaceNOCR.Location = new System.Drawing.Point(12, 20); - this.labelNumberOfPixelsIsSpaceNOCR.Name = "labelNumberOfPixelsIsSpaceNOCR"; - this.labelNumberOfPixelsIsSpaceNOCR.Size = new System.Drawing.Size(104, 13); - this.labelNumberOfPixelsIsSpaceNOCR.TabIndex = 4; - this.labelNumberOfPixelsIsSpaceNOCR.Text = "No of pixels is space"; - // // groupBoxImageCompareMethod // + this.groupBoxImageCompareMethod.Controls.Add(this.buttonChooseEditBinaryImageCompareDb); this.groupBoxImageCompareMethod.Controls.Add(this.labelMinLineSplitHeight); this.groupBoxImageCompareMethod.Controls.Add(this.comboBoxLineSplitMinLineHeight); this.groupBoxImageCompareMethod.Controls.Add(this.labelMaxErrorPercent); this.groupBoxImageCompareMethod.Controls.Add(this.numericUpDownMaxErrorPct); this.groupBoxImageCompareMethod.Controls.Add(this.checkBoxRightToLeft); this.groupBoxImageCompareMethod.Controls.Add(this.numericUpDownPixelsIsSpace); - this.groupBoxImageCompareMethod.Controls.Add(this.buttonEditCharacterDatabase); this.groupBoxImageCompareMethod.Controls.Add(this.labelNoOfPixelsIsSpace); this.groupBoxImageCompareMethod.Controls.Add(this.comboBoxCharacterDatabase); this.groupBoxImageCompareMethod.Controls.Add(this.labelImageDatabase); - this.groupBoxImageCompareMethod.Controls.Add(this.buttonNewCharacterDatabase); this.groupBoxImageCompareMethod.Location = new System.Drawing.Point(13, 38); this.groupBoxImageCompareMethod.Name = "groupBoxImageCompareMethod"; this.groupBoxImageCompareMethod.Size = new System.Drawing.Size(366, 131); @@ -604,6 +487,16 @@ namespace Nikse.SubtitleEdit.Forms.Ocr this.groupBoxImageCompareMethod.TabStop = false; this.groupBoxImageCompareMethod.Text = "Image compare"; // + // buttonChooseEditBinaryImageCompareDb + // + this.buttonChooseEditBinaryImageCompareDb.Location = new System.Drawing.Point(318, 17); + this.buttonChooseEditBinaryImageCompareDb.Name = "buttonChooseEditBinaryImageCompareDb"; + this.buttonChooseEditBinaryImageCompareDb.Size = new System.Drawing.Size(28, 23); + this.buttonChooseEditBinaryImageCompareDb.TabIndex = 48; + this.buttonChooseEditBinaryImageCompareDb.Text = "..."; + this.buttonChooseEditBinaryImageCompareDb.UseVisualStyleBackColor = true; + this.buttonChooseEditBinaryImageCompareDb.Click += new System.EventHandler(this.buttonChooseEditBinaryImageCompareDb_Click); + // // labelMinLineSplitHeight // this.labelMinLineSplitHeight.AutoSize = true; @@ -759,16 +652,6 @@ namespace Nikse.SubtitleEdit.Forms.Ocr 0}); this.numericUpDownPixelsIsSpace.ValueChanged += new System.EventHandler(this.numericUpDownPixelsIsSpace_ValueChanged); // - // buttonEditCharacterDatabase - // - this.buttonEditCharacterDatabase.Location = new System.Drawing.Point(278, 48); - this.buttonEditCharacterDatabase.Name = "buttonEditCharacterDatabase"; - this.buttonEditCharacterDatabase.Size = new System.Drawing.Size(76, 23); - this.buttonEditCharacterDatabase.TabIndex = 3; - this.buttonEditCharacterDatabase.Text = "Edit"; - this.buttonEditCharacterDatabase.UseVisualStyleBackColor = true; - this.buttonEditCharacterDatabase.Click += new System.EventHandler(this.ButtonEditCharacterDatabaseClick); - // // labelNoOfPixelsIsSpace // this.labelNoOfPixelsIsSpace.AutoSize = true; @@ -784,7 +667,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr this.comboBoxCharacterDatabase.FormattingEnabled = true; this.comboBoxCharacterDatabase.Location = new System.Drawing.Point(130, 19); this.comboBoxCharacterDatabase.Name = "comboBoxCharacterDatabase"; - this.comboBoxCharacterDatabase.Size = new System.Drawing.Size(142, 21); + this.comboBoxCharacterDatabase.Size = new System.Drawing.Size(182, 21); this.comboBoxCharacterDatabase.TabIndex = 1; this.comboBoxCharacterDatabase.SelectedIndexChanged += new System.EventHandler(this.ComboBoxCharacterDatabaseSelectedIndexChanged); // @@ -797,16 +680,6 @@ namespace Nikse.SubtitleEdit.Forms.Ocr this.labelImageDatabase.TabIndex = 0; this.labelImageDatabase.Text = "Image database"; // - // buttonNewCharacterDatabase - // - this.buttonNewCharacterDatabase.Location = new System.Drawing.Point(278, 19); - this.buttonNewCharacterDatabase.Name = "buttonNewCharacterDatabase"; - this.buttonNewCharacterDatabase.Size = new System.Drawing.Size(76, 23); - this.buttonNewCharacterDatabase.TabIndex = 2; - this.buttonNewCharacterDatabase.Text = "New"; - this.buttonNewCharacterDatabase.UseVisualStyleBackColor = true; - this.buttonNewCharacterDatabase.Click += new System.EventHandler(this.ButtonNewCharacterDatabaseClick); - // // GroupBoxTesseractMethod // this.GroupBoxTesseractMethod.Controls.Add(this.checkBoxTesseractFallback); @@ -941,6 +814,152 @@ namespace Nikse.SubtitleEdit.Forms.Ocr this.comboBoxModiLanguage.TabIndex = 0; this.comboBoxModiLanguage.SelectedIndexChanged += new System.EventHandler(this.ComboBoxModiLanguageSelectedIndexChanged); // + // groupBoxNOCR + // + this.groupBoxNOCR.Controls.Add(this.numericUpDownNOcrMaxWrongPixels); + this.groupBoxNOCR.Controls.Add(this.labelNOcrMaxWrongPixels); + this.groupBoxNOCR.Controls.Add(this.buttonLineOcrEditLanguage); + this.groupBoxNOCR.Controls.Add(this.buttonLineOcrNewLanguage); + this.groupBoxNOCR.Controls.Add(this.label2); + this.groupBoxNOCR.Controls.Add(this.comboBoxNOcrLanguage); + this.groupBoxNOCR.Controls.Add(this.checkBoxNOcrItalic); + this.groupBoxNOCR.Controls.Add(this.checkBoxNOcrCorrect); + this.groupBoxNOCR.Controls.Add(this.checkBoxRightToLeftNOCR); + this.groupBoxNOCR.Controls.Add(this.numericUpDownNumberOfPixelsIsSpaceNOCR); + this.groupBoxNOCR.Controls.Add(this.labelNumberOfPixelsIsSpaceNOCR); + this.groupBoxNOCR.Location = new System.Drawing.Point(7, 38); + this.groupBoxNOCR.Name = "groupBoxNOCR"; + this.groupBoxNOCR.Size = new System.Drawing.Size(366, 131); + this.groupBoxNOCR.TabIndex = 7; + this.groupBoxNOCR.TabStop = false; + this.groupBoxNOCR.Text = "nOCR"; + // + // numericUpDownNOcrMaxWrongPixels + // + this.numericUpDownNOcrMaxWrongPixels.Location = new System.Drawing.Point(123, 45); + this.numericUpDownNOcrMaxWrongPixels.Maximum = new decimal(new int[] { + 50, + 0, + 0, + 0}); + this.numericUpDownNOcrMaxWrongPixels.Name = "numericUpDownNOcrMaxWrongPixels"; + this.numericUpDownNOcrMaxWrongPixels.Size = new System.Drawing.Size(50, 21); + this.numericUpDownNOcrMaxWrongPixels.TabIndex = 43; + this.numericUpDownNOcrMaxWrongPixels.Value = new decimal(new int[] { + 45, + 0, + 0, + 0}); + // + // labelNOcrMaxWrongPixels + // + this.labelNOcrMaxWrongPixels.AutoSize = true; + this.labelNOcrMaxWrongPixels.Location = new System.Drawing.Point(13, 48); + this.labelNOcrMaxWrongPixels.Name = "labelNOcrMaxWrongPixels"; + this.labelNOcrMaxWrongPixels.Size = new System.Drawing.Size(90, 13); + this.labelNOcrMaxWrongPixels.TabIndex = 42; + this.labelNOcrMaxWrongPixels.Text = "Max wrong pixels"; + // + // buttonLineOcrEditLanguage + // + this.buttonLineOcrEditLanguage.Location = new System.Drawing.Point(210, 97); + this.buttonLineOcrEditLanguage.Name = "buttonLineOcrEditLanguage"; + this.buttonLineOcrEditLanguage.Size = new System.Drawing.Size(68, 23); + this.buttonLineOcrEditLanguage.TabIndex = 41; + this.buttonLineOcrEditLanguage.Text = "Edit"; + this.buttonLineOcrEditLanguage.UseVisualStyleBackColor = true; + this.buttonLineOcrEditLanguage.Click += new System.EventHandler(this.buttonLineOcrEditLanguage_Click); + // + // buttonLineOcrNewLanguage + // + this.buttonLineOcrNewLanguage.Location = new System.Drawing.Point(283, 97); + this.buttonLineOcrNewLanguage.Name = "buttonLineOcrNewLanguage"; + this.buttonLineOcrNewLanguage.Size = new System.Drawing.Size(68, 23); + this.buttonLineOcrNewLanguage.TabIndex = 40; + this.buttonLineOcrNewLanguage.Text = "New"; + this.buttonLineOcrNewLanguage.UseVisualStyleBackColor = true; + this.buttonLineOcrNewLanguage.Click += new System.EventHandler(this.buttonLineOcrNewLanguage_Click); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(11, 101); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(54, 13); + this.label2.TabIndex = 35; + this.label2.Text = "Language"; + // + // comboBoxNOcrLanguage + // + this.comboBoxNOcrLanguage.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxNOcrLanguage.FormattingEnabled = true; + this.comboBoxNOcrLanguage.Location = new System.Drawing.Point(74, 97); + this.comboBoxNOcrLanguage.Name = "comboBoxNOcrLanguage"; + this.comboBoxNOcrLanguage.Size = new System.Drawing.Size(130, 21); + this.comboBoxNOcrLanguage.TabIndex = 34; + this.comboBoxNOcrLanguage.SelectedIndexChanged += new System.EventHandler(this.comboBoxNOcrLanguage_SelectedIndexChanged); + // + // checkBoxNOcrItalic + // + this.checkBoxNOcrItalic.AutoSize = true; + this.checkBoxNOcrItalic.Location = new System.Drawing.Point(12, 67); + this.checkBoxNOcrItalic.Name = "checkBoxNOcrItalic"; + this.checkBoxNOcrItalic.Size = new System.Drawing.Size(92, 17); + this.checkBoxNOcrItalic.TabIndex = 8; + this.checkBoxNOcrItalic.Text = "Contains italic"; + this.checkBoxNOcrItalic.UseVisualStyleBackColor = true; + // + // checkBoxNOcrCorrect + // + this.checkBoxNOcrCorrect.AutoSize = true; + this.checkBoxNOcrCorrect.Location = new System.Drawing.Point(235, 17); + this.checkBoxNOcrCorrect.Name = "checkBoxNOcrCorrect"; + this.checkBoxNOcrCorrect.Size = new System.Drawing.Size(116, 17); + this.checkBoxNOcrCorrect.TabIndex = 7; + this.checkBoxNOcrCorrect.Text = "Draw missing texts"; + this.checkBoxNOcrCorrect.UseVisualStyleBackColor = true; + // + // checkBoxRightToLeftNOCR + // + this.checkBoxRightToLeftNOCR.AutoSize = true; + this.checkBoxRightToLeftNOCR.Location = new System.Drawing.Point(235, 40); + this.checkBoxRightToLeftNOCR.Name = "checkBoxRightToLeftNOCR"; + this.checkBoxRightToLeftNOCR.Size = new System.Drawing.Size(83, 17); + this.checkBoxRightToLeftNOCR.TabIndex = 6; + this.checkBoxRightToLeftNOCR.Text = "Right to left"; + this.checkBoxRightToLeftNOCR.UseVisualStyleBackColor = true; + // + // numericUpDownNumberOfPixelsIsSpaceNOCR + // + this.numericUpDownNumberOfPixelsIsSpaceNOCR.Location = new System.Drawing.Point(122, 17); + this.numericUpDownNumberOfPixelsIsSpaceNOCR.Maximum = new decimal(new int[] { + 50, + 0, + 0, + 0}); + this.numericUpDownNumberOfPixelsIsSpaceNOCR.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numericUpDownNumberOfPixelsIsSpaceNOCR.Name = "numericUpDownNumberOfPixelsIsSpaceNOCR"; + this.numericUpDownNumberOfPixelsIsSpaceNOCR.Size = new System.Drawing.Size(50, 21); + this.numericUpDownNumberOfPixelsIsSpaceNOCR.TabIndex = 5; + this.numericUpDownNumberOfPixelsIsSpaceNOCR.Value = new decimal(new int[] { + 12, + 0, + 0, + 0}); + // + // labelNumberOfPixelsIsSpaceNOCR + // + this.labelNumberOfPixelsIsSpaceNOCR.AutoSize = true; + this.labelNumberOfPixelsIsSpaceNOCR.Location = new System.Drawing.Point(12, 20); + this.labelNumberOfPixelsIsSpaceNOCR.Name = "labelNumberOfPixelsIsSpaceNOCR"; + this.labelNumberOfPixelsIsSpaceNOCR.Size = new System.Drawing.Size(104, 13); + this.labelNumberOfPixelsIsSpaceNOCR.TabIndex = 4; + this.labelNumberOfPixelsIsSpaceNOCR.Text = "No of pixels is space"; + // // groupBoxOCRControls // this.groupBoxOCRControls.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); @@ -1708,9 +1727,6 @@ namespace Nikse.SubtitleEdit.Forms.Ocr this.Resize += new System.EventHandler(this.VobSubOcr_Resize); this.contextMenuStripListview.ResumeLayout(false); this.groupBoxOcrMethod.ResumeLayout(false); - this.groupBoxNOCR.ResumeLayout(false); - this.groupBoxNOCR.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownNumberOfPixelsIsSpaceNOCR)).EndInit(); this.groupBoxImageCompareMethod.ResumeLayout(false); this.groupBoxImageCompareMethod.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMaxErrorPct)).EndInit(); @@ -1719,6 +1735,10 @@ namespace Nikse.SubtitleEdit.Forms.Ocr this.GroupBoxTesseractMethod.PerformLayout(); this.groupBoxModiMethod.ResumeLayout(false); this.groupBoxModiMethod.PerformLayout(); + this.groupBoxNOCR.ResumeLayout(false); + this.groupBoxNOCR.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownNOcrMaxWrongPixels)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownNumberOfPixelsIsSpaceNOCR)).EndInit(); this.groupBoxOCRControls.ResumeLayout(false); this.groupBoxOCRControls.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownStartNumber)).EndInit(); @@ -1781,11 +1801,9 @@ namespace Nikse.SubtitleEdit.Forms.Ocr private System.Windows.Forms.ComboBox comboBoxOcrMethod; private System.Windows.Forms.GroupBox groupBoxImageCompareMethod; private System.Windows.Forms.NumericUpDown numericUpDownPixelsIsSpace; - private System.Windows.Forms.Button buttonEditCharacterDatabase; private System.Windows.Forms.Label labelNoOfPixelsIsSpace; private System.Windows.Forms.ComboBox comboBoxCharacterDatabase; private System.Windows.Forms.Label labelImageDatabase; - private System.Windows.Forms.Button buttonNewCharacterDatabase; private System.Windows.Forms.Label label1; private System.Windows.Forms.GroupBox groupBoxModiMethod; private System.Windows.Forms.GroupBox GroupBoxTesseractMethod; @@ -1889,5 +1907,8 @@ namespace Nikse.SubtitleEdit.Forms.Ocr private System.Windows.Forms.ToolStripMenuItem imagePreprocessingToolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem setItalicAngleToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem autoTransparentBackgroundToolStripMenuItem; + private System.Windows.Forms.NumericUpDown numericUpDownNOcrMaxWrongPixels; + private System.Windows.Forms.Label labelNOcrMaxWrongPixels; + private System.Windows.Forms.Button buttonChooseEditBinaryImageCompareDb; } } \ No newline at end of file diff --git a/src/Forms/Ocr/VobSubOcr.cs b/src/Forms/Ocr/VobSubOcr.cs index 6d9562692..dd89fa120 100644 --- a/src/Forms/Ocr/VobSubOcr.cs +++ b/src/Forms/Ocr/VobSubOcr.cs @@ -71,6 +71,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr public int Index { get; set; } public int Increment { get; set; } public string Result { get; set; } + public NOcrDb NOcrDb { get; set; } public NOcrChar[] NOcrChars { get; set; } public BackgroundWorker Self { get; set; } public double UnItalicFactor { get; set; } @@ -86,6 +87,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr Picture = picture; Index = index; NOcrChars = nOcrDb.OcrCharacters.ToArray(); + NOcrDb = nOcrDb; Increment = increment; UnItalicFactor = unItalicFactor; AdvancedItalicDetection = advancedItalicDetection; @@ -249,7 +251,6 @@ namespace Nikse.SubtitleEdit.Forms.Ocr private double _unItalicFactor = 0.33; private BinaryOcrDb _binaryOcrDb; - private string _binaryOcrDbFileName; private long _binOcrLowercaseHeightsTotal; private int _binOcrLowercaseHeightsTotalCount; private long _binOcrUppercaseHeightsTotal; @@ -327,7 +328,6 @@ namespace Nikse.SubtitleEdit.Forms.Ocr private int _tesseractAsyncIndex; private int _tesseractEngineMode; - private int _linesOcred; private bool _okClicked; private readonly Dictionary _unknownWordsDictionary; @@ -374,8 +374,6 @@ namespace Nikse.SubtitleEdit.Forms.Ocr labelImageDatabase.Text = language.ImageDatabase; labelNoOfPixelsIsSpace.Text = language.NoOfPixelsIsSpace; labelMaxErrorPercent.Text = language.MaxErrorPercent; - buttonNewCharacterDatabase.Text = language.New; - buttonEditCharacterDatabase.Text = language.Edit; buttonStartOcr.Text = language.StartOcr; buttonStop.Text = language.Stop; labelStartFrom.Text = language.StartOcrFrom; @@ -503,7 +501,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr } numericUpDownPixelsIsSpace.Value = Configuration.Settings.VobSubOcr.XOrMorePixelsMakesSpace; - numericUpDownNumberOfPixelsIsSpaceNOCR.Value = Configuration.Settings.VobSubOcr.XOrMorePixelsMakesSpace; + numericUpDownNumberOfPixelsIsSpaceNOCR.Value = Configuration.Settings.VobSubOcr.LineOcrMaxErrorPixels; checkBoxShowOnlyForced.Text = language.ShowOnlyForcedSubtitles; checkBoxUseTimeCodesFromIdx.Text = language.UseTimeCodesFromIdx; @@ -550,13 +548,11 @@ namespace Nikse.SubtitleEdit.Forms.Ocr comboBoxModiLanguage.Left = label1.Left + label1.Width + 3; comboBoxCharacterDatabase.Left = labelImageDatabase.Left + labelImageDatabase.Width + 3; - buttonNewCharacterDatabase.Left = comboBoxCharacterDatabase.Left + comboBoxCharacterDatabase.Width + 3; - buttonEditCharacterDatabase.Left = buttonNewCharacterDatabase.Left; + comboBoxCharacterDatabase.Width = buttonChooseEditBinaryImageCompareDb.Left - comboBoxCharacterDatabase.Left - 10; numericUpDownPixelsIsSpace.Left = labelNoOfPixelsIsSpace.Left + labelNoOfPixelsIsSpace.Width + 3; checkBoxRightToLeft.Left = numericUpDownPixelsIsSpace.Left; UiUtil.FixLargeFonts(this, buttonCancel); - buttonEditCharacterDatabase.Top = buttonNewCharacterDatabase.Top + buttonNewCharacterDatabase.Height + 3; splitContainerBottom.Panel1MinSize = 400; splitContainerBottom.Panel2MinSize = 250; @@ -968,10 +964,28 @@ namespace Nikse.SubtitleEdit.Forms.Ocr } comboBoxCharacterDatabase.Items.Clear(); - foreach (string s in BinaryOcrDb.GetDatabases()) + var binaryOcrDbs = BinaryOcrDb.GetDatabases(); + var imageCompareDbName = string.Empty; + if (!string.IsNullOrEmpty(Configuration.Settings.VobSubOcr.LastBinaryImageCompareDb)) + { + var parts = Configuration.Settings.VobSubOcr.LastBinaryImageCompareDb.Split('+'); + if (parts.Length > 0 && binaryOcrDbs.Contains(parts[0])) + { + imageCompareDbName = parts[0]; + if (parts.Length > 1) + { + imageCompareDbName = Configuration.Settings.VobSubOcr.LastBinaryImageCompareDb; + var nOcrDbName = parts[1]; + _nOcrDb = new NOcrDb(Path.Combine(Configuration.OcrDirectory, nOcrDbName + ".nocr")); + binaryOcrDbs.Insert(0, Configuration.Settings.VobSubOcr.LastBinaryImageCompareDb); + } + } + } + + foreach (string s in binaryOcrDbs) { comboBoxCharacterDatabase.Items.Add(s); - if (s == Configuration.Settings.VobSubOcr.LastBinaryImageCompareDb) + if (s == imageCompareDbName) { comboBoxCharacterDatabase.SelectedIndex = comboBoxCharacterDatabase.Items.Count - 1; } @@ -1007,11 +1021,24 @@ namespace Nikse.SubtitleEdit.Forms.Ocr { DisposeImageCompareBitmaps(); _binaryOcrDb = null; + _nOcrDb = null; if (_ocrMethodIndex == _ocrMethodBinaryImageCompare) { - string db = Configuration.OcrDirectory + comboBoxCharacterDatabase.SelectedItem + ".db"; - _binaryOcrDb = new BinaryOcrDb(db, true); + var binaryOcrDbs = BinaryOcrDb.GetDatabases(); + var parts = comboBoxCharacterDatabase.SelectedItem.ToString().Split('+'); + if (parts.Length > 0 && binaryOcrDbs.Contains(parts[0])) + { + var imageCompareDbName = parts[0]; + if (parts.Length > 1) + { + imageCompareDbName = Configuration.Settings.VobSubOcr.LastBinaryImageCompareDb; + var nOcrDbName = parts[1]; + _nOcrDb = new NOcrDb(Path.Combine(Configuration.OcrDirectory, nOcrDbName + ".nocr")); + } + var db = Path.Combine(Configuration.OcrDirectory, imageCompareDbName + ".db"); + _binaryOcrDb = new BinaryOcrDb(db, true); + } } } @@ -2085,117 +2112,6 @@ namespace Nikse.SubtitleEdit.Forms.Ocr return new Point((int)Math.Round(p.X + (height - p.Y) * unItalicFactor - moveLeftPixels), p.Y); } - private static NOcrChar NOcrFindExpandedMatch(NikseBitmap nbmp, ImageSplitterItem targetItem, NOcrChar[] nOcrChars) - { - int w = targetItem.NikseBitmap.Width; - foreach (NOcrChar oc in nOcrChars) - { - if (oc.ExpandCount > 1 && oc.Width > w && targetItem.X + oc.Width < nbmp.Width) - { - bool ok = true; - var index = 0; - while (index < oc.LinesForeground.Count && ok) - { - NOcrPoint op = oc.LinesForeground[index]; - foreach (Point point in op.GetPoints()) - { - Point p = new Point(point.X + targetItem.X, point.Y + targetItem.Y); - if (p.X >= 0 && p.Y >= 0 && p.X < nbmp.Width && p.Y < nbmp.Height) - { - Color c = nbmp.GetPixel(p.X, p.Y); - if (c.A <= 150 || c.R + c.G + c.B <= NocrMinColor) - { - ok = false; - break; - } - } - } - - index++; - } - - index = 0; - while (index < oc.LinesBackground.Count && ok) - { - NOcrPoint op = oc.LinesBackground[index]; - foreach (Point point in op.GetPoints()) - { - Point p = new Point(point.X + targetItem.X, point.Y + targetItem.Y); - if (p.X >= 0 && p.Y >= 0 && p.X < nbmp.Width && p.Y < nbmp.Height) - { - Color c = nbmp.GetPixel(p.X, p.Y); - if (c.A > 150 && c.R + c.G + c.B > NocrMinColor) - { - ok = false; - break; - } - } - } - - index++; - } - - if (ok) - { - return oc; - } - - ok = true; - index = 0; - while (index < oc.LinesForeground.Count && ok) - { - NOcrPoint op = oc.LinesForeground[index]; - foreach (Point point in op.ScaledGetPoints(oc, oc.Width, oc.Height - 1)) - { - Point p = new Point(point.X + targetItem.X, point.Y + targetItem.Y); - if (p.X >= 0 && p.Y >= 0 && p.X < nbmp.Width && p.Y < nbmp.Height) - { - Color c = nbmp.GetPixel(p.X, p.Y); - if (c.A > 150 && c.R + c.G + c.B > NocrMinColor) - { - } - else - { - ok = false; - break; - } - } - } - - index++; - } - - index = 0; - while (index < oc.LinesBackground.Count && ok) - { - NOcrPoint op = oc.LinesBackground[index]; - foreach (Point point in op.ScaledGetPoints(oc, oc.Width, oc.Height - 1)) - { - Point p = new Point(point.X + targetItem.X, point.Y + targetItem.Y); - if (p.X >= 0 && p.Y >= 0 && p.X < nbmp.Width && p.Y < nbmp.Height) - { - Color c = nbmp.GetPixel(p.X, p.Y); - if (c.A > 150 && c.R + c.G + c.B > NocrMinColor) - { - ok = false; - break; - } - } - } - - index++; - } - - if (ok) - { - return oc; - } - } - } - - return null; - } - private static NOcrChar NOcrFindBestMatch(ImageSplitterItem targetItem, int topMargin, out bool italic, NOcrChar[] nOcrChars, double unItalicFactor, bool tryItalicScaling, bool deepSeek) { italic = false; @@ -2739,9 +2655,9 @@ namespace Nikse.SubtitleEdit.Forms.Ocr return null; } - private static NOcrChar NOcrFindBestMatchNew(ImageSplitterItem targetItem, int topMargin, bool italic, NOcrDb nOcrDb, bool deepSeek, double italicAngle) + private static NOcrChar NOcrFindBestMatchNew(ImageSplitterItem targetItem, int topMargin, bool italic, NOcrDb nOcrDb, bool deepSeek, double italicAngle, int maxWrongPixels) { - return nOcrDb?.GetMatch(targetItem.NikseBitmap, targetItem.Top, deepSeek, italic, italicAngle); + return nOcrDb?.GetMatch(targetItem.NikseBitmap, targetItem.Top, deepSeek, italic, italicAngle, maxWrongPixels); } private static NOcrChar MakeItalicNOcrChar(NOcrChar oldChar, int movePixelsLeft, double unItalicFactor) @@ -2767,13 +2683,13 @@ namespace Nikse.SubtitleEdit.Forms.Ocr internal CompareMatch GetNOcrCompareMatch(ImageSplitterItem targetItem, NikseBitmap parentBitmap, NOcrDb nOcrDb, bool tryItalicScaling, bool deepSeek) { - var expandedResult = NOcrFindExpandedMatch(parentBitmap, targetItem, nOcrDb.OcrCharacters.ToArray()); + var expandedResult = nOcrDb.GetMatchExpanded(parentBitmap, targetItem); if (expandedResult != null) { return new CompareMatch(expandedResult.Text, expandedResult.Italic, expandedResult.ExpandCount, null, expandedResult); } - var result = NOcrFindBestMatchNew(targetItem, targetItem.Y - targetItem.ParentY, tryItalicScaling, nOcrDb, deepSeek, _unItalicFactor); + var result = NOcrFindBestMatchNew(targetItem, targetItem.Y - targetItem.ParentY, tryItalicScaling, nOcrDb, deepSeek, _unItalicFactor, (int)numericUpDownNOcrMaxWrongPixels.Value); if (result == null) { if (checkBoxNOcrCorrect.Checked) @@ -2805,7 +2721,9 @@ namespace Nikse.SubtitleEdit.Forms.Ocr _binOcrUppercaseHeightsTotal += targetItem.NikseBitmap.Height; } - if (result.Text == "V" || result.Text == "W" || result.Text == "U" || result.Text == "S" || result.Text == "Z" || result.Text == "O" || result.Text == "X" || result.Text == "Ø" || result.Text == "C") + if (result.Text == "V" || result.Text == "W" || result.Text == "U" || result.Text == "S" || + result.Text == "Z" || result.Text == "Ź" || result.Text == "Ż" || result.Text == "O" || result.Text == "Ó" || + result.Text == "X" || result.Text == "Ø" || result.Text == "C" || result.Text == "Ć") { if (_binOcrLowercaseHeightsTotalCount > 3 && _binOcrUppercaseHeightsTotalCount > 3 && @@ -2815,7 +2733,9 @@ namespace Nikse.SubtitleEdit.Forms.Ocr result.Text = result.Text.ToLowerInvariant(); } } - else if (result.Text == "v" || result.Text == "w" || result.Text == "u" || result.Text == "s" || result.Text == "z" || result.Text == "o" || result.Text == "x" || result.Text == "ø" || result.Text == "c") + else if (result.Text == "v" || result.Text == "w" || result.Text == "u" || result.Text == "s" || + result.Text == "z" || result.Text == "ź" || result.Text == "ż" || result.Text == "ó" || + result.Text == "o" || result.Text == "x" || result.Text == "ø" || result.Text == "c" || result.Text == "ć") { if (_binOcrLowercaseHeightsTotalCount > 3 && _binOcrUppercaseHeightsTotalCount > 3 && @@ -2829,13 +2749,13 @@ namespace Nikse.SubtitleEdit.Forms.Ocr internal CompareMatch GetNOcrCompareMatchNew(ImageSplitterItem targetItem, NikseBitmap parentBitmap, NOcrDb nOcrDb, bool tryItalicScaling, bool deepSeek) { - var expandedResult = NOcrFindExpandedMatch(parentBitmap, targetItem, nOcrDb.OcrCharactersExpanded.ToArray()); + var expandedResult = nOcrDb.GetMatchExpanded(parentBitmap, targetItem); if (expandedResult != null) { return new CompareMatch(expandedResult.Text, expandedResult.Italic, expandedResult.ExpandCount, null, expandedResult) { ImageSplitterItem = targetItem }; } - var result = NOcrFindBestMatchNew(targetItem, targetItem.Y - targetItem.ParentY, tryItalicScaling, nOcrDb, deepSeek, _unItalicFactor); + var result = NOcrFindBestMatchNew(targetItem, targetItem.Y - targetItem.ParentY, tryItalicScaling, nOcrDb, deepSeek, _unItalicFactor, (int)numericUpDownNOcrMaxWrongPixels.Value); if (result == null) { if (checkBoxNOcrCorrect.Checked) @@ -2853,7 +2773,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr internal static CompareMatch GetNOcrCompareMatch(ImageSplitterItem targetItem, NikseBitmap parentBitmap, NOcrThreadParameter p) { - var expandedResult = NOcrFindExpandedMatch(parentBitmap, targetItem, p.NOcrChars); + var expandedResult = p.NOcrDb.GetMatchExpanded(parentBitmap, targetItem); if (expandedResult != null) { return new CompareMatch(expandedResult.Text, expandedResult.Italic, expandedResult.ExpandCount, null, expandedResult); @@ -3752,7 +3672,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr var match = GetCompareMatchNew(item, out var bestGuess, list, index, _binaryOcrDb); if (match == null) // Try nOCR (line OCR) if no image compare match { - if (_nOcrDb != null && _nOcrDb.OcrCharacters.Count > 0 && _numericUpDownMaxErrorPct > 1) + if (_nOcrDb != null && _nOcrDb.OcrCharacters.Count > 0) { match = GetNOcrCompareMatchNew(item, parentBitmap, _nOcrDb, true, true); } @@ -4816,8 +4736,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr buttonCancel.Enabled = false; buttonStartOcr.Enabled = false; buttonStop.Enabled = true; - buttonNewCharacterDatabase.Enabled = false; - buttonEditCharacterDatabase.Enabled = false; + buttonChooseEditBinaryImageCompareDb.Enabled = false; _mainOcrRunning = true; progressBar1.Visible = true; subtitleListView1.MultiSelect = false; @@ -4832,8 +4751,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr buttonCancel.Enabled = true; buttonStartOcr.Enabled = true; buttonStop.Enabled = false; - buttonNewCharacterDatabase.Enabled = true; - buttonEditCharacterDatabase.Enabled = true; + buttonChooseEditBinaryImageCompareDb.Enabled = true; _mainOcrRunning = false; labelStatus.Text = string.Empty; progressBar1.Visible = false; @@ -5029,12 +4947,10 @@ namespace Nikse.SubtitleEdit.Forms.Ocr { if (_binaryOcrDb == null) { - _binaryOcrDbFileName = Configuration.OcrDirectory + "Latin.db"; - _binaryOcrDb = new BinaryOcrDb(_binaryOcrDbFileName, true); + _binaryOcrDb = new BinaryOcrDb(Configuration.OcrDirectory + "Latin.db", true); } - _nOcrDb = new NOcrDb(_binaryOcrDb.FileName.Replace(".db", ".nocr")); - checkBoxNOcrCorrect.Checked = true; + checkBoxNOcrCorrect.Checked = false; _numericUpDownMaxErrorPct = (double)numericUpDownMaxErrorPct.Value; } @@ -5153,8 +5069,6 @@ namespace Nikse.SubtitleEdit.Forms.Ocr } } - _linesOcred++; - if (_abort) { textBoxCurrentText.Text = text; @@ -5206,7 +5120,6 @@ namespace Nikse.SubtitleEdit.Forms.Ocr labelStatus.Refresh(); progressBar1.Refresh(); - _linesOcred++; job.Bitmap.Dispose(); if (index >= max - 1) { @@ -5310,8 +5223,6 @@ namespace Nikse.SubtitleEdit.Forms.Ocr } } - _linesOcred++; - if (_abort) { textBoxCurrentText.Text = text; @@ -6676,48 +6587,11 @@ namespace Nikse.SubtitleEdit.Forms.Ocr private void ButtonNewCharacterDatabaseClick(object sender, EventArgs e) { - using (var newFolder = new VobSubOcrNewFolder(false)) - { - if (newFolder.ShowDialog(this) == DialogResult.OK) - { - if (_ocrMethodIndex == _ocrMethodBinaryImageCompare) - { - try - { - string fileName = Path.Combine(Configuration.OcrDirectory, newFolder.FolderName + ".db"); - if (File.Exists(fileName)) - { - MessageBox.Show("OCR db already exists!"); - return; - } - comboBoxCharacterDatabase.Items.Add(newFolder.FolderName); - comboBoxCharacterDatabase.SelectedIndex = comboBoxCharacterDatabase.Items.Count - 1; - _binaryOcrDb = new BinaryOcrDb(fileName); - _binaryOcrDb.Save(); - } - catch (Exception exception) - { - MessageBox.Show(exception.Message); - } - } - else - { - _vobSubOcrSettings.LastImageCompareFolder = newFolder.FolderName; - LoadImageCompareCharacterDatabaseList(); - LoadImageCompareBitmaps(); - } - } - } } private void ComboBoxCharacterDatabaseSelectedIndexChanged(object sender, EventArgs e) { - if (_ocrMethodIndex == _ocrMethodBinaryImageCompare) - { - _binaryOcrDbFileName = Configuration.OcrDirectory + comboBoxCharacterDatabase.SelectedItem + ".db"; - } - LoadImageCompareBitmaps(); if (_vobSubOcrSettings != null) { @@ -6741,7 +6615,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr public DialogResult EditImageCompareCharacters(string name, string text) { - using (var formVobSubEditCharacters = new VobSubEditCharacters(comboBoxCharacterDatabase.SelectedItem.ToString(), null, _binaryOcrDb)) + using (var formVobSubEditCharacters = new VobSubEditCharacters(null, _binaryOcrDb)) { formVobSubEditCharacters.Initialize(name, text); DialogResult result = formVobSubEditCharacters.ShowDialog(); @@ -6751,19 +6625,6 @@ namespace Nikse.SubtitleEdit.Forms.Ocr { _binaryOcrDb.Save(); } - else - { - _compareDoc = formVobSubEditCharacters.ImageCompareDocument; - string path = Configuration.VobSubCompareDirectory + comboBoxCharacterDatabase.SelectedItem + Path.DirectorySeparatorChar; - _compareDoc.Save(path + "Images.xml"); - Cursor = Cursors.WaitCursor; - if (formVobSubEditCharacters.ChangesMade) - { - _binaryOcrDb.LoadCompareImages(); - } - - Cursor = Cursors.Default; - } return result; } @@ -7137,7 +6998,6 @@ namespace Nikse.SubtitleEdit.Forms.Ocr ShowOcrMethodGroupBox(groupBoxImageCompareMethod); Configuration.Settings.VobSubOcr.LastOcrMethod = "BinaryImageCompare"; numericUpDownMaxErrorPct.Minimum = 0; - _binaryOcrDb = new BinaryOcrDb(_binaryOcrDbFileName, true); LoadImageCompareCharacterDatabaseList(); } else if (_ocrMethodIndex == _ocrMethodModi) @@ -7869,7 +7729,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr private void inspectLastAdditionsToolStripMenuItem_Click(object sender, EventArgs e) { - using (var formVobSubEditCharacters = new VobSubEditCharacters(comboBoxCharacterDatabase.SelectedItem.ToString(), _lastAdditions, _binaryOcrDb)) + using (var formVobSubEditCharacters = new VobSubEditCharacters(_lastAdditions, _binaryOcrDb)) { if (formVobSubEditCharacters.ShowDialog(this) == DialogResult.OK) { @@ -7878,12 +7738,6 @@ namespace Nikse.SubtitleEdit.Forms.Ocr { _binaryOcrDb.Save(); } - else - { - _compareDoc = formVobSubEditCharacters.ImageCompareDocument; - string path = Configuration.VobSubCompareDirectory + comboBoxCharacterDatabase.SelectedItem + Path.DirectorySeparatorChar; - _compareDoc.Save(path + "Images.xml"); - } } } } @@ -8076,6 +7930,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr { Configuration.Settings.VobSubOcr.XOrMorePixelsMakesSpace = (int)numericUpDownNumberOfPixelsIsSpaceNOCR.Value; } + Configuration.Settings.VobSubOcr.LineOcrMaxErrorPixels = (int)numericUpDownNumberOfPixelsIsSpaceNOCR.Value; Configuration.Settings.VobSubOcr.UseTesseractFallback = checkBoxTesseractFallback.Checked; Configuration.Settings.VobSubOcr.CaptureTopAlign = toolStripMenuItemCaptureTopAlign.Checked; @@ -8638,7 +8493,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr LoadNOcrWithCurrentLanguage(); } - using (var form = new VobSubNOcrEdit(_nOcrDb.OcrCharacters, null, _nOcrDb.FileName)) + using (var form = new VobSubNOcrEdit(_nOcrDb, null, _nOcrDb.FileName)) { if (form.ShowDialog(this) == DialogResult.OK && form.Changed) { @@ -9055,18 +8910,28 @@ namespace Nikse.SubtitleEdit.Forms.Ocr if (_ocrMethodIndex == _ocrMethodBinaryImageCompare) { var s = FindBestImageCompareDatabase(); - if (!string.IsNullOrEmpty(s) && s != Configuration.Settings.VobSubOcr.LastBinaryImageSpellCheck) + if (string.IsNullOrEmpty(s)) { - Configuration.Settings.VobSubOcr.LastBinaryImageCompareDb = s; - for (int i = 0; i < comboBoxCharacterDatabase.Items.Count; i++) + return; + } + + if (Configuration.Settings.VobSubOcr.LastBinaryImageCompareDb.Contains("+")) + { + s += "+" + Configuration.Settings.VobSubOcr.LastBinaryImageCompareDb.Split('+')[1]; + } + + Configuration.Settings.VobSubOcr.LastBinaryImageCompareDb = s; + for (int i = 0; i < comboBoxCharacterDatabase.Items.Count; i++) + { + if (comboBoxCharacterDatabase.Items[i].ToString() == Configuration.Settings.VobSubOcr.LastBinaryImageCompareDb) { - if (comboBoxCharacterDatabase.Items[i].ToString() == Configuration.Settings.VobSubOcr.LastBinaryImageCompareDb) - { - comboBoxCharacterDatabase.SelectedIndex = i; - break; - } + comboBoxCharacterDatabase.SelectedIndex = i; + return; } } + + comboBoxCharacterDatabase.Items.Insert(0, s); + comboBoxCharacterDatabase.SelectedIndex = 0; } } @@ -9209,5 +9074,19 @@ namespace Nikse.SubtitleEdit.Forms.Ocr { toolStripMenuItemSetUnItalicFactor_Click(null, null); } + + private void buttonChooseEditBinaryImageCompareDb_Click(object sender, EventArgs e) + { + using (var form = new BinaryOcrChooseEditDb(comboBoxCharacterDatabase.Text)) + { + if (form.ShowDialog(this) != DialogResult.OK) + { + return; + } + + Configuration.Settings.VobSubOcr.LastBinaryImageCompareDb = form.ImageCompareDatabaseName; + LoadImageCompareCharacterDatabaseList(); + } + } } } diff --git a/src/Forms/Ocr/VobSubOcrNOcrCharacter.Designer.cs b/src/Forms/Ocr/VobSubOcrNOcrCharacter.Designer.cs index 0c3e0d6e9..bf9f7d744 100644 --- a/src/Forms/Ocr/VobSubOcrNOcrCharacter.Designer.cs +++ b/src/Forms/Ocr/VobSubOcrNOcrCharacter.Designer.cs @@ -36,6 +36,35 @@ this.pictureBoxCharacter = new System.Windows.Forms.PictureBox(); this.labelCharactersAsText = new System.Windows.Forms.Label(); this.textBoxCharacters = new System.Windows.Forms.TextBox(); + this.buttonOK = new System.Windows.Forms.Button(); + this.buttonCancel = new System.Windows.Forms.Button(); + this.labelSubtitleImage = new System.Windows.Forms.Label(); + this.pictureBoxSubtitleImage = new System.Windows.Forms.PictureBox(); + this.groupBoxNewInput = new System.Windows.Forms.GroupBox(); + this.numericUpDownLinesToDraw = new System.Windows.Forms.NumericUpDown(); + this.labelLinestoDraw = new System.Windows.Forms.Label(); + this.buttonGuessAgain = new System.Windows.Forms.Button(); + this.checkBoxAutoSubmitOfFirstChar = new System.Windows.Forms.CheckBox(); + this.label1 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.labelItalicOn = new System.Windows.Forms.Label(); + this.checkBoxItalic = new System.Windows.Forms.CheckBox(); + this.buttonZoomOut = new System.Windows.Forms.Button(); + this.buttonZoomIn = new System.Windows.Forms.Button(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.radioButtonCold = new System.Windows.Forms.RadioButton(); + this.radioButtonHot = new System.Windows.Forms.RadioButton(); + this.label2 = new System.Windows.Forms.Label(); + this.listBoxlinesBackground = new System.Windows.Forms.ListBox(); + this.contextMenuStripLinesBackground = new System.Windows.Forms.ContextMenuStrip(this.components); + this.removeBackToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.clearToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.labelLines = new System.Windows.Forms.Label(); + this.listBoxLinesForeground = new System.Windows.Forms.ListBox(); + this.contextMenuLinesForeground = new System.Windows.Forms.ContextMenuStrip(this.components); + this.removeForegroundToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.clearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.contextMenuStripLetters = new System.Windows.Forms.ContextMenuStrip(this.components); this.latinToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.àToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); @@ -66,6 +95,19 @@ this.üToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.üToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.ßToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.italianToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.àToolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem(); + this.àToolStripMenuItem5 = new System.Windows.Forms.ToolStripMenuItem(); + this.èToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); + this.èToolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); + this.éToolStripMenuItem6 = new System.Windows.Forms.ToolStripMenuItem(); + this.éToolStripMenuItem7 = new System.Windows.Forms.ToolStripMenuItem(); + this.ìToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ìToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.òToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); + this.òToolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); + this.ùToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ùToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.nordicToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.aeToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.AeToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); @@ -77,6 +119,25 @@ this.äToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.öToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.öToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.polishToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ąToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ąToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.ćToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ćToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.ęToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ęToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.łToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.łToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.ńToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ńToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.óToolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem(); + this.óToolStripMenuItem5 = new System.Windows.Forms.ToolStripMenuItem(); + this.śToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.śToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.źToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.źToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.żToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.żToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.portugueseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ãToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ãToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); @@ -121,43 +182,14 @@ this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItemMusicSymbol1 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItemMusicSymbol2 = new System.Windows.Forms.ToolStripMenuItem(); - this.buttonOK = new System.Windows.Forms.Button(); - this.buttonCancel = new System.Windows.Forms.Button(); - this.labelSubtitleImage = new System.Windows.Forms.Label(); - this.pictureBoxSubtitleImage = new System.Windows.Forms.PictureBox(); - this.groupBoxNewInput = new System.Windows.Forms.GroupBox(); - this.numericUpDownLinesToDraw = new System.Windows.Forms.NumericUpDown(); - this.labelLinestoDraw = new System.Windows.Forms.Label(); - this.buttonGuessAgain = new System.Windows.Forms.Button(); - this.checkBoxAutoSubmitOfFirstChar = new System.Windows.Forms.CheckBox(); - this.label1 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.labelItalicOn = new System.Windows.Forms.Label(); - this.checkBoxItalic = new System.Windows.Forms.CheckBox(); - this.buttonZoomOut = new System.Windows.Forms.Button(); - this.buttonZoomIn = new System.Windows.Forms.Button(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.radioButtonCold = new System.Windows.Forms.RadioButton(); - this.radioButtonHot = new System.Windows.Forms.RadioButton(); - this.label2 = new System.Windows.Forms.Label(); - this.listBoxlinesBackground = new System.Windows.Forms.ListBox(); - this.contextMenuStripLinesBackground = new System.Windows.Forms.ContextMenuStrip(this.components); - this.removeBackToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.clearToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); - this.labelLines = new System.Windows.Forms.Label(); - this.listBoxLinesForeground = new System.Windows.Forms.ListBox(); - this.contextMenuLinesForeground = new System.Windows.Forms.ContextMenuStrip(this.components); - this.removeForegroundToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.clearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxCharacter)).BeginInit(); - this.contextMenuStripLetters.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxSubtitleImage)).BeginInit(); this.groupBoxNewInput.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLinesToDraw)).BeginInit(); this.groupBox2.SuspendLayout(); this.contextMenuStripLinesBackground.SuspendLayout(); this.contextMenuLinesForeground.SuspendLayout(); + this.contextMenuStripLetters.SuspendLayout(); this.SuspendLayout(); // // buttonShrinkSelection @@ -239,684 +271,6 @@ this.textBoxCharacters.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBoxCharacters_KeyDown); this.textBoxCharacters.KeyUp += new System.Windows.Forms.KeyEventHandler(this.textBoxCharacters_KeyUp); // - // contextMenuStripLetters - // - this.contextMenuStripLetters.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.latinToolStripMenuItem, - this.germanToolStripMenuItem, - this.nordicToolStripMenuItem, - this.portugueseToolStripMenuItem, - this.spanishToolStripMenuItem, - this.toolStripMenuItemMusicSymbol1, - this.toolStripMenuItemMusicSymbol2}); - this.contextMenuStripLetters.Name = "contextMenuStripLetters"; - this.contextMenuStripLetters.Size = new System.Drawing.Size(135, 158); - // - // latinToolStripMenuItem - // - this.latinToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.àToolStripMenuItem1, - this.àToolStripMenuItem, - this.éToolStripMenuItem3, - this.éToolStripMenuItem2, - this.èToolStripMenuItem1, - this.èToolStripMenuItem, - this.íToolStripMenuItem1, - this.íToolStripMenuItem, - this.ïToolStripMenuItem1, - this.ïToolStripMenuItem, - this.óToolStripMenuItem1, - this.óToolStripMenuItem, - this.òToolStripMenuItem, - this.òToolStripMenuItem1, - this.úToolStripMenuItem1, - this.úToolStripMenuItem, - this.üToolStripMenuItem2, - this.üToolStripMenuItem3, - this.çToolStripMenuItem1, - this.çToolStripMenuItem}); - this.latinToolStripMenuItem.Name = "latinToolStripMenuItem"; - this.latinToolStripMenuItem.Size = new System.Drawing.Size(134, 22); - this.latinToolStripMenuItem.Text = "Catalan"; - // - // àToolStripMenuItem1 - // - this.àToolStripMenuItem1.Name = "àToolStripMenuItem1"; - this.àToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); - this.àToolStripMenuItem1.Text = "à"; - this.àToolStripMenuItem1.Click += new System.EventHandler(this.InsertLetter); - // - // àToolStripMenuItem - // - this.àToolStripMenuItem.Name = "àToolStripMenuItem"; - this.àToolStripMenuItem.Size = new System.Drawing.Size(83, 22); - this.àToolStripMenuItem.Text = "À"; - this.àToolStripMenuItem.Click += new System.EventHandler(this.InsertLetter); - // - // éToolStripMenuItem3 - // - this.éToolStripMenuItem3.Name = "éToolStripMenuItem3"; - this.éToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); - this.éToolStripMenuItem3.Text = "é"; - this.éToolStripMenuItem3.Click += new System.EventHandler(this.InsertLetter); - // - // éToolStripMenuItem2 - // - this.éToolStripMenuItem2.Name = "éToolStripMenuItem2"; - this.éToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); - this.éToolStripMenuItem2.Text = "É"; - this.éToolStripMenuItem2.Click += new System.EventHandler(this.InsertLetter); - // - // èToolStripMenuItem1 - // - this.èToolStripMenuItem1.Name = "èToolStripMenuItem1"; - this.èToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); - this.èToolStripMenuItem1.Text = "è"; - this.èToolStripMenuItem1.Click += new System.EventHandler(this.InsertLetter); - // - // èToolStripMenuItem - // - this.èToolStripMenuItem.Name = "èToolStripMenuItem"; - this.èToolStripMenuItem.Size = new System.Drawing.Size(83, 22); - this.èToolStripMenuItem.Text = "È"; - this.èToolStripMenuItem.Click += new System.EventHandler(this.InsertLetter); - // - // íToolStripMenuItem1 - // - this.íToolStripMenuItem1.Name = "íToolStripMenuItem1"; - this.íToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); - this.íToolStripMenuItem1.Text = "í"; - this.íToolStripMenuItem1.Click += new System.EventHandler(this.InsertLetter); - // - // íToolStripMenuItem - // - this.íToolStripMenuItem.Name = "íToolStripMenuItem"; - this.íToolStripMenuItem.Size = new System.Drawing.Size(83, 22); - this.íToolStripMenuItem.Text = "Í"; - this.íToolStripMenuItem.Click += new System.EventHandler(this.InsertLetter); - // - // ïToolStripMenuItem1 - // - this.ïToolStripMenuItem1.Name = "ïToolStripMenuItem1"; - this.ïToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); - this.ïToolStripMenuItem1.Text = "ï"; - this.ïToolStripMenuItem1.Click += new System.EventHandler(this.InsertLetter); - // - // ïToolStripMenuItem - // - this.ïToolStripMenuItem.Name = "ïToolStripMenuItem"; - this.ïToolStripMenuItem.Size = new System.Drawing.Size(83, 22); - this.ïToolStripMenuItem.Text = "Ï"; - this.ïToolStripMenuItem.Click += new System.EventHandler(this.InsertLetter); - // - // óToolStripMenuItem1 - // - this.óToolStripMenuItem1.Name = "óToolStripMenuItem1"; - this.óToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); - this.óToolStripMenuItem1.Text = "ó"; - this.óToolStripMenuItem1.Click += new System.EventHandler(this.InsertLetter); - // - // óToolStripMenuItem - // - this.óToolStripMenuItem.Name = "óToolStripMenuItem"; - this.óToolStripMenuItem.Size = new System.Drawing.Size(83, 22); - this.óToolStripMenuItem.Text = "Ó"; - this.óToolStripMenuItem.Click += new System.EventHandler(this.InsertLetter); - // - // òToolStripMenuItem - // - this.òToolStripMenuItem.Name = "òToolStripMenuItem"; - this.òToolStripMenuItem.Size = new System.Drawing.Size(83, 22); - this.òToolStripMenuItem.Text = "ò"; - this.òToolStripMenuItem.Click += new System.EventHandler(this.InsertLetter); - // - // òToolStripMenuItem1 - // - this.òToolStripMenuItem1.Name = "òToolStripMenuItem1"; - this.òToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); - this.òToolStripMenuItem1.Text = "Ò"; - this.òToolStripMenuItem1.Click += new System.EventHandler(this.InsertLetter); - // - // úToolStripMenuItem1 - // - this.úToolStripMenuItem1.Name = "úToolStripMenuItem1"; - this.úToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); - this.úToolStripMenuItem1.Text = "ú"; - this.úToolStripMenuItem1.Click += new System.EventHandler(this.InsertLetter); - // - // úToolStripMenuItem - // - this.úToolStripMenuItem.Name = "úToolStripMenuItem"; - this.úToolStripMenuItem.Size = new System.Drawing.Size(83, 22); - this.úToolStripMenuItem.Text = "Ú"; - this.úToolStripMenuItem.Click += new System.EventHandler(this.InsertLetter); - // - // üToolStripMenuItem2 - // - this.üToolStripMenuItem2.Name = "üToolStripMenuItem2"; - this.üToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); - this.üToolStripMenuItem2.Text = "ü"; - this.üToolStripMenuItem2.Click += new System.EventHandler(this.InsertLetter); - // - // üToolStripMenuItem3 - // - this.üToolStripMenuItem3.Name = "üToolStripMenuItem3"; - this.üToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); - this.üToolStripMenuItem3.Text = "Ü"; - this.üToolStripMenuItem3.Click += new System.EventHandler(this.InsertLetter); - // - // çToolStripMenuItem1 - // - this.çToolStripMenuItem1.Name = "çToolStripMenuItem1"; - this.çToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); - this.çToolStripMenuItem1.Text = "ç"; - this.çToolStripMenuItem1.Click += new System.EventHandler(this.InsertLetter); - // - // çToolStripMenuItem - // - this.çToolStripMenuItem.Name = "çToolStripMenuItem"; - this.çToolStripMenuItem.Size = new System.Drawing.Size(83, 22); - this.çToolStripMenuItem.Text = "Ç"; - this.çToolStripMenuItem.Click += new System.EventHandler(this.InsertLetter); - // - // germanToolStripMenuItem - // - this.germanToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.äToolStripMenuItem2, - this.äToolStripMenuItem3, - this.öToolStripMenuItem2, - this.öToolStripMenuItem3, - this.üToolStripMenuItem, - this.üToolStripMenuItem1, - this.ßToolStripMenuItem}); - this.germanToolStripMenuItem.Name = "germanToolStripMenuItem"; - this.germanToolStripMenuItem.Size = new System.Drawing.Size(134, 22); - this.germanToolStripMenuItem.Text = "German"; - // - // äToolStripMenuItem2 - // - this.äToolStripMenuItem2.Name = "äToolStripMenuItem2"; - this.äToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); - this.äToolStripMenuItem2.Text = "ä"; - this.äToolStripMenuItem2.Click += new System.EventHandler(this.InsertLetter); - // - // äToolStripMenuItem3 - // - this.äToolStripMenuItem3.Name = "äToolStripMenuItem3"; - this.äToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); - this.äToolStripMenuItem3.Text = "Ä"; - this.äToolStripMenuItem3.Click += new System.EventHandler(this.InsertLetter); - // - // öToolStripMenuItem2 - // - this.öToolStripMenuItem2.Name = "öToolStripMenuItem2"; - this.öToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); - this.öToolStripMenuItem2.Text = "ö"; - this.öToolStripMenuItem2.Click += new System.EventHandler(this.InsertLetter); - // - // öToolStripMenuItem3 - // - this.öToolStripMenuItem3.Name = "öToolStripMenuItem3"; - this.öToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); - this.öToolStripMenuItem3.Text = "Ö"; - this.öToolStripMenuItem3.Click += new System.EventHandler(this.InsertLetter); - // - // üToolStripMenuItem - // - this.üToolStripMenuItem.Name = "üToolStripMenuItem"; - this.üToolStripMenuItem.Size = new System.Drawing.Size(83, 22); - this.üToolStripMenuItem.Text = "ü"; - this.üToolStripMenuItem.Click += new System.EventHandler(this.InsertLetter); - // - // üToolStripMenuItem1 - // - this.üToolStripMenuItem1.Name = "üToolStripMenuItem1"; - this.üToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); - this.üToolStripMenuItem1.Text = "Ü"; - this.üToolStripMenuItem1.Click += new System.EventHandler(this.InsertLetter); - // - // ßToolStripMenuItem - // - this.ßToolStripMenuItem.Name = "ßToolStripMenuItem"; - this.ßToolStripMenuItem.Size = new System.Drawing.Size(83, 22); - this.ßToolStripMenuItem.Text = "ß"; - this.ßToolStripMenuItem.Click += new System.EventHandler(this.InsertLetter); - // - // nordicToolStripMenuItem - // - this.nordicToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.aeToolStripMenuItem1, - this.AeToolStripMenuItem2, - this.øToolStripMenuItem, - this.øToolStripMenuItem1, - this.åToolStripMenuItem, - this.åToolStripMenuItem1, - this.äToolStripMenuItem, - this.äToolStripMenuItem1, - this.öToolStripMenuItem, - this.öToolStripMenuItem1}); - this.nordicToolStripMenuItem.Name = "nordicToolStripMenuItem"; - this.nordicToolStripMenuItem.Size = new System.Drawing.Size(134, 22); - this.nordicToolStripMenuItem.Text = "Nordic"; - // - // aeToolStripMenuItem1 - // - this.aeToolStripMenuItem1.Name = "aeToolStripMenuItem1"; - this.aeToolStripMenuItem1.Size = new System.Drawing.Size(84, 22); - this.aeToolStripMenuItem1.Text = "æ"; - this.aeToolStripMenuItem1.Click += new System.EventHandler(this.InsertLetter); - // - // AeToolStripMenuItem2 - // - this.AeToolStripMenuItem2.Name = "AeToolStripMenuItem2"; - this.AeToolStripMenuItem2.Size = new System.Drawing.Size(84, 22); - this.AeToolStripMenuItem2.Text = "Æ"; - this.AeToolStripMenuItem2.Click += new System.EventHandler(this.InsertLetter); - // - // øToolStripMenuItem - // - this.øToolStripMenuItem.Name = "øToolStripMenuItem"; - this.øToolStripMenuItem.Size = new System.Drawing.Size(84, 22); - this.øToolStripMenuItem.Text = "ø"; - this.øToolStripMenuItem.Click += new System.EventHandler(this.InsertLetter); - // - // øToolStripMenuItem1 - // - this.øToolStripMenuItem1.Name = "øToolStripMenuItem1"; - this.øToolStripMenuItem1.Size = new System.Drawing.Size(84, 22); - this.øToolStripMenuItem1.Text = "Ø"; - this.øToolStripMenuItem1.Click += new System.EventHandler(this.InsertLetter); - // - // åToolStripMenuItem - // - this.åToolStripMenuItem.Name = "åToolStripMenuItem"; - this.åToolStripMenuItem.Size = new System.Drawing.Size(84, 22); - this.åToolStripMenuItem.Text = "å"; - this.åToolStripMenuItem.Click += new System.EventHandler(this.InsertLetter); - // - // åToolStripMenuItem1 - // - this.åToolStripMenuItem1.Name = "åToolStripMenuItem1"; - this.åToolStripMenuItem1.Size = new System.Drawing.Size(84, 22); - this.åToolStripMenuItem1.Text = "Å"; - this.åToolStripMenuItem1.Click += new System.EventHandler(this.InsertLetter); - // - // äToolStripMenuItem - // - this.äToolStripMenuItem.Name = "äToolStripMenuItem"; - this.äToolStripMenuItem.Size = new System.Drawing.Size(84, 22); - this.äToolStripMenuItem.Text = "ä"; - this.äToolStripMenuItem.Click += new System.EventHandler(this.InsertLetter); - // - // äToolStripMenuItem1 - // - this.äToolStripMenuItem1.Name = "äToolStripMenuItem1"; - this.äToolStripMenuItem1.Size = new System.Drawing.Size(84, 22); - this.äToolStripMenuItem1.Text = "Ä"; - this.äToolStripMenuItem1.Click += new System.EventHandler(this.InsertLetter); - // - // öToolStripMenuItem - // - this.öToolStripMenuItem.Name = "öToolStripMenuItem"; - this.öToolStripMenuItem.Size = new System.Drawing.Size(84, 22); - this.öToolStripMenuItem.Text = "ö"; - this.öToolStripMenuItem.Click += new System.EventHandler(this.InsertLetter); - // - // öToolStripMenuItem1 - // - this.öToolStripMenuItem1.Name = "öToolStripMenuItem1"; - this.öToolStripMenuItem1.Size = new System.Drawing.Size(84, 22); - this.öToolStripMenuItem1.Text = "Ö"; - this.öToolStripMenuItem1.Click += new System.EventHandler(this.InsertLetter); - // - // portugueseToolStripMenuItem - // - this.portugueseToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.ãToolStripMenuItem, - this.ãToolStripMenuItem1, - this.õToolStripMenuItem, - this.õToolStripMenuItem1, - this.áToolStripMenuItem2, - this.áToolStripMenuItem3, - this.éToolStripMenuItem4, - this.éToolStripMenuItem5, - this.íToolStripMenuItem2, - this.íToolStripMenuItem3, - this.óToolStripMenuItem2, - this.óToolStripMenuItem3, - this.úToolStripMenuItem2, - this.úToolStripMenuItem3, - this.âToolStripMenuItem, - this.âToolStripMenuItem1, - this.êToolStripMenuItem, - this.êToolStripMenuItem1, - this.ôToolStripMenuItem1, - this.ôToolStripMenuItem, - this.àToolStripMenuItem2, - this.àToolStripMenuItem3, - this.çToolStripMenuItem2, - this.çToolStripMenuItem3}); - this.portugueseToolStripMenuItem.Name = "portugueseToolStripMenuItem"; - this.portugueseToolStripMenuItem.Size = new System.Drawing.Size(134, 22); - this.portugueseToolStripMenuItem.Text = "Portuguese"; - // - // ãToolStripMenuItem - // - this.ãToolStripMenuItem.Name = "ãToolStripMenuItem"; - this.ãToolStripMenuItem.Size = new System.Drawing.Size(83, 22); - this.ãToolStripMenuItem.Text = "ã"; - this.ãToolStripMenuItem.Click += new System.EventHandler(this.InsertLetter); - // - // ãToolStripMenuItem1 - // - this.ãToolStripMenuItem1.Name = "ãToolStripMenuItem1"; - this.ãToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); - this.ãToolStripMenuItem1.Text = "Ã"; - this.ãToolStripMenuItem1.Click += new System.EventHandler(this.InsertLetter); - // - // õToolStripMenuItem - // - this.õToolStripMenuItem.Name = "õToolStripMenuItem"; - this.õToolStripMenuItem.Size = new System.Drawing.Size(83, 22); - this.õToolStripMenuItem.Text = "õ"; - this.õToolStripMenuItem.Click += new System.EventHandler(this.InsertLetter); - // - // õToolStripMenuItem1 - // - this.õToolStripMenuItem1.Name = "õToolStripMenuItem1"; - this.õToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); - this.õToolStripMenuItem1.Text = "Õ"; - this.õToolStripMenuItem1.Click += new System.EventHandler(this.InsertLetter); - // - // áToolStripMenuItem2 - // - this.áToolStripMenuItem2.Name = "áToolStripMenuItem2"; - this.áToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); - this.áToolStripMenuItem2.Text = "á"; - this.áToolStripMenuItem2.Click += new System.EventHandler(this.InsertLetter); - // - // áToolStripMenuItem3 - // - this.áToolStripMenuItem3.Name = "áToolStripMenuItem3"; - this.áToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); - this.áToolStripMenuItem3.Text = "Á"; - this.áToolStripMenuItem3.Click += new System.EventHandler(this.InsertLetter); - // - // éToolStripMenuItem4 - // - this.éToolStripMenuItem4.Name = "éToolStripMenuItem4"; - this.éToolStripMenuItem4.Size = new System.Drawing.Size(83, 22); - this.éToolStripMenuItem4.Text = "é"; - this.éToolStripMenuItem4.Click += new System.EventHandler(this.InsertLetter); - // - // éToolStripMenuItem5 - // - this.éToolStripMenuItem5.Name = "éToolStripMenuItem5"; - this.éToolStripMenuItem5.Size = new System.Drawing.Size(83, 22); - this.éToolStripMenuItem5.Text = "É"; - this.éToolStripMenuItem5.Click += new System.EventHandler(this.InsertLetter); - // - // íToolStripMenuItem2 - // - this.íToolStripMenuItem2.Name = "íToolStripMenuItem2"; - this.íToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); - this.íToolStripMenuItem2.Text = "í"; - this.íToolStripMenuItem2.Click += new System.EventHandler(this.InsertLetter); - // - // íToolStripMenuItem3 - // - this.íToolStripMenuItem3.Name = "íToolStripMenuItem3"; - this.íToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); - this.íToolStripMenuItem3.Text = "Í"; - this.íToolStripMenuItem3.Click += new System.EventHandler(this.InsertLetter); - // - // óToolStripMenuItem2 - // - this.óToolStripMenuItem2.Name = "óToolStripMenuItem2"; - this.óToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); - this.óToolStripMenuItem2.Text = "ó"; - this.óToolStripMenuItem2.Click += new System.EventHandler(this.InsertLetter); - // - // óToolStripMenuItem3 - // - this.óToolStripMenuItem3.Name = "óToolStripMenuItem3"; - this.óToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); - this.óToolStripMenuItem3.Text = "Ó"; - this.óToolStripMenuItem3.Click += new System.EventHandler(this.InsertLetter); - // - // úToolStripMenuItem2 - // - this.úToolStripMenuItem2.Name = "úToolStripMenuItem2"; - this.úToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); - this.úToolStripMenuItem2.Text = "ú"; - this.úToolStripMenuItem2.Click += new System.EventHandler(this.InsertLetter); - // - // úToolStripMenuItem3 - // - this.úToolStripMenuItem3.Name = "úToolStripMenuItem3"; - this.úToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); - this.úToolStripMenuItem3.Text = "Ú"; - this.úToolStripMenuItem3.Click += new System.EventHandler(this.InsertLetter); - // - // âToolStripMenuItem - // - this.âToolStripMenuItem.Name = "âToolStripMenuItem"; - this.âToolStripMenuItem.Size = new System.Drawing.Size(83, 22); - this.âToolStripMenuItem.Text = "â"; - this.âToolStripMenuItem.Click += new System.EventHandler(this.InsertLetter); - // - // âToolStripMenuItem1 - // - this.âToolStripMenuItem1.Name = "âToolStripMenuItem1"; - this.âToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); - this.âToolStripMenuItem1.Text = "Â"; - this.âToolStripMenuItem1.Click += new System.EventHandler(this.InsertLetter); - // - // êToolStripMenuItem - // - this.êToolStripMenuItem.Name = "êToolStripMenuItem"; - this.êToolStripMenuItem.Size = new System.Drawing.Size(83, 22); - this.êToolStripMenuItem.Text = "ê"; - this.êToolStripMenuItem.Click += new System.EventHandler(this.InsertLetter); - // - // êToolStripMenuItem1 - // - this.êToolStripMenuItem1.Name = "êToolStripMenuItem1"; - this.êToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); - this.êToolStripMenuItem1.Text = "Ê"; - this.êToolStripMenuItem1.Click += new System.EventHandler(this.InsertLetter); - // - // ôToolStripMenuItem1 - // - this.ôToolStripMenuItem1.Name = "ôToolStripMenuItem1"; - this.ôToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); - this.ôToolStripMenuItem1.Text = "ô"; - this.ôToolStripMenuItem1.Click += new System.EventHandler(this.InsertLetter); - // - // ôToolStripMenuItem - // - this.ôToolStripMenuItem.Name = "ôToolStripMenuItem"; - this.ôToolStripMenuItem.Size = new System.Drawing.Size(83, 22); - this.ôToolStripMenuItem.Text = "Ô"; - this.ôToolStripMenuItem.Click += new System.EventHandler(this.InsertLetter); - // - // àToolStripMenuItem2 - // - this.àToolStripMenuItem2.Name = "àToolStripMenuItem2"; - this.àToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); - this.àToolStripMenuItem2.Text = "à"; - this.àToolStripMenuItem2.Click += new System.EventHandler(this.InsertLetter); - // - // àToolStripMenuItem3 - // - this.àToolStripMenuItem3.Name = "àToolStripMenuItem3"; - this.àToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); - this.àToolStripMenuItem3.Text = "À"; - this.àToolStripMenuItem3.Click += new System.EventHandler(this.InsertLetter); - // - // çToolStripMenuItem2 - // - this.çToolStripMenuItem2.Name = "çToolStripMenuItem2"; - this.çToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); - this.çToolStripMenuItem2.Text = "ç"; - this.çToolStripMenuItem2.Click += new System.EventHandler(this.InsertLetter); - // - // çToolStripMenuItem3 - // - this.çToolStripMenuItem3.Name = "çToolStripMenuItem3"; - this.çToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); - this.çToolStripMenuItem3.Text = "Ç"; - this.çToolStripMenuItem3.Click += new System.EventHandler(this.InsertLetter); - // - // spanishToolStripMenuItem - // - this.spanishToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.áToolStripMenuItem, - this.áToolStripMenuItem1, - this.éToolStripMenuItem, - this.éToolStripMenuItem1, - this.toolStripMenuItem1, - this.toolStripMenuItem6, - this.toolStripMenuItem4, - this.toolStripMenuItem7, - this.toolStripMenuItem5, - this.toolStripMenuItem8, - this.toolStripMenuItem9, - this.toolStripMenuItem10, - this.ñToolStripMenuItem, - this.ñToolStripMenuItem1, - this.toolStripMenuItem2, - this.toolStripMenuItem3}); - this.spanishToolStripMenuItem.Name = "spanishToolStripMenuItem"; - this.spanishToolStripMenuItem.Size = new System.Drawing.Size(134, 22); - this.spanishToolStripMenuItem.Text = "Spanish"; - // - // áToolStripMenuItem - // - this.áToolStripMenuItem.Name = "áToolStripMenuItem"; - this.áToolStripMenuItem.Size = new System.Drawing.Size(83, 22); - this.áToolStripMenuItem.Text = "á"; - this.áToolStripMenuItem.Click += new System.EventHandler(this.InsertLetter); - // - // áToolStripMenuItem1 - // - this.áToolStripMenuItem1.Name = "áToolStripMenuItem1"; - this.áToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); - this.áToolStripMenuItem1.Text = "Á"; - this.áToolStripMenuItem1.Click += new System.EventHandler(this.InsertLetter); - // - // éToolStripMenuItem - // - this.éToolStripMenuItem.Name = "éToolStripMenuItem"; - this.éToolStripMenuItem.Size = new System.Drawing.Size(83, 22); - this.éToolStripMenuItem.Text = "é"; - this.éToolStripMenuItem.Click += new System.EventHandler(this.InsertLetter); - // - // éToolStripMenuItem1 - // - this.éToolStripMenuItem1.Name = "éToolStripMenuItem1"; - this.éToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); - this.éToolStripMenuItem1.Text = "É"; - this.éToolStripMenuItem1.Click += new System.EventHandler(this.InsertLetter); - // - // toolStripMenuItem1 - // - this.toolStripMenuItem1.Name = "toolStripMenuItem1"; - this.toolStripMenuItem1.Size = new System.Drawing.Size(83, 22); - this.toolStripMenuItem1.Text = "í"; - this.toolStripMenuItem1.Click += new System.EventHandler(this.InsertLetter); - // - // toolStripMenuItem6 - // - this.toolStripMenuItem6.Name = "toolStripMenuItem6"; - this.toolStripMenuItem6.Size = new System.Drawing.Size(83, 22); - this.toolStripMenuItem6.Text = "Í"; - this.toolStripMenuItem6.Click += new System.EventHandler(this.InsertLetter); - // - // toolStripMenuItem4 - // - this.toolStripMenuItem4.Name = "toolStripMenuItem4"; - this.toolStripMenuItem4.Size = new System.Drawing.Size(83, 22); - this.toolStripMenuItem4.Text = "ó"; - this.toolStripMenuItem4.Click += new System.EventHandler(this.InsertLetter); - // - // toolStripMenuItem7 - // - this.toolStripMenuItem7.Name = "toolStripMenuItem7"; - this.toolStripMenuItem7.Size = new System.Drawing.Size(83, 22); - this.toolStripMenuItem7.Text = "Ó"; - this.toolStripMenuItem7.Click += new System.EventHandler(this.InsertLetter); - // - // toolStripMenuItem5 - // - this.toolStripMenuItem5.Name = "toolStripMenuItem5"; - this.toolStripMenuItem5.Size = new System.Drawing.Size(83, 22); - this.toolStripMenuItem5.Text = "ú"; - this.toolStripMenuItem5.Click += new System.EventHandler(this.InsertLetter); - // - // toolStripMenuItem8 - // - this.toolStripMenuItem8.Name = "toolStripMenuItem8"; - this.toolStripMenuItem8.Size = new System.Drawing.Size(83, 22); - this.toolStripMenuItem8.Text = "Ú"; - this.toolStripMenuItem8.Click += new System.EventHandler(this.InsertLetter); - // - // toolStripMenuItem9 - // - this.toolStripMenuItem9.Name = "toolStripMenuItem9"; - this.toolStripMenuItem9.Size = new System.Drawing.Size(83, 22); - this.toolStripMenuItem9.Text = "ü"; - this.toolStripMenuItem9.Click += new System.EventHandler(this.InsertLetter); - // - // toolStripMenuItem10 - // - this.toolStripMenuItem10.Name = "toolStripMenuItem10"; - this.toolStripMenuItem10.Size = new System.Drawing.Size(83, 22); - this.toolStripMenuItem10.Text = "Ü"; - this.toolStripMenuItem10.Click += new System.EventHandler(this.InsertLetter); - // - // ñToolStripMenuItem - // - this.ñToolStripMenuItem.Name = "ñToolStripMenuItem"; - this.ñToolStripMenuItem.Size = new System.Drawing.Size(83, 22); - this.ñToolStripMenuItem.Text = "ñ"; - this.ñToolStripMenuItem.Click += new System.EventHandler(this.InsertLetter); - // - // ñToolStripMenuItem1 - // - this.ñToolStripMenuItem1.Name = "ñToolStripMenuItem1"; - this.ñToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); - this.ñToolStripMenuItem1.Text = "Ñ"; - this.ñToolStripMenuItem1.Click += new System.EventHandler(this.InsertLetter); - // - // toolStripMenuItem2 - // - this.toolStripMenuItem2.Name = "toolStripMenuItem2"; - this.toolStripMenuItem2.Size = new System.Drawing.Size(83, 22); - this.toolStripMenuItem2.Text = "¿"; - this.toolStripMenuItem2.Click += new System.EventHandler(this.InsertLetter); - // - // toolStripMenuItem3 - // - this.toolStripMenuItem3.Name = "toolStripMenuItem3"; - this.toolStripMenuItem3.Size = new System.Drawing.Size(83, 22); - this.toolStripMenuItem3.Text = "¡"; - this.toolStripMenuItem3.Click += new System.EventHandler(this.InsertLetter); - // - // toolStripMenuItemMusicSymbol1 - // - this.toolStripMenuItemMusicSymbol1.Name = "toolStripMenuItemMusicSymbol1"; - this.toolStripMenuItemMusicSymbol1.Size = new System.Drawing.Size(134, 22); - this.toolStripMenuItemMusicSymbol1.Text = "♪"; - this.toolStripMenuItemMusicSymbol1.Click += new System.EventHandler(this.toolStripMenuItemMusicSymbol1_Click); - // - // toolStripMenuItemMusicSymbol2 - // - this.toolStripMenuItemMusicSymbol2.Name = "toolStripMenuItemMusicSymbol2"; - this.toolStripMenuItemMusicSymbol2.Size = new System.Drawing.Size(134, 22); - this.toolStripMenuItemMusicSymbol2.Text = "♫"; - this.toolStripMenuItemMusicSymbol2.Click += new System.EventHandler(this.toolStripMenuItemMusicSymbol2_Click); - // // buttonOK // this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); @@ -1160,6 +514,7 @@ this.listBoxlinesBackground.Size = new System.Drawing.Size(151, 95); this.listBoxlinesBackground.TabIndex = 19; this.listBoxlinesBackground.SelectedIndexChanged += new System.EventHandler(this.listBoxlinesBackground_SelectedIndexChanged); + this.listBoxlinesBackground.KeyDown += new System.Windows.Forms.KeyEventHandler(this.listBoxLinesBackground_KeyDown); // // contextMenuStripLinesBackground // @@ -1174,7 +529,7 @@ this.removeBackToolStripMenuItem.Name = "removeBackToolStripMenuItem"; this.removeBackToolStripMenuItem.Size = new System.Drawing.Size(117, 22); this.removeBackToolStripMenuItem.Text = "Remove"; - this.removeBackToolStripMenuItem.Click += new System.EventHandler(this.removeForegroundToolStripMenuItem_Click); + this.removeBackToolStripMenuItem.Click += new System.EventHandler(this.removeBackgroundLineToolStripMenuItem_Click); // // clearToolStripMenuItem1 // @@ -1201,6 +556,8 @@ this.listBoxLinesForeground.Size = new System.Drawing.Size(151, 108); this.listBoxLinesForeground.TabIndex = 17; this.listBoxLinesForeground.SelectedIndexChanged += new System.EventHandler(this.listBoxLinesForeground_SelectedIndexChanged); + this.listBoxLinesForeground.KeyDown += new System.Windows.Forms.KeyEventHandler(this.listBoxLinesForeground_KeyDown); + this.listBoxLinesForeground.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.listBoxLinesForeground_KeyPress); // // contextMenuLinesForeground // @@ -1215,7 +572,7 @@ this.removeForegroundToolStripMenuItem.Name = "removeForegroundToolStripMenuItem"; this.removeForegroundToolStripMenuItem.Size = new System.Drawing.Size(117, 22); this.removeForegroundToolStripMenuItem.Text = "Remove"; - this.removeForegroundToolStripMenuItem.Click += new System.EventHandler(this.removeForegroundToolStripMenuItem_Click_1); + this.removeForegroundToolStripMenuItem.Click += new System.EventHandler(this.removeForegroundToolStripMenuItem_Click); // // clearToolStripMenuItem // @@ -1224,6 +581,831 @@ this.clearToolStripMenuItem.Text = "Clear"; this.clearToolStripMenuItem.Click += new System.EventHandler(this.clearToolStripMenuItem_Click); // + // contextMenuStripLetters + // + this.contextMenuStripLetters.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.latinToolStripMenuItem, + this.germanToolStripMenuItem, + this.italianToolStripMenuItem, + this.nordicToolStripMenuItem, + this.polishToolStripMenuItem, + this.portugueseToolStripMenuItem, + this.spanishToolStripMenuItem, + this.toolStripMenuItemMusicSymbol1, + this.toolStripMenuItemMusicSymbol2}); + this.contextMenuStripLetters.Name = "contextMenuStripLetters"; + this.contextMenuStripLetters.Size = new System.Drawing.Size(135, 202); + // + // latinToolStripMenuItem + // + this.latinToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.àToolStripMenuItem1, + this.àToolStripMenuItem, + this.éToolStripMenuItem3, + this.éToolStripMenuItem2, + this.èToolStripMenuItem1, + this.èToolStripMenuItem, + this.íToolStripMenuItem1, + this.íToolStripMenuItem, + this.ïToolStripMenuItem1, + this.ïToolStripMenuItem, + this.óToolStripMenuItem1, + this.óToolStripMenuItem, + this.òToolStripMenuItem, + this.òToolStripMenuItem1, + this.úToolStripMenuItem1, + this.úToolStripMenuItem, + this.üToolStripMenuItem2, + this.üToolStripMenuItem3, + this.çToolStripMenuItem1, + this.çToolStripMenuItem}); + this.latinToolStripMenuItem.Name = "latinToolStripMenuItem"; + this.latinToolStripMenuItem.Size = new System.Drawing.Size(134, 22); + this.latinToolStripMenuItem.Text = "Catalan"; + // + // àToolStripMenuItem1 + // + this.àToolStripMenuItem1.Name = "àToolStripMenuItem1"; + this.àToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.àToolStripMenuItem1.Text = "à"; + // + // àToolStripMenuItem + // + this.àToolStripMenuItem.Name = "àToolStripMenuItem"; + this.àToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.àToolStripMenuItem.Text = "À"; + // + // éToolStripMenuItem3 + // + this.éToolStripMenuItem3.Name = "éToolStripMenuItem3"; + this.éToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); + this.éToolStripMenuItem3.Text = "é"; + // + // éToolStripMenuItem2 + // + this.éToolStripMenuItem2.Name = "éToolStripMenuItem2"; + this.éToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); + this.éToolStripMenuItem2.Text = "É"; + // + // èToolStripMenuItem1 + // + this.èToolStripMenuItem1.Name = "èToolStripMenuItem1"; + this.èToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.èToolStripMenuItem1.Text = "è"; + // + // èToolStripMenuItem + // + this.èToolStripMenuItem.Name = "èToolStripMenuItem"; + this.èToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.èToolStripMenuItem.Text = "È"; + // + // íToolStripMenuItem1 + // + this.íToolStripMenuItem1.Name = "íToolStripMenuItem1"; + this.íToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.íToolStripMenuItem1.Text = "í"; + // + // íToolStripMenuItem + // + this.íToolStripMenuItem.Name = "íToolStripMenuItem"; + this.íToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.íToolStripMenuItem.Text = "Í"; + // + // ïToolStripMenuItem1 + // + this.ïToolStripMenuItem1.Name = "ïToolStripMenuItem1"; + this.ïToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.ïToolStripMenuItem1.Text = "ï"; + // + // ïToolStripMenuItem + // + this.ïToolStripMenuItem.Name = "ïToolStripMenuItem"; + this.ïToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.ïToolStripMenuItem.Text = "Ï"; + // + // óToolStripMenuItem1 + // + this.óToolStripMenuItem1.Name = "óToolStripMenuItem1"; + this.óToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.óToolStripMenuItem1.Text = "ó"; + // + // óToolStripMenuItem + // + this.óToolStripMenuItem.Name = "óToolStripMenuItem"; + this.óToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.óToolStripMenuItem.Text = "Ó"; + // + // òToolStripMenuItem + // + this.òToolStripMenuItem.Name = "òToolStripMenuItem"; + this.òToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.òToolStripMenuItem.Text = "ò"; + // + // òToolStripMenuItem1 + // + this.òToolStripMenuItem1.Name = "òToolStripMenuItem1"; + this.òToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.òToolStripMenuItem1.Text = "Ò"; + // + // úToolStripMenuItem1 + // + this.úToolStripMenuItem1.Name = "úToolStripMenuItem1"; + this.úToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.úToolStripMenuItem1.Text = "ú"; + // + // úToolStripMenuItem + // + this.úToolStripMenuItem.Name = "úToolStripMenuItem"; + this.úToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.úToolStripMenuItem.Text = "Ú"; + // + // üToolStripMenuItem2 + // + this.üToolStripMenuItem2.Name = "üToolStripMenuItem2"; + this.üToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); + this.üToolStripMenuItem2.Text = "ü"; + // + // üToolStripMenuItem3 + // + this.üToolStripMenuItem3.Name = "üToolStripMenuItem3"; + this.üToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); + this.üToolStripMenuItem3.Text = "Ü"; + // + // çToolStripMenuItem1 + // + this.çToolStripMenuItem1.Name = "çToolStripMenuItem1"; + this.çToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.çToolStripMenuItem1.Text = "ç"; + // + // çToolStripMenuItem + // + this.çToolStripMenuItem.Name = "çToolStripMenuItem"; + this.çToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.çToolStripMenuItem.Text = "Ç"; + // + // germanToolStripMenuItem + // + this.germanToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.äToolStripMenuItem2, + this.äToolStripMenuItem3, + this.öToolStripMenuItem2, + this.öToolStripMenuItem3, + this.üToolStripMenuItem, + this.üToolStripMenuItem1, + this.ßToolStripMenuItem}); + this.germanToolStripMenuItem.Name = "germanToolStripMenuItem"; + this.germanToolStripMenuItem.Size = new System.Drawing.Size(134, 22); + this.germanToolStripMenuItem.Text = "German"; + // + // äToolStripMenuItem2 + // + this.äToolStripMenuItem2.Name = "äToolStripMenuItem2"; + this.äToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); + this.äToolStripMenuItem2.Text = "ä"; + // + // äToolStripMenuItem3 + // + this.äToolStripMenuItem3.Name = "äToolStripMenuItem3"; + this.äToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); + this.äToolStripMenuItem3.Text = "Ä"; + // + // öToolStripMenuItem2 + // + this.öToolStripMenuItem2.Name = "öToolStripMenuItem2"; + this.öToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); + this.öToolStripMenuItem2.Text = "ö"; + // + // öToolStripMenuItem3 + // + this.öToolStripMenuItem3.Name = "öToolStripMenuItem3"; + this.öToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); + this.öToolStripMenuItem3.Text = "Ö"; + // + // üToolStripMenuItem + // + this.üToolStripMenuItem.Name = "üToolStripMenuItem"; + this.üToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.üToolStripMenuItem.Text = "ü"; + // + // üToolStripMenuItem1 + // + this.üToolStripMenuItem1.Name = "üToolStripMenuItem1"; + this.üToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.üToolStripMenuItem1.Text = "Ü"; + // + // ßToolStripMenuItem + // + this.ßToolStripMenuItem.Name = "ßToolStripMenuItem"; + this.ßToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.ßToolStripMenuItem.Text = "ß"; + // + // italianToolStripMenuItem + // + this.italianToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.àToolStripMenuItem4, + this.àToolStripMenuItem5, + this.èToolStripMenuItem2, + this.èToolStripMenuItem3, + this.éToolStripMenuItem6, + this.éToolStripMenuItem7, + this.ìToolStripMenuItem, + this.ìToolStripMenuItem1, + this.òToolStripMenuItem2, + this.òToolStripMenuItem3, + this.ùToolStripMenuItem, + this.ùToolStripMenuItem1}); + this.italianToolStripMenuItem.Name = "italianToolStripMenuItem"; + this.italianToolStripMenuItem.Size = new System.Drawing.Size(134, 22); + this.italianToolStripMenuItem.Text = "Italian"; + // + // àToolStripMenuItem4 + // + this.àToolStripMenuItem4.Name = "àToolStripMenuItem4"; + this.àToolStripMenuItem4.Size = new System.Drawing.Size(83, 22); + this.àToolStripMenuItem4.Text = "à"; + // + // àToolStripMenuItem5 + // + this.àToolStripMenuItem5.Name = "àToolStripMenuItem5"; + this.àToolStripMenuItem5.Size = new System.Drawing.Size(83, 22); + this.àToolStripMenuItem5.Text = "À"; + // + // èToolStripMenuItem2 + // + this.èToolStripMenuItem2.Name = "èToolStripMenuItem2"; + this.èToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); + this.èToolStripMenuItem2.Text = "è"; + // + // èToolStripMenuItem3 + // + this.èToolStripMenuItem3.Name = "èToolStripMenuItem3"; + this.èToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); + this.èToolStripMenuItem3.Text = "È"; + // + // éToolStripMenuItem6 + // + this.éToolStripMenuItem6.Name = "éToolStripMenuItem6"; + this.éToolStripMenuItem6.Size = new System.Drawing.Size(83, 22); + this.éToolStripMenuItem6.Text = "é"; + // + // éToolStripMenuItem7 + // + this.éToolStripMenuItem7.Name = "éToolStripMenuItem7"; + this.éToolStripMenuItem7.Size = new System.Drawing.Size(83, 22); + this.éToolStripMenuItem7.Text = "É"; + // + // ìToolStripMenuItem + // + this.ìToolStripMenuItem.Name = "ìToolStripMenuItem"; + this.ìToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.ìToolStripMenuItem.Text = "ì"; + // + // ìToolStripMenuItem1 + // + this.ìToolStripMenuItem1.Name = "ìToolStripMenuItem1"; + this.ìToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.ìToolStripMenuItem1.Text = "Ì"; + // + // òToolStripMenuItem2 + // + this.òToolStripMenuItem2.Name = "òToolStripMenuItem2"; + this.òToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); + this.òToolStripMenuItem2.Text = "ò"; + // + // òToolStripMenuItem3 + // + this.òToolStripMenuItem3.Name = "òToolStripMenuItem3"; + this.òToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); + this.òToolStripMenuItem3.Text = "Ò"; + // + // ùToolStripMenuItem + // + this.ùToolStripMenuItem.Name = "ùToolStripMenuItem"; + this.ùToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.ùToolStripMenuItem.Text = "ù"; + // + // ùToolStripMenuItem1 + // + this.ùToolStripMenuItem1.Name = "ùToolStripMenuItem1"; + this.ùToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.ùToolStripMenuItem1.Text = "Ù"; + // + // nordicToolStripMenuItem + // + this.nordicToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.aeToolStripMenuItem1, + this.AeToolStripMenuItem2, + this.øToolStripMenuItem, + this.øToolStripMenuItem1, + this.åToolStripMenuItem, + this.åToolStripMenuItem1, + this.äToolStripMenuItem, + this.äToolStripMenuItem1, + this.öToolStripMenuItem, + this.öToolStripMenuItem1}); + this.nordicToolStripMenuItem.Name = "nordicToolStripMenuItem"; + this.nordicToolStripMenuItem.Size = new System.Drawing.Size(134, 22); + this.nordicToolStripMenuItem.Text = "Nordic"; + // + // aeToolStripMenuItem1 + // + this.aeToolStripMenuItem1.Name = "aeToolStripMenuItem1"; + this.aeToolStripMenuItem1.Size = new System.Drawing.Size(84, 22); + this.aeToolStripMenuItem1.Text = "æ"; + // + // AeToolStripMenuItem2 + // + this.AeToolStripMenuItem2.Name = "AeToolStripMenuItem2"; + this.AeToolStripMenuItem2.Size = new System.Drawing.Size(84, 22); + this.AeToolStripMenuItem2.Text = "Æ"; + // + // øToolStripMenuItem + // + this.øToolStripMenuItem.Name = "øToolStripMenuItem"; + this.øToolStripMenuItem.Size = new System.Drawing.Size(84, 22); + this.øToolStripMenuItem.Text = "ø"; + // + // øToolStripMenuItem1 + // + this.øToolStripMenuItem1.Name = "øToolStripMenuItem1"; + this.øToolStripMenuItem1.Size = new System.Drawing.Size(84, 22); + this.øToolStripMenuItem1.Text = "Ø"; + // + // åToolStripMenuItem + // + this.åToolStripMenuItem.Name = "åToolStripMenuItem"; + this.åToolStripMenuItem.Size = new System.Drawing.Size(84, 22); + this.åToolStripMenuItem.Text = "å"; + // + // åToolStripMenuItem1 + // + this.åToolStripMenuItem1.Name = "åToolStripMenuItem1"; + this.åToolStripMenuItem1.Size = new System.Drawing.Size(84, 22); + this.åToolStripMenuItem1.Text = "Å"; + // + // äToolStripMenuItem + // + this.äToolStripMenuItem.Name = "äToolStripMenuItem"; + this.äToolStripMenuItem.Size = new System.Drawing.Size(84, 22); + this.äToolStripMenuItem.Text = "ä"; + // + // äToolStripMenuItem1 + // + this.äToolStripMenuItem1.Name = "äToolStripMenuItem1"; + this.äToolStripMenuItem1.Size = new System.Drawing.Size(84, 22); + this.äToolStripMenuItem1.Text = "Ä"; + // + // öToolStripMenuItem + // + this.öToolStripMenuItem.Name = "öToolStripMenuItem"; + this.öToolStripMenuItem.Size = new System.Drawing.Size(84, 22); + this.öToolStripMenuItem.Text = "ö"; + // + // öToolStripMenuItem1 + // + this.öToolStripMenuItem1.Name = "öToolStripMenuItem1"; + this.öToolStripMenuItem1.Size = new System.Drawing.Size(84, 22); + this.öToolStripMenuItem1.Text = "Ö"; + // + // polishToolStripMenuItem + // + this.polishToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.ąToolStripMenuItem, + this.ąToolStripMenuItem1, + this.ćToolStripMenuItem, + this.ćToolStripMenuItem1, + this.ęToolStripMenuItem, + this.ęToolStripMenuItem1, + this.łToolStripMenuItem, + this.łToolStripMenuItem1, + this.ńToolStripMenuItem, + this.ńToolStripMenuItem1, + this.óToolStripMenuItem4, + this.óToolStripMenuItem5, + this.śToolStripMenuItem, + this.śToolStripMenuItem1, + this.źToolStripMenuItem, + this.źToolStripMenuItem1, + this.żToolStripMenuItem, + this.żToolStripMenuItem1}); + this.polishToolStripMenuItem.Name = "polishToolStripMenuItem"; + this.polishToolStripMenuItem.Size = new System.Drawing.Size(134, 22); + this.polishToolStripMenuItem.Text = "Polish"; + // + // ąToolStripMenuItem + // + this.ąToolStripMenuItem.Name = "ąToolStripMenuItem"; + this.ąToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.ąToolStripMenuItem.Text = "ą"; + // + // ąToolStripMenuItem1 + // + this.ąToolStripMenuItem1.Name = "ąToolStripMenuItem1"; + this.ąToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.ąToolStripMenuItem1.Text = "Ą"; + // + // ćToolStripMenuItem + // + this.ćToolStripMenuItem.Name = "ćToolStripMenuItem"; + this.ćToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.ćToolStripMenuItem.Text = "ć"; + // + // ćToolStripMenuItem1 + // + this.ćToolStripMenuItem1.Name = "ćToolStripMenuItem1"; + this.ćToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.ćToolStripMenuItem1.Text = "Ć"; + // + // ęToolStripMenuItem + // + this.ęToolStripMenuItem.Name = "ęToolStripMenuItem"; + this.ęToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.ęToolStripMenuItem.Text = "ę"; + // + // ęToolStripMenuItem1 + // + this.ęToolStripMenuItem1.Name = "ęToolStripMenuItem1"; + this.ęToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.ęToolStripMenuItem1.Text = "Ę"; + // + // łToolStripMenuItem + // + this.łToolStripMenuItem.Name = "łToolStripMenuItem"; + this.łToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.łToolStripMenuItem.Text = "ł"; + // + // łToolStripMenuItem1 + // + this.łToolStripMenuItem1.Name = "łToolStripMenuItem1"; + this.łToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.łToolStripMenuItem1.Text = "Ł"; + // + // ńToolStripMenuItem + // + this.ńToolStripMenuItem.Name = "ńToolStripMenuItem"; + this.ńToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.ńToolStripMenuItem.Text = "ń"; + // + // ńToolStripMenuItem1 + // + this.ńToolStripMenuItem1.Name = "ńToolStripMenuItem1"; + this.ńToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.ńToolStripMenuItem1.Text = "Ń"; + // + // óToolStripMenuItem4 + // + this.óToolStripMenuItem4.Name = "óToolStripMenuItem4"; + this.óToolStripMenuItem4.Size = new System.Drawing.Size(83, 22); + this.óToolStripMenuItem4.Text = "ó"; + // + // óToolStripMenuItem5 + // + this.óToolStripMenuItem5.Name = "óToolStripMenuItem5"; + this.óToolStripMenuItem5.Size = new System.Drawing.Size(83, 22); + this.óToolStripMenuItem5.Text = "Ó"; + // + // śToolStripMenuItem + // + this.śToolStripMenuItem.Name = "śToolStripMenuItem"; + this.śToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.śToolStripMenuItem.Text = "ś"; + // + // śToolStripMenuItem1 + // + this.śToolStripMenuItem1.Name = "śToolStripMenuItem1"; + this.śToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.śToolStripMenuItem1.Text = "Ś"; + // + // źToolStripMenuItem + // + this.źToolStripMenuItem.Name = "źToolStripMenuItem"; + this.źToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.źToolStripMenuItem.Text = "ź"; + // + // źToolStripMenuItem1 + // + this.źToolStripMenuItem1.Name = "źToolStripMenuItem1"; + this.źToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.źToolStripMenuItem1.Text = "Ź"; + // + // żToolStripMenuItem + // + this.żToolStripMenuItem.Name = "żToolStripMenuItem"; + this.żToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.żToolStripMenuItem.Text = "ż"; + // + // żToolStripMenuItem1 + // + this.żToolStripMenuItem1.Name = "żToolStripMenuItem1"; + this.żToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.żToolStripMenuItem1.Text = "Ż"; + // + // portugueseToolStripMenuItem + // + this.portugueseToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.ãToolStripMenuItem, + this.ãToolStripMenuItem1, + this.õToolStripMenuItem, + this.õToolStripMenuItem1, + this.áToolStripMenuItem2, + this.áToolStripMenuItem3, + this.éToolStripMenuItem4, + this.éToolStripMenuItem5, + this.íToolStripMenuItem2, + this.íToolStripMenuItem3, + this.óToolStripMenuItem2, + this.óToolStripMenuItem3, + this.úToolStripMenuItem2, + this.úToolStripMenuItem3, + this.âToolStripMenuItem, + this.âToolStripMenuItem1, + this.êToolStripMenuItem, + this.êToolStripMenuItem1, + this.ôToolStripMenuItem1, + this.ôToolStripMenuItem, + this.àToolStripMenuItem2, + this.àToolStripMenuItem3, + this.çToolStripMenuItem2, + this.çToolStripMenuItem3}); + this.portugueseToolStripMenuItem.Name = "portugueseToolStripMenuItem"; + this.portugueseToolStripMenuItem.Size = new System.Drawing.Size(134, 22); + this.portugueseToolStripMenuItem.Text = "Portuguese"; + // + // ãToolStripMenuItem + // + this.ãToolStripMenuItem.Name = "ãToolStripMenuItem"; + this.ãToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.ãToolStripMenuItem.Text = "ã"; + // + // ãToolStripMenuItem1 + // + this.ãToolStripMenuItem1.Name = "ãToolStripMenuItem1"; + this.ãToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.ãToolStripMenuItem1.Text = "Ã"; + // + // õToolStripMenuItem + // + this.õToolStripMenuItem.Name = "õToolStripMenuItem"; + this.õToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.õToolStripMenuItem.Text = "õ"; + // + // õToolStripMenuItem1 + // + this.õToolStripMenuItem1.Name = "õToolStripMenuItem1"; + this.õToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.õToolStripMenuItem1.Text = "Õ"; + // + // áToolStripMenuItem2 + // + this.áToolStripMenuItem2.Name = "áToolStripMenuItem2"; + this.áToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); + this.áToolStripMenuItem2.Text = "á"; + // + // áToolStripMenuItem3 + // + this.áToolStripMenuItem3.Name = "áToolStripMenuItem3"; + this.áToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); + this.áToolStripMenuItem3.Text = "Á"; + // + // éToolStripMenuItem4 + // + this.éToolStripMenuItem4.Name = "éToolStripMenuItem4"; + this.éToolStripMenuItem4.Size = new System.Drawing.Size(83, 22); + this.éToolStripMenuItem4.Text = "é"; + // + // éToolStripMenuItem5 + // + this.éToolStripMenuItem5.Name = "éToolStripMenuItem5"; + this.éToolStripMenuItem5.Size = new System.Drawing.Size(83, 22); + this.éToolStripMenuItem5.Text = "É"; + // + // íToolStripMenuItem2 + // + this.íToolStripMenuItem2.Name = "íToolStripMenuItem2"; + this.íToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); + this.íToolStripMenuItem2.Text = "í"; + // + // íToolStripMenuItem3 + // + this.íToolStripMenuItem3.Name = "íToolStripMenuItem3"; + this.íToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); + this.íToolStripMenuItem3.Text = "Í"; + // + // óToolStripMenuItem2 + // + this.óToolStripMenuItem2.Name = "óToolStripMenuItem2"; + this.óToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); + this.óToolStripMenuItem2.Text = "ó"; + // + // óToolStripMenuItem3 + // + this.óToolStripMenuItem3.Name = "óToolStripMenuItem3"; + this.óToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); + this.óToolStripMenuItem3.Text = "Ó"; + // + // úToolStripMenuItem2 + // + this.úToolStripMenuItem2.Name = "úToolStripMenuItem2"; + this.úToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); + this.úToolStripMenuItem2.Text = "ú"; + // + // úToolStripMenuItem3 + // + this.úToolStripMenuItem3.Name = "úToolStripMenuItem3"; + this.úToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); + this.úToolStripMenuItem3.Text = "Ú"; + // + // âToolStripMenuItem + // + this.âToolStripMenuItem.Name = "âToolStripMenuItem"; + this.âToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.âToolStripMenuItem.Text = "â"; + // + // âToolStripMenuItem1 + // + this.âToolStripMenuItem1.Name = "âToolStripMenuItem1"; + this.âToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.âToolStripMenuItem1.Text = "Â"; + // + // êToolStripMenuItem + // + this.êToolStripMenuItem.Name = "êToolStripMenuItem"; + this.êToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.êToolStripMenuItem.Text = "ê"; + // + // êToolStripMenuItem1 + // + this.êToolStripMenuItem1.Name = "êToolStripMenuItem1"; + this.êToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.êToolStripMenuItem1.Text = "Ê"; + // + // ôToolStripMenuItem1 + // + this.ôToolStripMenuItem1.Name = "ôToolStripMenuItem1"; + this.ôToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.ôToolStripMenuItem1.Text = "ô"; + // + // ôToolStripMenuItem + // + this.ôToolStripMenuItem.Name = "ôToolStripMenuItem"; + this.ôToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.ôToolStripMenuItem.Text = "Ô"; + // + // àToolStripMenuItem2 + // + this.àToolStripMenuItem2.Name = "àToolStripMenuItem2"; + this.àToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); + this.àToolStripMenuItem2.Text = "à"; + // + // àToolStripMenuItem3 + // + this.àToolStripMenuItem3.Name = "àToolStripMenuItem3"; + this.àToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); + this.àToolStripMenuItem3.Text = "À"; + // + // çToolStripMenuItem2 + // + this.çToolStripMenuItem2.Name = "çToolStripMenuItem2"; + this.çToolStripMenuItem2.Size = new System.Drawing.Size(83, 22); + this.çToolStripMenuItem2.Text = "ç"; + // + // çToolStripMenuItem3 + // + this.çToolStripMenuItem3.Name = "çToolStripMenuItem3"; + this.çToolStripMenuItem3.Size = new System.Drawing.Size(83, 22); + this.çToolStripMenuItem3.Text = "Ç"; + // + // spanishToolStripMenuItem + // + this.spanishToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.áToolStripMenuItem, + this.áToolStripMenuItem1, + this.éToolStripMenuItem, + this.éToolStripMenuItem1, + this.toolStripMenuItem1, + this.toolStripMenuItem6, + this.toolStripMenuItem4, + this.toolStripMenuItem7, + this.toolStripMenuItem5, + this.toolStripMenuItem8, + this.toolStripMenuItem9, + this.toolStripMenuItem10, + this.ñToolStripMenuItem, + this.ñToolStripMenuItem1, + this.toolStripMenuItem2, + this.toolStripMenuItem3}); + this.spanishToolStripMenuItem.Name = "spanishToolStripMenuItem"; + this.spanishToolStripMenuItem.Size = new System.Drawing.Size(134, 22); + this.spanishToolStripMenuItem.Text = "Spanish"; + // + // áToolStripMenuItem + // + this.áToolStripMenuItem.Name = "áToolStripMenuItem"; + this.áToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.áToolStripMenuItem.Text = "á"; + // + // áToolStripMenuItem1 + // + this.áToolStripMenuItem1.Name = "áToolStripMenuItem1"; + this.áToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.áToolStripMenuItem1.Text = "Á"; + // + // éToolStripMenuItem + // + this.éToolStripMenuItem.Name = "éToolStripMenuItem"; + this.éToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.éToolStripMenuItem.Text = "é"; + // + // éToolStripMenuItem1 + // + this.éToolStripMenuItem1.Name = "éToolStripMenuItem1"; + this.éToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.éToolStripMenuItem1.Text = "É"; + // + // toolStripMenuItem1 + // + this.toolStripMenuItem1.Name = "toolStripMenuItem1"; + this.toolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.toolStripMenuItem1.Text = "í"; + // + // toolStripMenuItem6 + // + this.toolStripMenuItem6.Name = "toolStripMenuItem6"; + this.toolStripMenuItem6.Size = new System.Drawing.Size(83, 22); + this.toolStripMenuItem6.Text = "Í"; + // + // toolStripMenuItem4 + // + this.toolStripMenuItem4.Name = "toolStripMenuItem4"; + this.toolStripMenuItem4.Size = new System.Drawing.Size(83, 22); + this.toolStripMenuItem4.Text = "ó"; + // + // toolStripMenuItem7 + // + this.toolStripMenuItem7.Name = "toolStripMenuItem7"; + this.toolStripMenuItem7.Size = new System.Drawing.Size(83, 22); + this.toolStripMenuItem7.Text = "Ó"; + // + // toolStripMenuItem5 + // + this.toolStripMenuItem5.Name = "toolStripMenuItem5"; + this.toolStripMenuItem5.Size = new System.Drawing.Size(83, 22); + this.toolStripMenuItem5.Text = "ú"; + // + // toolStripMenuItem8 + // + this.toolStripMenuItem8.Name = "toolStripMenuItem8"; + this.toolStripMenuItem8.Size = new System.Drawing.Size(83, 22); + this.toolStripMenuItem8.Text = "Ú"; + // + // toolStripMenuItem9 + // + this.toolStripMenuItem9.Name = "toolStripMenuItem9"; + this.toolStripMenuItem9.Size = new System.Drawing.Size(83, 22); + this.toolStripMenuItem9.Text = "ü"; + // + // toolStripMenuItem10 + // + this.toolStripMenuItem10.Name = "toolStripMenuItem10"; + this.toolStripMenuItem10.Size = new System.Drawing.Size(83, 22); + this.toolStripMenuItem10.Text = "Ü"; + // + // ñToolStripMenuItem + // + this.ñToolStripMenuItem.Name = "ñToolStripMenuItem"; + this.ñToolStripMenuItem.Size = new System.Drawing.Size(83, 22); + this.ñToolStripMenuItem.Text = "ñ"; + // + // ñToolStripMenuItem1 + // + this.ñToolStripMenuItem1.Name = "ñToolStripMenuItem1"; + this.ñToolStripMenuItem1.Size = new System.Drawing.Size(83, 22); + this.ñToolStripMenuItem1.Text = "Ñ"; + // + // toolStripMenuItem2 + // + this.toolStripMenuItem2.Name = "toolStripMenuItem2"; + this.toolStripMenuItem2.Size = new System.Drawing.Size(83, 22); + this.toolStripMenuItem2.Text = "¿"; + // + // toolStripMenuItem3 + // + this.toolStripMenuItem3.Name = "toolStripMenuItem3"; + this.toolStripMenuItem3.Size = new System.Drawing.Size(83, 22); + this.toolStripMenuItem3.Text = "¡"; + // + // toolStripMenuItemMusicSymbol1 + // + this.toolStripMenuItemMusicSymbol1.Name = "toolStripMenuItemMusicSymbol1"; + this.toolStripMenuItemMusicSymbol1.Size = new System.Drawing.Size(134, 22); + this.toolStripMenuItemMusicSymbol1.Text = "♪"; + // + // toolStripMenuItemMusicSymbol2 + // + this.toolStripMenuItemMusicSymbol2.Name = "toolStripMenuItemMusicSymbol2"; + this.toolStripMenuItemMusicSymbol2.Size = new System.Drawing.Size(134, 22); + this.toolStripMenuItemMusicSymbol2.Text = "♫"; + // // VobSubOcrNOcrCharacter // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1246,7 +1428,6 @@ this.Load += new System.EventHandler(this.VobSubOcrNOcrCharacter_Load); this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.VobSubOcrNOcrCharacter_KeyDown); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxCharacter)).EndInit(); - this.contextMenuStripLetters.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxSubtitleImage)).EndInit(); this.groupBoxNewInput.ResumeLayout(false); this.groupBoxNewInput.PerformLayout(); @@ -1255,6 +1436,7 @@ this.groupBox2.PerformLayout(); this.contextMenuStripLinesBackground.ResumeLayout(false); this.contextMenuLinesForeground.ResumeLayout(false); + this.contextMenuStripLetters.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); @@ -1292,6 +1474,12 @@ private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label3; + private System.Windows.Forms.CheckBox checkBoxAutoSubmitOfFirstChar; + private System.Windows.Forms.ToolStripMenuItem clearToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem clearToolStripMenuItem1; + private System.Windows.Forms.NumericUpDown numericUpDownLinesToDraw; + private System.Windows.Forms.Label labelLinestoDraw; + private System.Windows.Forms.Button buttonGuessAgain; private System.Windows.Forms.ContextMenuStrip contextMenuStripLetters; private System.Windows.Forms.ToolStripMenuItem latinToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem àToolStripMenuItem1; @@ -1322,6 +1510,19 @@ private System.Windows.Forms.ToolStripMenuItem üToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem üToolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem ßToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem italianToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem àToolStripMenuItem4; + private System.Windows.Forms.ToolStripMenuItem àToolStripMenuItem5; + private System.Windows.Forms.ToolStripMenuItem èToolStripMenuItem2; + private System.Windows.Forms.ToolStripMenuItem èToolStripMenuItem3; + private System.Windows.Forms.ToolStripMenuItem éToolStripMenuItem6; + private System.Windows.Forms.ToolStripMenuItem éToolStripMenuItem7; + private System.Windows.Forms.ToolStripMenuItem ìToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ìToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem òToolStripMenuItem2; + private System.Windows.Forms.ToolStripMenuItem òToolStripMenuItem3; + private System.Windows.Forms.ToolStripMenuItem ùToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ùToolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem nordicToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem aeToolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem AeToolStripMenuItem2; @@ -1333,6 +1534,25 @@ private System.Windows.Forms.ToolStripMenuItem äToolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem öToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem öToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem polishToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ąToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ąToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem ćToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ćToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem ęToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ęToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem łToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem łToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem ńToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ńToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem óToolStripMenuItem4; + private System.Windows.Forms.ToolStripMenuItem óToolStripMenuItem5; + private System.Windows.Forms.ToolStripMenuItem śToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem śToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem źToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem źToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem żToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem żToolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem portugueseToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem ãToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem ãToolStripMenuItem1; @@ -1377,11 +1597,5 @@ private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemMusicSymbol1; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemMusicSymbol2; - private System.Windows.Forms.CheckBox checkBoxAutoSubmitOfFirstChar; - private System.Windows.Forms.ToolStripMenuItem clearToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem clearToolStripMenuItem1; - private System.Windows.Forms.NumericUpDown numericUpDownLinesToDraw; - private System.Windows.Forms.Label labelLinestoDraw; - private System.Windows.Forms.Button buttonGuessAgain; } } \ No newline at end of file diff --git a/src/Forms/Ocr/VobSubOcrNOcrCharacter.cs b/src/Forms/Ocr/VobSubOcrNOcrCharacter.cs index 81fdb2cb0..248064ab7 100644 --- a/src/Forms/Ocr/VobSubOcrNOcrCharacter.cs +++ b/src/Forms/Ocr/VobSubOcrNOcrCharacter.cs @@ -31,6 +31,32 @@ namespace Nikse.SubtitleEdit.Forms.Ocr UiUtil.FixLargeFonts(this, buttonCancel); checkBoxAutoSubmitOfFirstChar.Text = Configuration.Settings.Language.VobSubOcrCharacter.AutoSubmitOnFirstChar; labelItalicOn.Visible = false; + + foreach (ToolStripItem toolStripItem in contextMenuStripLetters.Items) + { + if (toolStripItem is ToolStripDropDownItem i && i.HasDropDownItems) + { + foreach (ToolStripItem item in i.DropDownItems) + { + item.Click += InsertLanguageCharacter; + } + } + else + { + toolStripItem.Click += InsertLanguageCharacter; + } + } + } + + private void InsertLanguageCharacter(object sender, EventArgs e) + { + if (sender is ToolStripMenuItem toolStripMenuItem) + { + var start = textBoxCharacters.SelectionStart; + textBoxCharacters.SelectedText = toolStripMenuItem.Text; + textBoxCharacters.SelectionLength = 0; + textBoxCharacters.SelectionStart = start + toolStripMenuItem.Text.Length; + } } public NOcrChar NOcrChar { get; private set; } @@ -760,7 +786,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr } } - private void removeForegroundToolStripMenuItem_Click(object sender, EventArgs e) + private void removeBackgroundLineToolStripMenuItem_Click(object sender, EventArgs e) { if (listBoxlinesBackground.SelectedItems.Count == 1) { @@ -770,7 +796,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr ShowOcrPoints(); } - private void removeForegroundToolStripMenuItem_Click_1(object sender, EventArgs e) + private void removeForegroundToolStripMenuItem_Click(object sender, EventArgs e) { if (listBoxLinesForeground.SelectedItems.Count == 1) { @@ -878,5 +904,25 @@ namespace Nikse.SubtitleEdit.Forms.Ocr { DialogResult = DialogResult.Abort; } + + private void listBoxLinesForeground_KeyPress(object sender, KeyPressEventArgs e) + { + } + + private void listBoxLinesForeground_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Delete) + { + removeForegroundToolStripMenuItem_Click(null, null); + } + } + + private void listBoxLinesBackground_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Delete) + { + removeBackgroundLineToolStripMenuItem_Click(null, null); + } + } } } diff --git a/src/Forms/Settings.Designer.cs b/src/Forms/Settings.Designer.cs index b75028cea..b413c19ff 100644 --- a/src/Forms/Settings.Designer.cs +++ b/src/Forms/Settings.Designer.cs @@ -2319,7 +2319,7 @@ // this.buttonDownloadFfmpeg.Location = new System.Drawing.Point(274, 17); this.buttonDownloadFfmpeg.Name = "buttonDownloadFfmpeg"; - this.buttonDownloadFfmpeg.Size = new System.Drawing.Size(136, 21); + this.buttonDownloadFfmpeg.Size = new System.Drawing.Size(136, 23); this.buttonDownloadFfmpeg.TabIndex = 2; this.buttonDownloadFfmpeg.Text = "Download ffmpeg"; this.buttonDownloadFfmpeg.UseVisualStyleBackColor = true; @@ -2480,7 +2480,7 @@ // panelWaveformCursorColor // this.panelWaveformCursorColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panelWaveformCursorColor.Location = new System.Drawing.Point(138, 136); + this.panelWaveformCursorColor.Location = new System.Drawing.Point(138, 142); this.panelWaveformCursorColor.Name = "panelWaveformCursorColor"; this.panelWaveformCursorColor.Size = new System.Drawing.Size(21, 20); this.panelWaveformCursorColor.TabIndex = 34; @@ -2488,9 +2488,9 @@ // // buttonWaveformCursorColor // - this.buttonWaveformCursorColor.Location = new System.Drawing.Point(16, 135); + this.buttonWaveformCursorColor.Location = new System.Drawing.Point(14, 141); this.buttonWaveformCursorColor.Name = "buttonWaveformCursorColor"; - this.buttonWaveformCursorColor.Size = new System.Drawing.Size(112, 21); + this.buttonWaveformCursorColor.Size = new System.Drawing.Size(112, 23); this.buttonWaveformCursorColor.TabIndex = 4; this.buttonWaveformCursorColor.Text = "Cursor color"; this.buttonWaveformCursorColor.UseVisualStyleBackColor = true; @@ -2519,7 +2519,7 @@ // checkBoxWaveformShowWpm // this.checkBoxWaveformShowWpm.AutoSize = true; - this.checkBoxWaveformShowWpm.Location = new System.Drawing.Point(16, 248); + this.checkBoxWaveformShowWpm.Location = new System.Drawing.Point(16, 256); this.checkBoxWaveformShowWpm.Name = "checkBoxWaveformShowWpm"; this.checkBoxWaveformShowWpm.Size = new System.Drawing.Size(104, 17); this.checkBoxWaveformShowWpm.TabIndex = 8; @@ -2529,7 +2529,7 @@ // checkBoxWaveformShowCps // this.checkBoxWaveformShowCps.AutoSize = true; - this.checkBoxWaveformShowCps.Location = new System.Drawing.Point(16, 225); + this.checkBoxWaveformShowCps.Location = new System.Drawing.Point(16, 233); this.checkBoxWaveformShowCps.Name = "checkBoxWaveformShowCps"; this.checkBoxWaveformShowCps.Size = new System.Drawing.Size(96, 17); this.checkBoxWaveformShowCps.TabIndex = 7; @@ -2668,7 +2668,7 @@ // panelWaveformTextColor // this.panelWaveformTextColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panelWaveformTextColor.Location = new System.Drawing.Point(138, 109); + this.panelWaveformTextColor.Location = new System.Drawing.Point(138, 113); this.panelWaveformTextColor.Name = "panelWaveformTextColor"; this.panelWaveformTextColor.Size = new System.Drawing.Size(21, 20); this.panelWaveformTextColor.TabIndex = 7; @@ -2676,9 +2676,9 @@ // // buttonWaveformTextColor // - this.buttonWaveformTextColor.Location = new System.Drawing.Point(16, 108); + this.buttonWaveformTextColor.Location = new System.Drawing.Point(14, 112); this.buttonWaveformTextColor.Name = "buttonWaveformTextColor"; - this.buttonWaveformTextColor.Size = new System.Drawing.Size(112, 21); + this.buttonWaveformTextColor.Size = new System.Drawing.Size(112, 23); this.buttonWaveformTextColor.TabIndex = 3; this.buttonWaveformTextColor.Text = "Text color"; this.buttonWaveformTextColor.UseVisualStyleBackColor = true; @@ -2687,7 +2687,7 @@ // panelWaveformGridColor // this.panelWaveformGridColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panelWaveformGridColor.Location = new System.Drawing.Point(138, 163); + this.panelWaveformGridColor.Location = new System.Drawing.Point(138, 171); this.panelWaveformGridColor.Name = "panelWaveformGridColor"; this.panelWaveformGridColor.Size = new System.Drawing.Size(21, 20); this.panelWaveformGridColor.TabIndex = 9; @@ -2695,9 +2695,9 @@ // // buttonWaveformGridColor // - this.buttonWaveformGridColor.Location = new System.Drawing.Point(16, 162); + this.buttonWaveformGridColor.Location = new System.Drawing.Point(14, 170); this.buttonWaveformGridColor.Name = "buttonWaveformGridColor"; - this.buttonWaveformGridColor.Size = new System.Drawing.Size(112, 21); + this.buttonWaveformGridColor.Size = new System.Drawing.Size(112, 23); this.buttonWaveformGridColor.TabIndex = 5; this.buttonWaveformGridColor.Text = "Grid color"; this.buttonWaveformGridColor.UseVisualStyleBackColor = true; @@ -2706,7 +2706,7 @@ // panelWaveformBackgroundColor // this.panelWaveformBackgroundColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panelWaveformBackgroundColor.Location = new System.Drawing.Point(138, 82); + this.panelWaveformBackgroundColor.Location = new System.Drawing.Point(138, 84); this.panelWaveformBackgroundColor.Name = "panelWaveformBackgroundColor"; this.panelWaveformBackgroundColor.Size = new System.Drawing.Size(21, 20); this.panelWaveformBackgroundColor.TabIndex = 5; @@ -2714,9 +2714,9 @@ // // buttonWaveformBackgroundColor // - this.buttonWaveformBackgroundColor.Location = new System.Drawing.Point(16, 81); + this.buttonWaveformBackgroundColor.Location = new System.Drawing.Point(14, 83); this.buttonWaveformBackgroundColor.Name = "buttonWaveformBackgroundColor"; - this.buttonWaveformBackgroundColor.Size = new System.Drawing.Size(112, 21); + this.buttonWaveformBackgroundColor.Size = new System.Drawing.Size(112, 23); this.buttonWaveformBackgroundColor.TabIndex = 2; this.buttonWaveformBackgroundColor.Text = "Back color"; this.buttonWaveformBackgroundColor.UseVisualStyleBackColor = true; @@ -2733,9 +2733,9 @@ // // buttonWaveformColor // - this.buttonWaveformColor.Location = new System.Drawing.Point(16, 54); + this.buttonWaveformColor.Location = new System.Drawing.Point(14, 54); this.buttonWaveformColor.Name = "buttonWaveformColor"; - this.buttonWaveformColor.Size = new System.Drawing.Size(112, 21); + this.buttonWaveformColor.Size = new System.Drawing.Size(112, 23); this.buttonWaveformColor.TabIndex = 1; this.buttonWaveformColor.Text = "Color"; this.buttonWaveformColor.UseVisualStyleBackColor = true; @@ -2744,7 +2744,7 @@ // panelWaveformSelectedColor // this.panelWaveformSelectedColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panelWaveformSelectedColor.Location = new System.Drawing.Point(138, 27); + this.panelWaveformSelectedColor.Location = new System.Drawing.Point(138, 26); this.panelWaveformSelectedColor.Name = "panelWaveformSelectedColor"; this.panelWaveformSelectedColor.Size = new System.Drawing.Size(21, 20); this.panelWaveformSelectedColor.TabIndex = 1; @@ -2752,9 +2752,9 @@ // // buttonWaveformSelectedColor // - this.buttonWaveformSelectedColor.Location = new System.Drawing.Point(16, 27); + this.buttonWaveformSelectedColor.Location = new System.Drawing.Point(14, 25); this.buttonWaveformSelectedColor.Name = "buttonWaveformSelectedColor"; - this.buttonWaveformSelectedColor.Size = new System.Drawing.Size(112, 21); + this.buttonWaveformSelectedColor.Size = new System.Drawing.Size(112, 23); this.buttonWaveformSelectedColor.TabIndex = 0; this.buttonWaveformSelectedColor.Text = "Selected color"; this.buttonWaveformSelectedColor.UseVisualStyleBackColor = true; @@ -2763,7 +2763,7 @@ // checkBoxWaveformShowGrid // this.checkBoxWaveformShowGrid.AutoSize = true; - this.checkBoxWaveformShowGrid.Location = new System.Drawing.Point(16, 192); + this.checkBoxWaveformShowGrid.Location = new System.Drawing.Point(16, 201); this.checkBoxWaveformShowGrid.Name = "checkBoxWaveformShowGrid"; this.checkBoxWaveformShowGrid.Size = new System.Drawing.Size(73, 17); this.checkBoxWaveformShowGrid.TabIndex = 6; diff --git a/src/Logic/Ocr/NOcrDb.cs b/src/Logic/Ocr/NOcrDb.cs index fa6d394d3..2ddce5959 100644 --- a/src/Logic/Ocr/NOcrDb.cs +++ b/src/Logic/Ocr/NOcrDb.cs @@ -87,7 +87,118 @@ namespace Nikse.SubtitleEdit.Logic.Ocr } } - public NOcrChar GetMatch(NikseBitmap bitmap, int topMargin, bool deepSeek, bool italic, double italicAngle) + public NOcrChar GetMatchExpanded(NikseBitmap nikseBitmap, ImageSplitterItem targetItem) + { + int w = targetItem.NikseBitmap.Width; + foreach (NOcrChar oc in OcrCharactersExpanded) + { + if (oc.ExpandCount > 1 && oc.Width > w && targetItem.X + oc.Width < nikseBitmap.Width) + { + bool ok = true; + var index = 0; + while (index < oc.LinesForeground.Count && ok) + { + NOcrPoint op = oc.LinesForeground[index]; + foreach (Point point in op.GetPoints()) + { + Point p = new Point(point.X + targetItem.X, point.Y + targetItem.Y); + if (p.X >= 0 && p.Y >= 0 && p.X < nikseBitmap.Width && p.Y < nikseBitmap.Height) + { + Color c = nikseBitmap.GetPixel(p.X, p.Y); + if (c.A <= 150 || c.R + c.G + c.B <= VobSubOcr.NocrMinColor) + { + ok = false; + break; + } + } + } + + index++; + } + + index = 0; + while (index < oc.LinesBackground.Count && ok) + { + NOcrPoint op = oc.LinesBackground[index]; + foreach (Point point in op.GetPoints()) + { + Point p = new Point(point.X + targetItem.X, point.Y + targetItem.Y); + if (p.X >= 0 && p.Y >= 0 && p.X < nikseBitmap.Width && p.Y < nikseBitmap.Height) + { + Color c = nikseBitmap.GetPixel(p.X, p.Y); + if (c.A > 150 && c.R + c.G + c.B > VobSubOcr.NocrMinColor) + { + ok = false; + break; + } + } + } + + index++; + } + + if (ok) + { + return oc; + } + + ok = true; + index = 0; + while (index < oc.LinesForeground.Count && ok) + { + NOcrPoint op = oc.LinesForeground[index]; + foreach (Point point in op.ScaledGetPoints(oc, oc.Width, oc.Height - 1)) + { + Point p = new Point(point.X + targetItem.X, point.Y + targetItem.Y); + if (p.X >= 0 && p.Y >= 0 && p.X < nikseBitmap.Width && p.Y < nikseBitmap.Height) + { + Color c = nikseBitmap.GetPixel(p.X, p.Y); + if (c.A > 150 && c.R + c.G + c.B > VobSubOcr.NocrMinColor) + { + } + else + { + ok = false; + break; + } + } + } + + index++; + } + + index = 0; + while (index < oc.LinesBackground.Count && ok) + { + NOcrPoint op = oc.LinesBackground[index]; + foreach (Point point in op.ScaledGetPoints(oc, oc.Width, oc.Height - 1)) + { + Point p = new Point(point.X + targetItem.X, point.Y + targetItem.Y); + if (p.X >= 0 && p.Y >= 0 && p.X < nikseBitmap.Width && p.Y < nikseBitmap.Height) + { + Color c = nikseBitmap.GetPixel(p.X, p.Y); + if (c.A > 150 && c.R + c.G + c.B > VobSubOcr.NocrMinColor) + { + ok = false; + break; + } + } + } + + index++; + } + + if (ok) + { + return oc; + } + } + } + + return null; + } + + public NOcrChar GetMatch(NikseBitmap bitmap, int topMargin, bool deepSeek, bool italic, double italicAngle, int maxWrongPixels) { // only very very accurate matches foreach (var oc in OcrCharacters) @@ -114,46 +225,58 @@ namespace Nikse.SubtitleEdit.Logic.Ocr } } - foreach (var oc in OcrCharacters) + if (maxWrongPixels >= 1) { - if (Math.Abs(bitmap.Width - oc.Width) < 8 && Math.Abs(bitmap.Height - oc.Height) < 8 && Math.Abs(oc.MarginTop - topMargin) < 8) + foreach (var oc in OcrCharacters) { - if (IsMatch(bitmap, oc, 1)) + if (Math.Abs(bitmap.Width - oc.Width) < 8 && Math.Abs(bitmap.Height - oc.Height) < 8 && Math.Abs(oc.MarginTop - topMargin) < 8) { - return oc; + if (IsMatch(bitmap, oc, 1)) + { + return oc; + } } } } - foreach (var oc in OcrCharacters) + if (maxWrongPixels >= 2) { - if (Math.Abs(widthPercent - oc.WidthPercent) < 20 && Math.Abs(oc.MarginTop - topMargin) < 15) + foreach (var oc in OcrCharacters) { - if (IsMatch(bitmap, oc, 2)) + if (Math.Abs(widthPercent - oc.WidthPercent) < 20 && Math.Abs(oc.MarginTop - topMargin) < 15) { - return oc; + if (IsMatch(bitmap, oc, 2)) + { + return oc; + } } } } - foreach (var oc in OcrCharacters) + if (maxWrongPixels >= 20) { - if (!oc.IsSensitive && Math.Abs(widthPercent - oc.WidthPercent) < 20 && Math.Abs(oc.MarginTop - topMargin) < 15 && oc.LinesForeground.Count + oc.LinesBackground.Count > 40) + foreach (var oc in OcrCharacters) { - if (IsMatch(bitmap, oc, 20)) + if (!oc.IsSensitive && Math.Abs(widthPercent - oc.WidthPercent) < 20 && Math.Abs(oc.MarginTop - topMargin) < 15 && oc.LinesForeground.Count + oc.LinesBackground.Count > 40) { - return oc; + if (IsMatch(bitmap, oc, 20)) + { + return oc; + } } } } - foreach (var oc in OcrCharacters) + if (maxWrongPixels >= 10) { - if (oc.IsSensitive && Math.Abs(widthPercent - oc.WidthPercent) < 30 && Math.Abs(oc.MarginTop - topMargin) < 15 && oc.LinesForeground.Count + oc.LinesBackground.Count > 40) + foreach (var oc in OcrCharacters) { - if (IsMatch(bitmap, oc, 10)) + if (oc.IsSensitive && Math.Abs(widthPercent - oc.WidthPercent) < 30 && Math.Abs(oc.MarginTop - topMargin) < 15 && oc.LinesForeground.Count + oc.LinesBackground.Count > 40) { - return oc; + if (IsMatch(bitmap, oc, 10)) + { + return oc; + } } } } @@ -179,7 +302,7 @@ namespace Nikse.SubtitleEdit.Logic.Ocr { if (Math.Abs(widthPercent - oc.WidthPercent) < 60 && Math.Abs(oc.MarginTop - topMargin) < 17 && oc.LinesForeground.Count + oc.LinesBackground.Count > 50) { - if (IsMatch(bitmap, oc, 25)) + if (IsMatch(bitmap, oc, maxWrongPixels)) { return oc; } diff --git a/src/SubtitleEdit.csproj b/src/SubtitleEdit.csproj index 1afa2eefa..6458fc022 100644 --- a/src/SubtitleEdit.csproj +++ b/src/SubtitleEdit.csproj @@ -236,6 +236,12 @@ AddBeterMultiMatch.cs + + Form + + + AddBetterMultiMatchNOcr.cs + Form @@ -512,6 +518,12 @@ GetDictionaries.cs + + Form + + + BinaryOcrChooseEditDb.cs + Form @@ -1191,6 +1203,9 @@ AddBeterMultiMatch.cs + + AddBetterMultiMatchNOcr.cs + AddToOcrReplaceList.cs @@ -1327,6 +1342,9 @@ GetDictionaries.cs Designer + + BinaryOcrChooseEditDb.cs + BinaryOcrTrain.cs