//------------------------------------------------------ // // Constructors // //------------------------------------------------------ #region Constructors // Constructor. internal SpellerStatusTable(ITextPointer textContainerStart, SpellerHighlightLayer highlightLayer) { _highlightLayer = highlightLayer; _runList = new ArrayList(1); _runList.Add(new Run(textContainerStart, RunType.Dirty)); }
private bool EnsureInitialized() { if (_spellerInterop != null) return true; if (_failedToInit) return false; Invariant.Assert(_highlightLayer == null); Invariant.Assert(_statusTable == null); try { _spellerInterop = new SpellerInterop(); } catch (DllNotFoundException) { _failedToInit = true; } catch (EntryPointNotFoundException) { _failedToInit = true; } if (_failedToInit) return false; _highlightLayer = new SpellerHighlightLayer(this); _statusTable = new SpellerStatusTable(_textEditor.TextContainer.Start, _highlightLayer); _textEditor.TextContainer.Highlights.AddLayer(_highlightLayer); // _spellerInterop.SetContextOption("IsSpellSuggestingMWEs", false); _spellingReform = (SpellingReform)_textEditor.UiScope.GetValue(SpellCheck.SpellingReformProperty); return true; }