Esempio n. 1
0
 public CharacterRange Find(CharacterRange r, Regex findExpression)
 {
     return(Find(r, findExpression, false));
 }
Esempio n. 2
0
 public List <CharacterRange> ReplaceAll(CharacterRange rangeToSearch, string searchString, string replaceString, SearchFlags flags, bool mark, bool highlight)
 {
     return(ReplaceAll(rangeToSearch.MinPosition, rangeToSearch.MaxPosition, searchString, replaceString, flags, mark, highlight));
 }
Esempio n. 3
0
        public CharacterRange FindNext(string searchString, bool wrap, SearchFlags flags, CharacterRange searchRange)
        {
            var caret = Scintilla.CurrentPosition;

            if (!(caret >= searchRange.MinPosition && caret <= searchRange.MaxPosition))
            {
                return(Find(searchRange.MinPosition, searchRange.MaxPosition, searchString, flags));
            }

            var r = Find(caret, searchRange.MaxPosition, searchString, flags);

            if (r.MinPosition != r.MaxPosition)
            {
                return(r);
            }
            else if (wrap)
            {
                return(Find(searchRange.MinPosition, caret, searchString, flags));
            }
            else
            {
                return(new CharacterRange());
            }
        }
Esempio n. 4
0
        public CharacterRange FindPrevious(string searchString, bool wrap, SearchFlags flags, CharacterRange searchRange)
        {
            var caret = Scintilla.CurrentPosition;

            if (!(caret >= searchRange.MinPosition && caret <= searchRange.MaxPosition))
            {
                return(Find(searchRange.MaxPosition, searchRange.MinPosition, searchString, flags));
            }

            var anchor = Scintilla.AnchorPosition;

            if (!(anchor >= searchRange.MinPosition && anchor <= searchRange.MaxPosition))
            {
                anchor = caret;
            }

            var r = Find(anchor, searchRange.MinPosition, searchString, flags);

            if (r.MinPosition != r.MaxPosition)
            {
                return(r);
            }
            else if (wrap)
            {
                return(Find(searchRange.MaxPosition, anchor, searchString, flags));
            }
            else
            {
                return(new CharacterRange());
            }
        }
Esempio n. 5
0
 public CharacterRange Find(CharacterRange rangeToSearch, string searchString, SearchFlags searchflags)
 {
     return(Find(rangeToSearch.MinPosition, rangeToSearch.MaxPosition, searchString, searchflags));
 }