Пример #1
0
        //-----------------------------------------------------
        //
        //  Constructors 
        //
        //----------------------------------------------------- 
 
        #region Constructors
 
        // Creates a new instance.
        internal SpellingError(Speller speller, ITextPointer start, ITextPointer end)
        {
            Invariant.Assert(start.CompareTo(end) < 0); 

            _speller = speller; 
            _start = start.GetFrozenPointer(LogicalDirection.Forward); 
            _end = end.GetFrozenPointer(LogicalDirection.Backward);
        } 
 // Constructor.
 internal SpellerHighlightLayer(Speller speller)
 {
     _speller = speller;
 }
Пример #3
0
        // Worker method for set_IsSpellCheckEnabled.
        // Note that enabling the spell checker is also gated on the IsReadOnly 
        // and IsEnabled properties of the current UiScope. 
        internal void SetSpellCheckEnabled(bool value)
        { 
            value = value && !this.IsReadOnly && this._IsEnabled;

            if (value && _speller == null)
            { 
                // Start up the speller.
                _speller = new Speller(this); 
            } 
            else if (!value && _speller != null)
            { 
                // Shut down the speller.
                _speller.Detach();
                _speller = null;
            } 
        }