AGS.Editor.ScintillaWrapper.ShowMatchingBrace C# (CSharp) Метод

ShowMatchingBrace() публичный Метод

public ShowMatchingBrace ( bool beforeAndAfterCursor, bool alignIndentation ) : void
beforeAndAfterCursor bool
alignIndentation bool
Результат void
        public void ShowMatchingBrace(bool beforeAndAfterCursor, bool alignIndentation)
        {
            int currentPos = scintillaControl1.CurrentPos - 1;
            int matchPos = scintillaControl1.BraceMatch(currentPos);
            if ((matchPos < 0) && (beforeAndAfterCursor))
            {
                // try the following character instead
                currentPos++;
                matchPos = scintillaControl1.BraceMatch(currentPos);
            }
            if (matchPos >= 0)
            {
                if (alignIndentation)
                {
                    AlignIndentation(currentPos, matchPos);
                    currentPos = scintillaControl1.CurrentPos - 1;
                }
                scintillaControl1.BraceHighlight(matchPos, currentPos);
            }
            else
            {
                scintillaControl1.BraceBadLight(currentPos);
            }
            _braceMatchVisible = true;
            _doBraceMatch = false;
        }

Same methods

ScintillaWrapper::ShowMatchingBrace ( bool beforeAndAfterCursor ) : void
ScintillaWrapper