PositionInRange() 공개 메소드

public PositionInRange ( int position ) : bool
position int
리턴 bool
예제 #1
0
        public Range FindPrevious(string searchString, bool wrap, SearchFlags flags, Range searchRange)
        {
            int caret = Scintilla.Caret.Position;
            if (!searchRange.PositionInRange(caret))
                return Find(searchRange.End, searchRange.Start, searchString, flags);

            int anchor = Scintilla.Caret.Anchor;
            if (!searchRange.PositionInRange(anchor))
                anchor = caret;

            Range r = Find(anchor, searchRange.Start, searchString, flags);
            if (r != null)
                return r;
            else if (wrap)
                return Find(searchRange.End, anchor, searchString, flags);
            else
                return null;
        }
예제 #2
0
        public Range FindPrevious(Regex findExpression, bool wrap, Range searchRange)
        {
            int caret = Scintilla.Caret.Position;
            if (!searchRange.PositionInRange(caret))
                return Find(searchRange.Start, searchRange.End, findExpression, true);

            int anchor = Scintilla.Caret.Anchor;
            if (!searchRange.PositionInRange(anchor))
                anchor = caret;

            Range r = Find(searchRange.Start, anchor, findExpression, true);
            if (r != null)
                return r;
            else if (wrap)
                return Find(anchor, searchRange.End, findExpression, true);
            else
                return null;
        }
예제 #3
0
        public Range FindNext(Regex findExpression, bool wrap, Range searchRange)
        {
            int caret = Scintilla.Caret.Position;
            if (!searchRange.PositionInRange(caret))
                return Find(searchRange.Start, searchRange.End, findExpression, false);

            Range r = Find(caret, searchRange.End, findExpression);
            if (r != null)
                return r;
            else if (wrap)
                return Find(searchRange.Start, caret, findExpression);
            else
                return null;
        }
예제 #4
0
        public Range FindNext(string searchString, bool wrap, SearchFlags flags, Range searchRange)
        {
            int caret = Scintilla.Caret.Position;
            if (!searchRange.PositionInRange(caret))
                return Find(searchRange.Start, searchRange.End, searchString, flags);

            Range r = Find(caret, searchRange.End, searchString, flags);
            if (r != null)
                return r;
            else if (wrap)
                return Find(searchRange.Start, caret, searchString, flags);
            else
                return null;
        }
예제 #5
0
 public bool IntersectsWith(Range otherRange)
 {
     return otherRange.PositionInRange(this._start) | otherRange.PositionInRange(this._end) | this.PositionInRange(otherRange.Start) | this.PositionInRange(otherRange.End);
 }