Saves VobSub / Blu-ray font size/name + "Google it" button it ocr spell check dialog

git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@1678 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
niksedk 2013-02-24 17:00:09 +00:00
parent 48cd1f2f03
commit 5518a8f5af
8 changed files with 188 additions and 39 deletions

View File

@ -606,6 +606,7 @@
this.ShowIcon = false; this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "ExportPngXml"; this.Text = "ExportPngXml";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ExportPngXml_FormClosing);
this.Shown += new System.EventHandler(this.ExportPngXml_Shown); this.Shown += new System.EventHandler(this.ExportPngXml_Shown);
this.ResizeEnd += new System.EventHandler(this.ExportPngXml_ResizeEnd); this.ResizeEnd += new System.EventHandler(this.ExportPngXml_ResizeEnd);
this.SizeChanged += new System.EventHandler(this.ExportPngXml_SizeChanged); this.SizeChanged += new System.EventHandler(this.ExportPngXml_SizeChanged);

View File

@ -1254,6 +1254,43 @@ namespace Nikse.SubtitleEdit.Forms
Text = "DVD Studio Pro STL"; Text = "DVD Studio Pro STL";
else else
Text = Configuration.Settings.Language.ExportPngXml.Title; Text = Configuration.Settings.Language.ExportPngXml.Title;
if (_exportType == "VOBSUB" && !string.IsNullOrEmpty(Configuration.Settings.Tools.ExportVobSubFontName))
_subtitleFontName = Configuration.Settings.Tools.ExportVobSubFontName;
else if (_exportType == "BLURAYSUP" && !string.IsNullOrEmpty(Configuration.Settings.Tools.ExportBluRayFontName))
_subtitleFontName = Configuration.Settings.Tools.ExportBluRayFontName;
if (_exportType == "VOBSUB" && Configuration.Settings.Tools.ExportVobSubFontSize > 0)
_subtitleFontSize = Configuration.Settings.Tools.ExportVobSubFontSize;
else if (_exportType == "BLURAYSUP" && Configuration.Settings.Tools.ExportBluRaybFontSize > 0)
_subtitleFontSize = Configuration.Settings.Tools.ExportBluRaybFontSize;
if (_exportType == "VOBSUB")
{
comboBoxSubtitleFontSize.SelectedIndex = 7;
int i = 0;
foreach (string item in comboBoxSubtitleFontSize.Items)
{
if (item == Convert.ToInt32(_subtitleFontSize).ToString())
comboBoxSubtitleFontSize.SelectedIndex = i;
i++;
}
}
else if (_exportType == "BLURAYSUP")
{
comboBoxSubtitleFontSize.SelectedIndex = 16;
int i = 0;
foreach (string item in comboBoxSubtitleFontSize.Items)
{
if (item == Convert.ToInt32(_subtitleFontSize).ToString())
comboBoxSubtitleFontSize.SelectedIndex = i;
i++;
}
}
else
{
comboBoxSubtitleFontSize.SelectedIndex = 16;
}
groupBoxImageSettings.Text = Configuration.Settings.Language.ExportPngXml.ImageSettings; groupBoxImageSettings.Text = Configuration.Settings.Language.ExportPngXml.ImageSettings;
labelSubtitleFont.Text = Configuration.Settings.Language.ExportPngXml.FontFamily; labelSubtitleFont.Text = Configuration.Settings.Language.ExportPngXml.FontFamily;
labelSubtitleFontSize.Text = Configuration.Settings.Language.ExportPngXml.FontSize; labelSubtitleFontSize.Text = Configuration.Settings.Language.ExportPngXml.FontSize;
@ -1294,6 +1331,7 @@ namespace Nikse.SubtitleEdit.Forms
if (exportType == "VOBSUB") if (exportType == "VOBSUB")
{ {
comboBoxBorderWidth.SelectedIndex = 3; comboBoxBorderWidth.SelectedIndex = 3;
comboBoxResolution.SelectedIndex = 5; comboBoxResolution.SelectedIndex = 5;
labelLanguage.Visible = true; labelLanguage.Visible = true;
@ -1505,10 +1543,6 @@ namespace Nikse.SubtitleEdit.Forms
private void ExportPngXml_Shown(object sender, EventArgs e) private void ExportPngXml_Shown(object sender, EventArgs e)
{ {
_isLoading = false; _isLoading = false;
if (_exportType == "VOBSUB")
comboBoxSubtitleFontSize.SelectedIndex = 7;
else
comboBoxSubtitleFontSize.SelectedIndex = 16;
} }
private void comboBoxHAlign_SelectedIndexChanged(object sender, EventArgs e) private void comboBoxHAlign_SelectedIndexChanged(object sender, EventArgs e)
@ -1556,5 +1590,19 @@ namespace Nikse.SubtitleEdit.Forms
subtitleListView1_SelectedIndexChanged(null, null); subtitleListView1_SelectedIndexChanged(null, null);
} }
private void ExportPngXml_FormClosing(object sender, FormClosingEventArgs e)
{
if (_exportType == "VOBSUB")
{
Configuration.Settings.Tools.ExportVobSubFontName = _subtitleFontName;
Configuration.Settings.Tools.ExportVobSubFontSize = (int)_subtitleFontSize;
}
else if (_exportType == "BLURAYSUP")
{
Configuration.Settings.Tools.ExportBluRayFontName = _subtitleFontName;
Configuration.Settings.Tools.ExportBluRaybFontSize = (int)_subtitleFontSize;
}
}
} }
} }

View File

@ -35,6 +35,7 @@
this.buttonUseSuggestion = new System.Windows.Forms.Button(); this.buttonUseSuggestion = new System.Windows.Forms.Button();
this.listBoxSuggestions = new System.Windows.Forms.ListBox(); this.listBoxSuggestions = new System.Windows.Forms.ListBox();
this.GroupBoxEditWord = new System.Windows.Forms.GroupBox(); this.GroupBoxEditWord = new System.Windows.Forms.GroupBox();
this.buttonGoogleIt = new System.Windows.Forms.Button();
this.buttonAddToDictionary = new System.Windows.Forms.Button(); this.buttonAddToDictionary = new System.Windows.Forms.Button();
this.buttonChangeAll = new System.Windows.Forms.Button(); this.buttonChangeAll = new System.Windows.Forms.Button();
this.buttonChange = new System.Windows.Forms.Button(); this.buttonChange = new System.Windows.Forms.Button();
@ -67,7 +68,7 @@
this.buttonAbort.Location = new System.Drawing.Point(623, 442); this.buttonAbort.Location = new System.Drawing.Point(623, 442);
this.buttonAbort.Name = "buttonAbort"; this.buttonAbort.Name = "buttonAbort";
this.buttonAbort.Size = new System.Drawing.Size(85, 21); this.buttonAbort.Size = new System.Drawing.Size(85, 21);
this.buttonAbort.TabIndex = 24; this.buttonAbort.TabIndex = 4;
this.buttonAbort.Text = "Abort"; this.buttonAbort.Text = "Abort";
this.buttonAbort.UseVisualStyleBackColor = true; this.buttonAbort.UseVisualStyleBackColor = true;
this.buttonAbort.Click += new System.EventHandler(this.ButtonAbortClick); this.buttonAbort.Click += new System.EventHandler(this.ButtonAbortClick);
@ -90,7 +91,7 @@
this.groupBoxSuggestions.Location = new System.Drawing.Point(320, 249); this.groupBoxSuggestions.Location = new System.Drawing.Point(320, 249);
this.groupBoxSuggestions.Name = "groupBoxSuggestions"; this.groupBoxSuggestions.Name = "groupBoxSuggestions";
this.groupBoxSuggestions.Size = new System.Drawing.Size(388, 187); this.groupBoxSuggestions.Size = new System.Drawing.Size(388, 187);
this.groupBoxSuggestions.TabIndex = 32; this.groupBoxSuggestions.TabIndex = 3;
this.groupBoxSuggestions.TabStop = false; this.groupBoxSuggestions.TabStop = false;
this.groupBoxSuggestions.Text = "Suggestions"; this.groupBoxSuggestions.Text = "Suggestions";
// //
@ -100,7 +101,7 @@
this.buttonUseSuggestionAlways.Location = new System.Drawing.Point(291, 16); this.buttonUseSuggestionAlways.Location = new System.Drawing.Point(291, 16);
this.buttonUseSuggestionAlways.Name = "buttonUseSuggestionAlways"; this.buttonUseSuggestionAlways.Name = "buttonUseSuggestionAlways";
this.buttonUseSuggestionAlways.Size = new System.Drawing.Size(87, 21); this.buttonUseSuggestionAlways.Size = new System.Drawing.Size(87, 21);
this.buttonUseSuggestionAlways.TabIndex = 33; this.buttonUseSuggestionAlways.TabIndex = 1;
this.buttonUseSuggestionAlways.Text = "Use always"; this.buttonUseSuggestionAlways.Text = "Use always";
this.buttonUseSuggestionAlways.UseVisualStyleBackColor = true; this.buttonUseSuggestionAlways.UseVisualStyleBackColor = true;
this.buttonUseSuggestionAlways.Click += new System.EventHandler(this.ButtonUseSuggestionAlwaysClick); this.buttonUseSuggestionAlways.Click += new System.EventHandler(this.ButtonUseSuggestionAlwaysClick);
@ -111,7 +112,7 @@
this.buttonUseSuggestion.Location = new System.Drawing.Point(206, 16); this.buttonUseSuggestion.Location = new System.Drawing.Point(206, 16);
this.buttonUseSuggestion.Name = "buttonUseSuggestion"; this.buttonUseSuggestion.Name = "buttonUseSuggestion";
this.buttonUseSuggestion.Size = new System.Drawing.Size(79, 21); this.buttonUseSuggestion.Size = new System.Drawing.Size(79, 21);
this.buttonUseSuggestion.TabIndex = 32; this.buttonUseSuggestion.TabIndex = 0;
this.buttonUseSuggestion.Text = "Use"; this.buttonUseSuggestion.Text = "Use";
this.buttonUseSuggestion.UseVisualStyleBackColor = true; this.buttonUseSuggestion.UseVisualStyleBackColor = true;
this.buttonUseSuggestion.Click += new System.EventHandler(this.ButtonUseSuggestionClick); this.buttonUseSuggestion.Click += new System.EventHandler(this.ButtonUseSuggestionClick);
@ -124,11 +125,12 @@
this.listBoxSuggestions.Location = new System.Drawing.Point(6, 39); this.listBoxSuggestions.Location = new System.Drawing.Point(6, 39);
this.listBoxSuggestions.Name = "listBoxSuggestions"; this.listBoxSuggestions.Name = "listBoxSuggestions";
this.listBoxSuggestions.Size = new System.Drawing.Size(372, 134); this.listBoxSuggestions.Size = new System.Drawing.Size(372, 134);
this.listBoxSuggestions.TabIndex = 30; this.listBoxSuggestions.TabIndex = 2;
// //
// GroupBoxEditWord // GroupBoxEditWord
// //
this.GroupBoxEditWord.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.GroupBoxEditWord.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.GroupBoxEditWord.Controls.Add(this.buttonGoogleIt);
this.GroupBoxEditWord.Controls.Add(this.buttonAddToDictionary); this.GroupBoxEditWord.Controls.Add(this.buttonAddToDictionary);
this.GroupBoxEditWord.Controls.Add(this.buttonChangeAll); this.GroupBoxEditWord.Controls.Add(this.buttonChangeAll);
this.GroupBoxEditWord.Controls.Add(this.buttonChange); this.GroupBoxEditWord.Controls.Add(this.buttonChange);
@ -139,16 +141,26 @@
this.GroupBoxEditWord.Location = new System.Drawing.Point(12, 249); this.GroupBoxEditWord.Location = new System.Drawing.Point(12, 249);
this.GroupBoxEditWord.Name = "GroupBoxEditWord"; this.GroupBoxEditWord.Name = "GroupBoxEditWord";
this.GroupBoxEditWord.Size = new System.Drawing.Size(302, 187); this.GroupBoxEditWord.Size = new System.Drawing.Size(302, 187);
this.GroupBoxEditWord.TabIndex = 33; this.GroupBoxEditWord.TabIndex = 2;
this.GroupBoxEditWord.TabStop = false; this.GroupBoxEditWord.TabStop = false;
this.GroupBoxEditWord.Text = "Word not found"; this.GroupBoxEditWord.Text = "Word not found";
// //
// buttonGoogleIt
//
this.buttonGoogleIt.Location = new System.Drawing.Point(6, 97);
this.buttonGoogleIt.Name = "buttonGoogleIt";
this.buttonGoogleIt.Size = new System.Drawing.Size(141, 21);
this.buttonGoogleIt.TabIndex = 4;
this.buttonGoogleIt.Text = "&Google it";
this.buttonGoogleIt.UseVisualStyleBackColor = true;
this.buttonGoogleIt.Click += new System.EventHandler(this.buttonGoogleIt_Click);
//
// buttonAddToDictionary // buttonAddToDictionary
// //
this.buttonAddToDictionary.Location = new System.Drawing.Point(6, 151); this.buttonAddToDictionary.Location = new System.Drawing.Point(6, 151);
this.buttonAddToDictionary.Name = "buttonAddToDictionary"; this.buttonAddToDictionary.Name = "buttonAddToDictionary";
this.buttonAddToDictionary.Size = new System.Drawing.Size(290, 21); this.buttonAddToDictionary.Size = new System.Drawing.Size(290, 21);
this.buttonAddToDictionary.TabIndex = 35; this.buttonAddToDictionary.TabIndex = 7;
this.buttonAddToDictionary.Text = "Add to user dictionary (not case sensitive)"; this.buttonAddToDictionary.Text = "Add to user dictionary (not case sensitive)";
this.buttonAddToDictionary.UseVisualStyleBackColor = true; this.buttonAddToDictionary.UseVisualStyleBackColor = true;
this.buttonAddToDictionary.Click += new System.EventHandler(this.ButtonAddToDictionaryClick); this.buttonAddToDictionary.Click += new System.EventHandler(this.ButtonAddToDictionaryClick);
@ -158,7 +170,7 @@
this.buttonChangeAll.Location = new System.Drawing.Point(6, 45); this.buttonChangeAll.Location = new System.Drawing.Point(6, 45);
this.buttonChangeAll.Name = "buttonChangeAll"; this.buttonChangeAll.Name = "buttonChangeAll";
this.buttonChangeAll.Size = new System.Drawing.Size(290, 21); this.buttonChangeAll.Size = new System.Drawing.Size(290, 21);
this.buttonChangeAll.TabIndex = 34; this.buttonChangeAll.TabIndex = 1;
this.buttonChangeAll.Text = "Change and add to ocr fix list (case sensitive)"; this.buttonChangeAll.Text = "Change and add to ocr fix list (case sensitive)";
this.buttonChangeAll.UseVisualStyleBackColor = true; this.buttonChangeAll.UseVisualStyleBackColor = true;
this.buttonChangeAll.Click += new System.EventHandler(this.ButtonChangeAllClick); this.buttonChangeAll.Click += new System.EventHandler(this.ButtonChangeAllClick);
@ -168,7 +180,7 @@
this.buttonChange.Location = new System.Drawing.Point(6, 72); this.buttonChange.Location = new System.Drawing.Point(6, 72);
this.buttonChange.Name = "buttonChange"; this.buttonChange.Name = "buttonChange";
this.buttonChange.Size = new System.Drawing.Size(141, 21); this.buttonChange.Size = new System.Drawing.Size(141, 21);
this.buttonChange.TabIndex = 33; this.buttonChange.TabIndex = 2;
this.buttonChange.Text = "Change once"; this.buttonChange.Text = "Change once";
this.buttonChange.UseVisualStyleBackColor = true; this.buttonChange.UseVisualStyleBackColor = true;
this.buttonChange.Click += new System.EventHandler(this.ButtonChangeClick); this.buttonChange.Click += new System.EventHandler(this.ButtonChangeClick);
@ -178,7 +190,7 @@
this.buttonSkipAll.Location = new System.Drawing.Point(155, 97); this.buttonSkipAll.Location = new System.Drawing.Point(155, 97);
this.buttonSkipAll.Name = "buttonSkipAll"; this.buttonSkipAll.Name = "buttonSkipAll";
this.buttonSkipAll.Size = new System.Drawing.Size(141, 21); this.buttonSkipAll.Size = new System.Drawing.Size(141, 21);
this.buttonSkipAll.TabIndex = 32; this.buttonSkipAll.TabIndex = 5;
this.buttonSkipAll.Text = "&Skip all"; this.buttonSkipAll.Text = "&Skip all";
this.buttonSkipAll.UseVisualStyleBackColor = true; this.buttonSkipAll.UseVisualStyleBackColor = true;
this.buttonSkipAll.Click += new System.EventHandler(this.ButtonSkipAllClick); this.buttonSkipAll.Click += new System.EventHandler(this.ButtonSkipAllClick);
@ -189,7 +201,7 @@
this.textBoxWord.Location = new System.Drawing.Point(6, 19); this.textBoxWord.Location = new System.Drawing.Point(6, 19);
this.textBoxWord.Name = "textBoxWord"; this.textBoxWord.Name = "textBoxWord";
this.textBoxWord.Size = new System.Drawing.Size(290, 22); this.textBoxWord.Size = new System.Drawing.Size(290, 22);
this.textBoxWord.TabIndex = 31; this.textBoxWord.TabIndex = 0;
this.textBoxWord.TextChanged += new System.EventHandler(this.textBoxWord_TextChanged); this.textBoxWord.TextChanged += new System.EventHandler(this.textBoxWord_TextChanged);
this.textBoxWord.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxWordKeyDown); this.textBoxWord.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxWordKeyDown);
// //
@ -198,7 +210,7 @@
this.buttonSkipOnce.Location = new System.Drawing.Point(155, 72); this.buttonSkipOnce.Location = new System.Drawing.Point(155, 72);
this.buttonSkipOnce.Name = "buttonSkipOnce"; this.buttonSkipOnce.Name = "buttonSkipOnce";
this.buttonSkipOnce.Size = new System.Drawing.Size(141, 21); this.buttonSkipOnce.Size = new System.Drawing.Size(141, 21);
this.buttonSkipOnce.TabIndex = 30; this.buttonSkipOnce.TabIndex = 3;
this.buttonSkipOnce.Text = "Skip &once"; this.buttonSkipOnce.Text = "Skip &once";
this.buttonSkipOnce.UseVisualStyleBackColor = true; this.buttonSkipOnce.UseVisualStyleBackColor = true;
this.buttonSkipOnce.Click += new System.EventHandler(this.ButtonSkipOnceClick); this.buttonSkipOnce.Click += new System.EventHandler(this.ButtonSkipOnceClick);
@ -208,7 +220,7 @@
this.buttonAddToNames.Location = new System.Drawing.Point(6, 124); this.buttonAddToNames.Location = new System.Drawing.Point(6, 124);
this.buttonAddToNames.Name = "buttonAddToNames"; this.buttonAddToNames.Name = "buttonAddToNames";
this.buttonAddToNames.Size = new System.Drawing.Size(290, 21); this.buttonAddToNames.Size = new System.Drawing.Size(290, 21);
this.buttonAddToNames.TabIndex = 29; this.buttonAddToNames.TabIndex = 6;
this.buttonAddToNames.Text = "Add to names/noise list (case sensitive)"; this.buttonAddToNames.Text = "Add to names/noise list (case sensitive)";
this.buttonAddToNames.UseVisualStyleBackColor = true; this.buttonAddToNames.UseVisualStyleBackColor = true;
this.buttonAddToNames.Click += new System.EventHandler(this.ButtonAddToNamesClick); this.buttonAddToNames.Click += new System.EventHandler(this.ButtonAddToNamesClick);
@ -276,7 +288,7 @@
this.groupBoxTextAsImage.Location = new System.Drawing.Point(12, 12); this.groupBoxTextAsImage.Location = new System.Drawing.Point(12, 12);
this.groupBoxTextAsImage.Name = "groupBoxTextAsImage"; this.groupBoxTextAsImage.Name = "groupBoxTextAsImage";
this.groupBoxTextAsImage.Size = new System.Drawing.Size(696, 152); this.groupBoxTextAsImage.Size = new System.Drawing.Size(696, 152);
this.groupBoxTextAsImage.TabIndex = 34; this.groupBoxTextAsImage.TabIndex = 0;
this.groupBoxTextAsImage.TabStop = false; this.groupBoxTextAsImage.TabStop = false;
this.groupBoxTextAsImage.Text = "Image text"; this.groupBoxTextAsImage.Text = "Image text";
// //
@ -301,7 +313,7 @@
this.groupBoxText.Location = new System.Drawing.Point(12, 170); this.groupBoxText.Location = new System.Drawing.Point(12, 170);
this.groupBoxText.Name = "groupBoxText"; this.groupBoxText.Name = "groupBoxText";
this.groupBoxText.Size = new System.Drawing.Size(696, 72); this.groupBoxText.Size = new System.Drawing.Size(696, 72);
this.groupBoxText.TabIndex = 38; this.groupBoxText.TabIndex = 1;
this.groupBoxText.TabStop = false; this.groupBoxText.TabStop = false;
this.groupBoxText.Text = "Text"; this.groupBoxText.Text = "Text";
// //
@ -313,7 +325,7 @@
this.richTextBoxParagraph.Name = "richTextBoxParagraph"; this.richTextBoxParagraph.Name = "richTextBoxParagraph";
this.richTextBoxParagraph.ReadOnly = true; this.richTextBoxParagraph.ReadOnly = true;
this.richTextBoxParagraph.Size = new System.Drawing.Size(296, 54); this.richTextBoxParagraph.Size = new System.Drawing.Size(296, 54);
this.richTextBoxParagraph.TabIndex = 39; this.richTextBoxParagraph.TabIndex = 0;
this.richTextBoxParagraph.Text = ""; this.richTextBoxParagraph.Text = "";
// //
// buttonEditWholeText // buttonEditWholeText
@ -321,7 +333,7 @@
this.buttonEditWholeText.Location = new System.Drawing.Point(308, 17); this.buttonEditWholeText.Location = new System.Drawing.Point(308, 17);
this.buttonEditWholeText.Name = "buttonEditWholeText"; this.buttonEditWholeText.Name = "buttonEditWholeText";
this.buttonEditWholeText.Size = new System.Drawing.Size(128, 21); this.buttonEditWholeText.Size = new System.Drawing.Size(128, 21);
this.buttonEditWholeText.TabIndex = 38; this.buttonEditWholeText.TabIndex = 1;
this.buttonEditWholeText.Text = "Edit whole text"; this.buttonEditWholeText.Text = "Edit whole text";
this.buttonEditWholeText.UseVisualStyleBackColor = true; this.buttonEditWholeText.UseVisualStyleBackColor = true;
this.buttonEditWholeText.Click += new System.EventHandler(this.ButtonEditWholeTextClick); this.buttonEditWholeText.Click += new System.EventHandler(this.ButtonEditWholeTextClick);
@ -331,7 +343,7 @@
this.buttonEditWord.Location = new System.Drawing.Point(308, 43); this.buttonEditWord.Location = new System.Drawing.Point(308, 43);
this.buttonEditWord.Name = "buttonEditWord"; this.buttonEditWord.Name = "buttonEditWord";
this.buttonEditWord.Size = new System.Drawing.Size(128, 21); this.buttonEditWord.Size = new System.Drawing.Size(128, 21);
this.buttonEditWord.TabIndex = 37; this.buttonEditWord.TabIndex = 2;
this.buttonEditWord.Text = "Edit word"; this.buttonEditWord.Text = "Edit word";
this.buttonEditWord.UseVisualStyleBackColor = true; this.buttonEditWord.UseVisualStyleBackColor = true;
this.buttonEditWord.Click += new System.EventHandler(this.ButtonEditWordClick); this.buttonEditWord.Click += new System.EventHandler(this.ButtonEditWordClick);
@ -346,8 +358,8 @@
this.Controls.Add(this.buttonAbort); this.Controls.Add(this.buttonAbort);
this.Controls.Add(this.labelWordNotFound); this.Controls.Add(this.labelWordNotFound);
this.Controls.Add(this.groupBoxSuggestions); this.Controls.Add(this.groupBoxSuggestions);
this.Controls.Add(this.groupBoxEditWholeText);
this.Controls.Add(this.GroupBoxEditWord); this.Controls.Add(this.GroupBoxEditWord);
this.Controls.Add(this.groupBoxEditWholeText);
this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Name = "OcrSpellCheck"; this.Name = "OcrSpellCheck";
this.ShowIcon = false; this.ShowIcon = false;
@ -394,5 +406,6 @@
private System.Windows.Forms.Button buttonAddToDictionary; private System.Windows.Forms.Button buttonAddToDictionary;
private System.Windows.Forms.Button buttonSkipText; private System.Windows.Forms.Button buttonSkipText;
private System.Windows.Forms.Button buttonChangeAllWholeText; private System.Windows.Forms.Button buttonChangeAllWholeText;
private System.Windows.Forms.Button buttonGoogleIt;
} }
} }

View File

@ -273,5 +273,12 @@ namespace Nikse.SubtitleEdit.Forms
buttonChangeAllWholeText.Enabled = buttonChangeWholeText.Enabled; buttonChangeAllWholeText.Enabled = buttonChangeWholeText.Enabled;
} }
private void buttonGoogleIt_Click(object sender, EventArgs e)
{
string text = textBoxWord.Text;
if (text.Trim().Length > 0)
System.Diagnostics.Process.Start("http://www.google.com/search?q=" + Utilities.UrlEncode(text));
}
} }
} }

View File

@ -94,6 +94,8 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonUknownToUserDic = new System.Windows.Forms.Button(); this.buttonUknownToUserDic = new System.Windows.Forms.Button();
this.buttonUknownToNames = new System.Windows.Forms.Button(); this.buttonUknownToNames = new System.Windows.Forms.Button();
this.listBoxUnknownWords = new System.Windows.Forms.ListBox(); this.listBoxUnknownWords = new System.Windows.Forms.ListBox();
this.contextMenuStripUnknownWords = new System.Windows.Forms.ContextMenuStrip(this.components);
this.clearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.checkBoxPromptForUnknownWords = new System.Windows.Forms.CheckBox(); this.checkBoxPromptForUnknownWords = new System.Windows.Forms.CheckBox();
this.checkBoxAutoBreakLines = new System.Windows.Forms.CheckBox(); this.checkBoxAutoBreakLines = new System.Windows.Forms.CheckBox();
this.labelDictionaryLoaded = new System.Windows.Forms.Label(); this.labelDictionaryLoaded = new System.Windows.Forms.Label();
@ -120,8 +122,10 @@ namespace Nikse.SubtitleEdit.Forms
this.splitContainerBottom = new System.Windows.Forms.SplitContainer(); this.splitContainerBottom = new System.Windows.Forms.SplitContainer();
this.textBoxCurrentText = new Nikse.SubtitleEdit.Controls.SETextBox(); this.textBoxCurrentText = new Nikse.SubtitleEdit.Controls.SETextBox();
this.subtitleListView1 = new Nikse.SubtitleEdit.Controls.SubtitleListView(); this.subtitleListView1 = new Nikse.SubtitleEdit.Controls.SubtitleListView();
this.contextMenuStripUnknownWords = new System.Windows.Forms.ContextMenuStrip(this.components); this.contextMenuStripAllFixes = new System.Windows.Forms.ContextMenuStrip(this.components);
this.clearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItemClearFixes = new System.Windows.Forms.ToolStripMenuItem();
this.contextMenuStripGuessesUsed = new System.Windows.Forms.ContextMenuStrip(this.components);
this.toolStripMenuItemClearGuesses = new System.Windows.Forms.ToolStripMenuItem();
this.contextMenuStripListview.SuspendLayout(); this.contextMenuStripListview.SuspendLayout();
this.groupBoxOcrMethod.SuspendLayout(); this.groupBoxOcrMethod.SuspendLayout();
this.GroupBoxTesseractMethod.SuspendLayout(); this.GroupBoxTesseractMethod.SuspendLayout();
@ -135,6 +139,7 @@ namespace Nikse.SubtitleEdit.Forms
this.tabPageAllFixes.SuspendLayout(); this.tabPageAllFixes.SuspendLayout();
this.tabPageSuggestions.SuspendLayout(); this.tabPageSuggestions.SuspendLayout();
this.tabPageUnknownWords.SuspendLayout(); this.tabPageUnknownWords.SuspendLayout();
this.contextMenuStripUnknownWords.SuspendLayout();
this.groupBoxImagePalette.SuspendLayout(); this.groupBoxImagePalette.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxBackground)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxBackground)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxEmphasis2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxEmphasis2)).BeginInit();
@ -145,7 +150,8 @@ namespace Nikse.SubtitleEdit.Forms
this.splitContainerBottom.Panel1.SuspendLayout(); this.splitContainerBottom.Panel1.SuspendLayout();
this.splitContainerBottom.Panel2.SuspendLayout(); this.splitContainerBottom.Panel2.SuspendLayout();
this.splitContainerBottom.SuspendLayout(); this.splitContainerBottom.SuspendLayout();
this.contextMenuStripUnknownWords.SuspendLayout(); this.contextMenuStripAllFixes.SuspendLayout();
this.contextMenuStripGuessesUsed.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// contextMenuStripListview // contextMenuStripListview
@ -688,6 +694,7 @@ namespace Nikse.SubtitleEdit.Forms
this.tabControlLogs.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.tabControlLogs.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.tabControlLogs.ContextMenuStrip = this.contextMenuStripAllFixes;
this.tabControlLogs.Controls.Add(this.tabPageAllFixes); this.tabControlLogs.Controls.Add(this.tabPageAllFixes);
this.tabControlLogs.Controls.Add(this.tabPageSuggestions); this.tabControlLogs.Controls.Add(this.tabPageSuggestions);
this.tabControlLogs.Controls.Add(this.tabPageUnknownWords); this.tabControlLogs.Controls.Add(this.tabPageUnknownWords);
@ -820,6 +827,20 @@ namespace Nikse.SubtitleEdit.Forms
this.listBoxUnknownWords.SelectedIndexChanged += new System.EventHandler(this.ListBoxLogSelectedIndexChanged); this.listBoxUnknownWords.SelectedIndexChanged += new System.EventHandler(this.ListBoxLogSelectedIndexChanged);
this.listBoxUnknownWords.KeyDown += new System.Windows.Forms.KeyEventHandler(this.listBoxCopyToClipboard_KeyDown); this.listBoxUnknownWords.KeyDown += new System.Windows.Forms.KeyEventHandler(this.listBoxCopyToClipboard_KeyDown);
// //
// contextMenuStripUnknownWords
//
this.contextMenuStripUnknownWords.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.clearToolStripMenuItem});
this.contextMenuStripUnknownWords.Name = "contextMenuStripUnknownWords";
this.contextMenuStripUnknownWords.Size = new System.Drawing.Size(102, 26);
//
// clearToolStripMenuItem
//
this.clearToolStripMenuItem.Name = "clearToolStripMenuItem";
this.clearToolStripMenuItem.Size = new System.Drawing.Size(101, 22);
this.clearToolStripMenuItem.Text = "Clear";
this.clearToolStripMenuItem.Click += new System.EventHandler(this.clearToolStripMenuItem_Click);
//
// checkBoxPromptForUnknownWords // checkBoxPromptForUnknownWords
// //
this.checkBoxPromptForUnknownWords.AutoSize = true; this.checkBoxPromptForUnknownWords.AutoSize = true;
@ -1115,19 +1136,33 @@ namespace Nikse.SubtitleEdit.Forms
this.subtitleListView1.SelectedIndexChanged += new System.EventHandler(this.SubtitleListView1SelectedIndexChanged); this.subtitleListView1.SelectedIndexChanged += new System.EventHandler(this.SubtitleListView1SelectedIndexChanged);
this.subtitleListView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.subtitleListView1_KeyDown); this.subtitleListView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.subtitleListView1_KeyDown);
// //
// contextMenuStripUnknownWords // contextMenuStripAllFixes
// //
this.contextMenuStripUnknownWords.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.contextMenuStripAllFixes.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.clearToolStripMenuItem}); this.toolStripMenuItemClearFixes});
this.contextMenuStripUnknownWords.Name = "contextMenuStripUnknownWords"; this.contextMenuStripAllFixes.Name = "contextMenuStripUnknownWords";
this.contextMenuStripUnknownWords.Size = new System.Drawing.Size(153, 48); this.contextMenuStripAllFixes.Size = new System.Drawing.Size(102, 26);
// //
// clearToolStripMenuItem // toolStripMenuItemClearFixes
// //
this.clearToolStripMenuItem.Name = "clearToolStripMenuItem"; this.toolStripMenuItemClearFixes.Name = "toolStripMenuItemClearFixes";
this.clearToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.toolStripMenuItemClearFixes.Size = new System.Drawing.Size(101, 22);
this.clearToolStripMenuItem.Text = "Clear"; this.toolStripMenuItemClearFixes.Text = "Clear";
this.clearToolStripMenuItem.Click += new System.EventHandler(this.clearToolStripMenuItem_Click); this.toolStripMenuItemClearFixes.Click += new System.EventHandler(this.toolStripMenuItemClearFixes_Click);
//
// contextMenuStripGuessesUsed
//
this.contextMenuStripGuessesUsed.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripMenuItemClearGuesses});
this.contextMenuStripGuessesUsed.Name = "contextMenuStripUnknownWords";
this.contextMenuStripGuessesUsed.Size = new System.Drawing.Size(153, 48);
//
// toolStripMenuItemClearGuesses
//
this.toolStripMenuItemClearGuesses.Name = "toolStripMenuItemClearGuesses";
this.toolStripMenuItemClearGuesses.Size = new System.Drawing.Size(152, 22);
this.toolStripMenuItemClearGuesses.Text = "Clear";
this.toolStripMenuItemClearGuesses.Click += new System.EventHandler(this.toolStripMenuItemClearGuesses_Click);
// //
// VobSubOcr // VobSubOcr
// //
@ -1172,6 +1207,7 @@ namespace Nikse.SubtitleEdit.Forms
this.tabPageAllFixes.ResumeLayout(false); this.tabPageAllFixes.ResumeLayout(false);
this.tabPageSuggestions.ResumeLayout(false); this.tabPageSuggestions.ResumeLayout(false);
this.tabPageUnknownWords.ResumeLayout(false); this.tabPageUnknownWords.ResumeLayout(false);
this.contextMenuStripUnknownWords.ResumeLayout(false);
this.groupBoxImagePalette.ResumeLayout(false); this.groupBoxImagePalette.ResumeLayout(false);
this.groupBoxImagePalette.PerformLayout(); this.groupBoxImagePalette.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxBackground)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxBackground)).EndInit();
@ -1185,7 +1221,8 @@ namespace Nikse.SubtitleEdit.Forms
this.splitContainerBottom.Panel1.PerformLayout(); this.splitContainerBottom.Panel1.PerformLayout();
this.splitContainerBottom.Panel2.ResumeLayout(false); this.splitContainerBottom.Panel2.ResumeLayout(false);
this.splitContainerBottom.ResumeLayout(false); this.splitContainerBottom.ResumeLayout(false);
this.contextMenuStripUnknownWords.ResumeLayout(false); this.contextMenuStripAllFixes.ResumeLayout(false);
this.contextMenuStripGuessesUsed.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
@ -1284,5 +1321,9 @@ namespace Nikse.SubtitleEdit.Forms
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
private System.Windows.Forms.ContextMenuStrip contextMenuStripUnknownWords; private System.Windows.Forms.ContextMenuStrip contextMenuStripUnknownWords;
private System.Windows.Forms.ToolStripMenuItem clearToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem clearToolStripMenuItem;
private System.Windows.Forms.ContextMenuStrip contextMenuStripAllFixes;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemClearFixes;
private System.Windows.Forms.ContextMenuStrip contextMenuStripGuessesUsed;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemClearGuesses;
} }
} }

View File

@ -267,6 +267,10 @@ namespace Nikse.SubtitleEdit.Forms
bDNXMLToolStripMenuItem.Text = Configuration.Settings.Language.Main.Menu.File.ExportBdnXml; bDNXMLToolStripMenuItem.Text = Configuration.Settings.Language.Main.Menu.File.ExportBdnXml;
bluraySupToolStripMenuItem.Text = Configuration.Settings.Language.Main.Menu.File.ExportBluRaySup; bluraySupToolStripMenuItem.Text = Configuration.Settings.Language.Main.Menu.File.ExportBluRaySup;
toolStripMenuItemClearFixes.Text = Configuration.Settings.Language.DvdSubrip.Clear;
toolStripMenuItemClearGuesses.Text = Configuration.Settings.Language.DvdSubrip.Clear;
clearToolStripMenuItem.Text = Configuration.Settings.Language.DvdSubrip.Clear;
comboBoxTesseractLanguages.Left = labelTesseractLanguage.Left + labelTesseractLanguage.Width; comboBoxTesseractLanguages.Left = labelTesseractLanguage.Left + labelTesseractLanguage.Width;
Utilities.InitializeSubtitleFont(subtitleListView1); Utilities.InitializeSubtitleFont(subtitleListView1);
@ -4282,5 +4286,15 @@ namespace Nikse.SubtitleEdit.Forms
listBoxUnknownWords.Items.Clear(); listBoxUnknownWords.Items.Clear();
} }
private void toolStripMenuItemClearFixes_Click(object sender, EventArgs e)
{
listBoxLog.Items.Clear();
}
private void toolStripMenuItemClearGuesses_Click(object sender, EventArgs e)
{
listBoxLogSuggestions.Items.Clear();
}
} }
} }

View File

@ -120,6 +120,9 @@
<metadata name="contextMenuStripListview.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="contextMenuStripListview.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
<metadata name="contextMenuStripAllFixes.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>997, 17</value>
</metadata>
<metadata name="contextMenuStripUnknownWords.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="contextMenuStripUnknownWords.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>761, 17</value> <value>761, 17</value>
</metadata> </metadata>
@ -135,4 +138,7 @@
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>621, 17</value> <value>621, 17</value>
</metadata> </metadata>
<metadata name="contextMenuStripGuessesUsed.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1186, 17</value>
</metadata>
</root> </root>

View File

@ -112,6 +112,10 @@ namespace Nikse.SubtitleEdit.Logic
public string ModifySelectionText { get; set; } public string ModifySelectionText { get; set; }
public string ModifySelectionRule { get; set; } public string ModifySelectionRule { get; set; }
public bool ModifySelectionCaseSensitive { get; set; } public bool ModifySelectionCaseSensitive { get; set; }
public string ExportVobSubFontName { get; set; }
public int ExportVobSubFontSize { get; set; }
public string ExportBluRayFontName { get; set; }
public int ExportBluRaybFontSize { get; set; }
public ToolsSettings() public ToolsSettings()
{ {
@ -1342,7 +1346,18 @@ namespace Nikse.SubtitleEdit.Logic
subNode = node.SelectSingleNode("ModifySelectionCaseSensitive"); subNode = node.SelectSingleNode("ModifySelectionCaseSensitive");
if (subNode != null) if (subNode != null)
settings.Tools.ModifySelectionCaseSensitive = Convert.ToBoolean(subNode.InnerText); settings.Tools.ModifySelectionCaseSensitive = Convert.ToBoolean(subNode.InnerText);
subNode = node.SelectSingleNode("ExportVobSubFontName");
if (subNode != null)
settings.Tools.ExportVobSubFontName = subNode.InnerText;
subNode = node.SelectSingleNode("ExportVobSubFontSize");
if (subNode != null)
settings.Tools.ExportVobSubFontSize = Convert.ToInt32(subNode.InnerText);
subNode = node.SelectSingleNode("ExportBluRayFontName");
if (subNode != null)
settings.Tools.ExportBluRayFontName = subNode.InnerText;
subNode = node.SelectSingleNode("ExportBluRaybFontSize");
if (subNode != null)
settings.Tools.ExportBluRaybFontSize = Convert.ToInt32(subNode.InnerText);
settings.SubtitleSettings = new Nikse.SubtitleEdit.Logic.SubtitleSettings(); settings.SubtitleSettings = new Nikse.SubtitleEdit.Logic.SubtitleSettings();
node = doc.DocumentElement.SelectSingleNode("SubtitleSettings"); node = doc.DocumentElement.SelectSingleNode("SubtitleSettings");
@ -2184,6 +2199,10 @@ namespace Nikse.SubtitleEdit.Logic
textWriter.WriteElementString("ModifySelectionRule", settings.Tools.ModifySelectionRule); textWriter.WriteElementString("ModifySelectionRule", settings.Tools.ModifySelectionRule);
textWriter.WriteElementString("ModifySelectionText", settings.Tools.ModifySelectionText); textWriter.WriteElementString("ModifySelectionText", settings.Tools.ModifySelectionText);
textWriter.WriteElementString("ModifySelectionCaseSensitive", settings.Tools.ModifySelectionCaseSensitive.ToString()); textWriter.WriteElementString("ModifySelectionCaseSensitive", settings.Tools.ModifySelectionCaseSensitive.ToString());
textWriter.WriteElementString("ExportVobSubFontName", settings.Tools.ExportVobSubFontName);
textWriter.WriteElementString("ExportVobSubFontSize", settings.Tools.ExportVobSubFontSize.ToString());
textWriter.WriteElementString("ExportBluRayFontName", settings.Tools.ExportBluRayFontName);
textWriter.WriteElementString("ExportBluRaybFontSize", settings.Tools.ExportBluRaybFontSize.ToString());
textWriter.WriteEndElement(); textWriter.WriteEndElement();
textWriter.WriteStartElement("SubtitleSettings", ""); textWriter.WriteStartElement("SubtitleSettings", "");