More help when showing spell check dialog - thx Hawke42 :)

git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@894 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
niksedk 2012-01-05 16:42:49 +00:00
parent e2d349c3ac
commit fa233006ce
3 changed files with 171 additions and 81 deletions

View File

@ -54,6 +54,7 @@
this.buttonSkipText = new System.Windows.Forms.Button(); this.buttonSkipText = new System.Windows.Forms.Button();
this.buttonChangeWholeText = new System.Windows.Forms.Button(); this.buttonChangeWholeText = new System.Windows.Forms.Button();
this.textBoxWholeText = new System.Windows.Forms.TextBox(); this.textBoxWholeText = new System.Windows.Forms.TextBox();
this.labelActionInfo = new System.Windows.Forms.Label();
this.contextMenuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout();
this.groupBoxWordNotFound.SuspendLayout(); this.groupBoxWordNotFound.SuspendLayout();
this.groupBoxSuggestions.SuspendLayout(); this.groupBoxSuggestions.SuspendLayout();
@ -69,6 +70,8 @@
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);
this.buttonAddToDictionary.MouseEnter += new System.EventHandler(this.buttonAddToDictionary_MouseEnter);
this.buttonAddToDictionary.MouseLeave += new System.EventHandler(this.buttonAddToDictionary_MouseLeave);
// //
// buttonSkipOnce // buttonSkipOnce
// //
@ -79,6 +82,8 @@
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);
this.buttonSkipOnce.MouseEnter += new System.EventHandler(this.buttonSkipOnce_MouseEnter);
this.buttonSkipOnce.MouseLeave += new System.EventHandler(this.buttonSkipOnce_MouseLeave);
// //
// comboBoxDictionaries // comboBoxDictionaries
// //
@ -170,6 +175,8 @@
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);
this.buttonSkipAll.MouseEnter += new System.EventHandler(this.buttonSkipAll_MouseEnter);
this.buttonSkipAll.MouseLeave += new System.EventHandler(this.buttonSkipAll_MouseLeave);
// //
// buttonChange // buttonChange
// //
@ -180,6 +187,8 @@
this.buttonChange.Text = "Change"; this.buttonChange.Text = "Change";
this.buttonChange.UseVisualStyleBackColor = true; this.buttonChange.UseVisualStyleBackColor = true;
this.buttonChange.Click += new System.EventHandler(this.ButtonChangeClick); this.buttonChange.Click += new System.EventHandler(this.ButtonChangeClick);
this.buttonChange.MouseEnter += new System.EventHandler(this.buttonChange_MouseEnter);
this.buttonChange.MouseLeave += new System.EventHandler(this.buttonChange_MouseLeave);
// //
// buttonUseSuggestion // buttonUseSuggestion
// //
@ -200,6 +209,8 @@
this.buttonChangeAll.Text = "Change all"; this.buttonChangeAll.Text = "Change all";
this.buttonChangeAll.UseVisualStyleBackColor = true; this.buttonChangeAll.UseVisualStyleBackColor = true;
this.buttonChangeAll.Click += new System.EventHandler(this.ButtonChangeAllClick); this.buttonChangeAll.Click += new System.EventHandler(this.ButtonChangeAllClick);
this.buttonChangeAll.MouseEnter += new System.EventHandler(this.buttonChangeAll_MouseEnter);
this.buttonChangeAll.MouseLeave += new System.EventHandler(this.buttonChangeAll_MouseLeave);
// //
// buttonUseSuggestionAlways // buttonUseSuggestionAlways
// //
@ -220,6 +231,8 @@
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);
this.buttonAddToNames.MouseEnter += new System.EventHandler(this.buttonAddToNames_MouseEnter);
this.buttonAddToNames.MouseLeave += new System.EventHandler(this.buttonAddToNames_MouseLeave);
// //
// groupBoxWordNotFound // groupBoxWordNotFound
// //
@ -312,11 +325,22 @@
this.textBoxWholeText.Size = new System.Drawing.Size(280, 63); this.textBoxWholeText.Size = new System.Drawing.Size(280, 63);
this.textBoxWholeText.TabIndex = 31; this.textBoxWholeText.TabIndex = 31;
// //
// labelActionInfo
//
this.labelActionInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.labelActionInfo.AutoSize = true;
this.labelActionInfo.Location = new System.Drawing.Point(11, 311);
this.labelActionInfo.Name = "labelActionInfo";
this.labelActionInfo.Size = new System.Drawing.Size(79, 13);
this.labelActionInfo.TabIndex = 41;
this.labelActionInfo.Text = "labelActionInfo";
//
// SpellCheck // SpellCheck
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(605, 341); this.ClientSize = new System.Drawing.Size(605, 341);
this.Controls.Add(this.labelActionInfo);
this.Controls.Add(this.richTextBoxParagraph); this.Controls.Add(this.richTextBoxParagraph);
this.Controls.Add(this.comboBoxDictionaries); this.Controls.Add(this.comboBoxDictionaries);
this.Controls.Add(this.buttonEditWholeText); this.Controls.Add(this.buttonEditWholeText);
@ -374,5 +398,6 @@
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem addXToNamesnoiseListToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem addXToNamesnoiseListToolStripMenuItem;
private System.Windows.Forms.CheckBox checkBoxAutoChangeNames; private System.Windows.Forms.CheckBox checkBoxAutoChangeNames;
private System.Windows.Forms.Label labelActionInfo;
} }
} }

View File

@ -95,7 +95,7 @@ namespace Nikse.SubtitleEdit.Forms
public SpellCheck() public SpellCheck()
{ {
InitializeComponent(); InitializeComponent();
labelActionInfo.Text = string.Empty;
Text = Configuration.Settings.Language.SpellCheck.Title; Text = Configuration.Settings.Language.SpellCheck.Title;
labelFullText.Text = Configuration.Settings.Language.SpellCheck.FullText; labelFullText.Text = Configuration.Settings.Language.SpellCheck.FullText;
labelLanguage.Text = Configuration.Settings.Language.SpellCheck.Language; labelLanguage.Text = Configuration.Settings.Language.SpellCheck.Language;
@ -887,5 +887,70 @@ namespace Nikse.SubtitleEdit.Forms
buttonChangeAll.Enabled = buttonChange.Enabled; buttonChangeAll.Enabled = buttonChange.Enabled;
} }
private void buttonAddToDictionary_MouseEnter(object sender, EventArgs e)
{
ShowActionInfo(Configuration.Settings.Language.SpellCheck.AddToUserDictionary, textBoxWord.Text);
}
private void ShowActionInfo(string label, string text)
{
labelActionInfo.Text = string.Format("{0}: {1}", label, text.Trim());
}
private void buttonAddToDictionary_MouseLeave(object sender, EventArgs e)
{
labelActionInfo.Text = string.Empty;
}
private void buttonAddToNames_MouseEnter(object sender, EventArgs e)
{
ShowActionInfo(Configuration.Settings.Language.SpellCheck.AddToNamesAndIgnoreList, textBoxWord.Text);
}
private void buttonAddToNames_MouseLeave(object sender, EventArgs e)
{
labelActionInfo.Text = string.Empty;
}
private void buttonSkipOnce_MouseEnter(object sender, EventArgs e)
{
ShowActionInfo(Configuration.Settings.Language.SpellCheck.SkipOnce, textBoxWord.Text);
}
private void buttonSkipOnce_MouseLeave(object sender, EventArgs e)
{
labelActionInfo.Text = string.Empty;
}
private void buttonSkipAll_MouseEnter(object sender, EventArgs e)
{
ShowActionInfo(Configuration.Settings.Language.SpellCheck.SkipAll, textBoxWord.Text);
}
private void buttonSkipAll_MouseLeave(object sender, EventArgs e)
{
labelActionInfo.Text = string.Empty;
}
private void buttonChange_MouseEnter(object sender, EventArgs e)
{
ShowActionInfo(Configuration.Settings.Language.SpellCheck.Change, _currentWord + " > " + textBoxWord.Text);
}
private void buttonChange_MouseLeave(object sender, EventArgs e)
{
labelActionInfo.Text = string.Empty;
}
private void buttonChangeAll_MouseEnter(object sender, EventArgs e)
{
ShowActionInfo(Configuration.Settings.Language.SpellCheck.ChangeAll, _currentWord + " > " + textBoxWord.Text);
}
private void buttonChangeAll_MouseLeave(object sender, EventArgs e)
{
labelActionInfo.Text = string.Empty;
}
} }
} }