private void SpellChecker_MisspelledWord(object sender, NetSpell.SpellChecker.SpellingEventArgs args) { TraceWriter.TraceVerbose("Misspelled Word:{0}", args.Word); int selectionStart = base.SelectionStart; int selectionLength = base.SelectionLength; base.Select(args.TextIndex, args.Word.Length); NativeMethods.CHARFORMAT2 cf = new NativeMethods.CHARFORMAT2(); cf.cbSize = Marshal.SizeOf(cf); cf.dwMask = NativeMethods.CFM_UNDERLINETYPE; cf.bUnderlineType = (byte)this.MisspelledStyle; cf.bUnderlineType |= (byte)this.MisspelledColor; int result = NativeMethods.SendMessage(base.Handle, NativeMethods.EM_SETCHARFORMAT, NativeMethods.SCF_SELECTION | NativeMethods.SCF_WORD, ref cf); base.Select(selectionStart, selectionLength); }
private void spelling_ReplacedWord(object sender, NetSpell.SpellChecker.ReplaceWordEventArgs e) { int start = this.TextBox.SelectionStart; int length = this.TextBox.SelectionLength; this.TextBox.Select(e.TextIndex, e.Word.Length); this.TextBox.SelectedText = e.ReplacementWord; if (start > this.TextBox.Text.Length) start = this.TextBox.Text.Length; if ((start + length) > this.TextBox.Text.Length) length = 0; this.TextBox.Select(start, length); }
void spelling_MisspelledWord(object sender, NetSpell.SpellChecker.SpellingEventArgs e) { customUnderlines.Lines.Add(new TextPos(e.TextIndex, e.TextIndex + e.Word.Length)); }
private void SpellChecker_MisspelledWord(object sender, NetSpell.SpellChecker.SpellingEventArgs e) { this.UpdateDisplay(this.SpellChecker.Text, e.Word, e.WordIndex, e.TextIndex); //turn on ignore all option this.IgnoreAllButton.Enabled = true; this.ReplaceAllButton.Enabled = true; //generate suggestions SpellChecker.Suggest(); //display suggestions this.SuggestionList.Items.AddRange((string[])SpellChecker.Suggestions.ToArray(typeof(string))); }
private void SpellChecker_DoubledWord(object sender, NetSpell.SpellChecker.SpellingEventArgs e) { this.UpdateDisplay(this.SpellChecker.Text, e.Word, e.WordIndex, e.TextIndex); //turn off ignore all option on double word this.IgnoreAllButton.Enabled = false; this.ReplaceAllButton.Enabled = false; this.AddButton.Enabled = false; }
protected void SpellChecker_DoubledWord(object sender, NetSpell.SpellChecker.SpellingEventArgs e) { this.SaveValues(); lblNotInDictionary.Text = GetString("SpellCheck.DoubledWord"); this.CurrentWord.Text = this.SpellChecker.CurrentWord; this.Suggestions.Items.Clear(); this.ReplacementWord.Text = string.Empty; this.SpellMode.Value = "suggest"; this.StatusText.Text = string.Format(wordCounterString, this.SpellChecker.WordIndex + 1, this.SpellChecker.WordCount); }
protected void SpellChecker_MisspelledWord(object sender, NetSpell.SpellChecker.SpellingEventArgs e) { this.SaveValues(); this.CurrentWord.Text = this.SpellChecker.CurrentWord; this.SpellChecker.Suggest(); this.Suggestions.DataSource = this.SpellChecker.Suggestions; this.Suggestions.DataBind(); this.ReplacementWord.Text = string.Empty; this.SpellMode.Value = "suggest"; this.StatusText.Text = string.Format(wordCounterString, this.SpellChecker.WordIndex + 1, this.SpellChecker.WordCount); }
private void SpellChecker_DeletedWord(object sender, NetSpell.SpellChecker.SpellingEventArgs e) { int start = this.Document.SelectionStart; int length = this.Document.SelectionLength; this.Document.Select(e.TextIndex, e.Word.Length); this.Document.SelectedText = ""; if(start > this.Document.Text.Length) start = this.Document.Text.Length; if((start + length) > this.Document.Text.Length) length = 0; this.Document.Select(start, length); }
private void spellCheck_ReplacedWord(object sender, NetSpell.SpellChecker.ReplaceWordEventArgs e) { Debug.Assert(wb.Document != null, "wb.Document != null"); Debug.Assert(wb.Document.Body != null, "wb.Document.Body != null"); wb.Document.Body.InnerHtml = e.Text; }
private void spellCheck_DeletedWord(object sender, NetSpell.SpellChecker.SpellingEventArgs e) { var htmlDocument = wb.Document; if (htmlDocument != null) if (htmlDocument.Body != null) htmlDocument.Body.InnerHtml = e.Text; }
private void spelling_DeletedWord(object sender, NetSpell.SpellChecker.SpellingEventArgs e) { int start = this.demoRichText.SelectionStart; int length = this.demoRichText.SelectionLength; this.demoRichText.Select(e.TextIndex, e.Word.Length); this.demoRichText.SelectedText = string.Empty; if (start > this.demoRichText.Text.Length) start = this.demoRichText.Text.Length; if ((start + length) > this.demoRichText.Text.Length) length = 0; this.demoRichText.Select(start, length); }
private void SpellingMisspelledWord(object sender, NetSpell.SpellChecker.SpellingEventArgs args) { // Nothing to do }