Ejemplo n.º 1
0
        public SpellChecker(string plainText, int cursorPosition = 0)
        {
            _plainText      = plainText;
            _cursorPosition = Normalize(plainText, cursorPosition);
            _textChecker    = new UITextChecker();

            MisspelledWords = new RunOnceSequence <NSRange>(new MisspelledWordsSequence(_textChecker, plainText));
        }
        public MisspelledWordsSequence(UITextChecker textChecker, string plainText, SpaceSeparatedRange range)
        {
            _textChecker = textChecker;
            _plainText   = plainText;

            _range = range;

            Completion = new Progress(plainText.Length);
        }
 public MisspelledWordsSequence(UITextChecker textChecker, string plainText, int startIndex = 0, int length = -1) : this(textChecker, plainText, new SpaceSeparatedRange(plainText, startIndex, length))
 {
 }
Ejemplo n.º 4
0
        public void Learn()
        {
            var word = MisspelledWord;

            UITextChecker.LearnWord(_plainText.Substring((int)word.Location, (int)word.Length).Trim());
        }