//------------------------------------------------------------------------ #region ** object model /// <summary> /// Initializes the dialog to use the given parameters. /// </summary> /// <param name="spell"><see cref="C1SpellChecker"/> to use for spelling.</param> /// <param name="editor"><see cref="ISpellCheckableEditor"/> that contains the text to spell-check.</param> /// <param name="errors"><see cref="CharRangeList"/> that contains the initial error list.</param> public void Initialize(C1SpellChecker spell, ISpellCheckableEditor editor, CharRangeList errors) { _spell = spell; _editor = editor; _errors = errors; if (_errors == null) { _errors = _spell.CheckText(_editor.Text); } _errorCount += _errors.Count; }
//------------------------------------------------------------------------ #region ** object model /// <summary> /// Initializes the dialog to use the given parameters. /// </summary> /// <param name="spell"><see cref="C1SpellChecker"/> to use for spelling.</param> /// <param name="editor"><see cref="ISpellCheckableEditor"/> that contains the text to spell-check.</param> /// <param name="errors"><see cref="CharRangeList"/> that contains the initial error list.</param> public void Initialize(C1SpellChecker spell, ISpellCheckableEditor editor, CharRangeList errors) { // save references to all objects _spell = spell; _editor = editor; _errors = errors; if (_errors == null) { _errors = _spell.CheckText(_editor.Text); } _errorCount += _errors.Count; // go show the first error ErrorIndex = 0; }
//------------------------------------------------------------------------ #region ** object model /// <summary> /// Initializes the dialog to use the given parameters. /// </summary> /// <param name="spell"><see cref="C1SpellChecker"/> to use for spelling.</param> /// <param name="editor"><see cref="ISpellCheckableEditor"/> that contains the text to spell-check.</param> /// <param name="errors"><see cref="CharRangeList"/> that contains the initial error list.</param> public void Initialize(C1SpellChecker spell, ISpellCheckableEditor editor, CharRangeList errors) { // initialize members _spell = spell; _editor = editor; _errors = errors; // initialize 'change all' list _changeAll.Clear(); foreach (string key in _spell.AutoReplaceList.Keys) { _changeAll[key] = _spell.AutoReplaceList[key]; } // initialize error list if (_errors == null) { _errors = _spell.CheckText(_editor.Text); } _errorCount += _errors.Count; }
/// <summary> /// Initializes the dialog to use the given parameters. /// </summary> /// <param name="spell"><see cref="C1SpellChecker"/> to use for spelling.</param> /// <param name="editor"><see cref="ISpellCheckableEditor"/> that contains the text to spell-check.</param> /// <param name="errors"><see cref="CharRangeList"/> that contains the initial error list.</param> public void Initialize(C1SpellChecker spell, ISpellCheckableEditor editor, CharRangeList errors) { // save references to all objects _spell = spell; _editor = editor; _errors = errors; if (_errors == null) { _errors = _spell.CheckText(_editor.Text); } _errorCount += _errors.Count; // go show the first error ErrorIndex = 0; }