// start a real-time spell checking for the text.. private void mnuSpellCheck_Click(object sender, EventArgs e) { TextOffsetCorrection = 0; // re-set the offset.. // create a new instance of the spell checker class.. var spellChecker = new SpellChecker(); // create a new spell checking dialog (implementing the ISpellCheck) interface.. FormDialogSpellCheck.OwnerWindow = this; // set the locale to Finnish as some one might understand whats going on with the dialog, // if a more common locale would be used; FormDialogSpellCheck.Locale = "fi-FI"; var spellingDialog = new FormDialogSpellCheck(); // run the spell check.. spellChecker.RunSpellCheckInterface(spellingDialog, tbSpellCheck.Text, false); }
// start a real-time spell checking for the text.. private void mnuSpellCheck_Click(object sender, EventArgs e) { TextOffsetCorrection = 0; // re-set the offset.. // create a new instance of the spell checker class.. var spellChecker = new SpellChecker(); // create a new spell checking dialog (implementing the ISpellCheck) interface.. FormDialogSpellCheck.OwnerWindow = this; // don't set to locale to Finnish as some one might have difficulties in understanding the dialog, // which can be localized; // FormDialogSpellCheck.Locale = "fi-FI"; var spellingDialog = new FormDialogSpellCheck(); // run the spell check.. spellChecker.RunSpellCheckInterface(spellingDialog, tbMain.Text, false); }