当前位置: 首页>>代码示例>>C#>>正文


C# ScintillaControl.PositionAfter方法代码示例

本文整理汇总了C#中ScintillaNet.ScintillaControl.PositionAfter方法的典型用法代码示例。如果您正苦于以下问题:C# ScintillaControl.PositionAfter方法的具体用法?C# ScintillaControl.PositionAfter怎么用?C# ScintillaControl.PositionAfter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ScintillaNet.ScintillaControl的用法示例。


在下文中一共展示了ScintillaControl.PositionAfter方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetCaretReadyToTrace

        public static void SetCaretReadyToTrace(ScintillaControl sci, Boolean insertNewLine)
        {
            GoToLineEnd(sci, false);
            if (NextNonWhiteCharIsOpenBrace(sci, sci.CurrentPos))
                sci.GotoPos(sci.PositionAfter(NextCharPosition(sci, sci.CurrentPos, "{")));

            if (insertNewLine) sci.NewLine();
        }
开发者ID:heon21st,项目名称:flashdevelop,代码行数:8,代码来源:PluginMain.cs

示例2: GetWordEndPositionByWordChar

        public static Int32 GetWordEndPositionByWordChar(ScintillaControl sci, Int32 position)
        {
            if (IsWordChar((byte)sci.CharAt(position)) == false)
                return position;

            Int32 pos = position;
            Int32 aft = sci.PositionAfter(pos);
            while (IsWordChar((byte)sci.CharAt(aft)) == true)
            {
                pos = aft;
                aft = sci.PositionAfter(pos);
                if (aft == pos)
                    return aft;
            }

            return aft;
        }
开发者ID:heon21st,项目名称:flashdevelop,代码行数:17,代码来源:PluginMain.cs

示例3: NextNonWhiteCharPosition

        public static Int32 NextNonWhiteCharPosition(ScintillaControl sci, Int32 position)
        {
            Int32 pos = position;
            Int32 aft = sci.PositionAfter(pos);
            if (aft == pos)
                return -1;

            while (IsWhiteChar(sci.CharAt(aft)) == true)
            {
                pos = aft;
                aft = sci.PositionAfter(pos);
                if (aft == pos)
                    return -1;
            }

            return aft;
        }
开发者ID:heon21st,项目名称:flashdevelop,代码行数:17,代码来源:PluginMain.cs

示例4: PositionInfos

        public PositionInfos(ScintillaControl sci, Int32 position, String argString)
        {
            // Variables
            String[] vars = argString.Split('¤');
            this.ArgCurWord = vars[0];
            this.ArgPackageName = vars[1];
            this.ArgClassName = vars[2];
            this.ArgClassType = vars[3];
            this.ArgMemberName = vars[4];
            this.ArgMemberType = vars[5];

            // Selection
            Int32 ss = sci.SelectionStart;
            Int32 se = sci.SelectionEnd;
            if (se != ss)
            {
                this.SelectionStart = ss;
                this.SelectionEnd = se;
                this.HasSelection = true;
                if (sci.LineFromPosition(ss) != sci.LineFromPosition(se))
                    this.SelectionIsMultiline = true;
                else SelectedText = sci.SelText;
            }

            // Current
            this.CurrentPosition = position;
            this.CurrentCharCode = sci.CharAt(position);
            this.CurrentIsWhiteChar = (HelpTools.IsWhiteChar(this.CurrentCharCode));
            this.CurrentIsDotChar = (this.CurrentCharCode == 46);
            this.CurrentIsActionScriptChar = HelpTools.IsActionScriptChar(this.CurrentCharCode);
            this.CurrentIsWordChar = HelpTools.IsWordChar((byte)this.CurrentCharCode);
            Int32 s = sci.StyleAt(position);
            this.CurrentIsInsideComment = (s == 1 || s == 2 || s == 3 || s == 17);

            // Next
            Int32 np = sci.PositionAfter(position);
            if (np != position)
                this.NextPosition = np;
            else
                this.CaretIsAtEndOfDocument = true;

            // Word
            this.CodePage = sci.CodePage; // (UTF-8|Big Endian|Little Endian : 65001) (8 Bits|UTF-7 : 0)
            
            if (this.CurrentIsInsideComment == false && this.SelectionIsMultiline == false)
            {
                Int32 wsp = sci.WordStartPosition(position, true);
                // Attention (WordEndPosition n'est pas estimé comme par defaut)
                Int32 wep = sci.PositionBefore(sci.WordEndPosition(position, true));

                if (this.CodePage != 65001)
                {
                    wsp = HelpTools.GetWordStartPositionByWordChar(sci, position);
                    // Attention (WordEndPosition n'est pas estimé comme par defaut)
                    wep = sci.PositionBefore(HelpTools.GetWordEndPositionByWordChar(sci, position));
                }

                this.WordStartPosition = wsp;
                this.WordEndPosition = wep;

                if (this.CodePage == 65001)
                    this.WordFromPosition = this.ArgCurWord;
                else
                    this.WordFromPosition = HelpTools.GetText(sci, wsp, sci.PositionAfter(wep));

                if (position > wep)
                    this.CaretIsAfterLastLetter = true;
            }
            
            // Previous
            if (this.CurrentPosition > 0)
            {
                this.PreviousPosition = sci.PositionBefore(position);
                this.PreviousCharCode = sci.CharAt(this.PreviousPosition);
                this.PreviousIsWhiteChar = HelpTools.IsWhiteChar(this.PreviousCharCode);
                this.PreviousIsDotChar = (this.PreviousCharCode == 46);
                this.PreviousIsActionScriptChar = HelpTools.IsActionScriptChar(this.PreviousCharCode);
            }

            // Line
            this.CurrentLineIdx = sci.LineFromPosition(position);
            if (this.CurrentPosition > 0)
                this.PreviousLineIdx = sci.LineFromPosition(this.PreviousPosition);

            this.LineIdxMax = sci.LineCount - 1;
            this.LineStartPosition = HelpTools.LineStartPosition(sci, this.CurrentLineIdx);
            this.LineEndPosition = sci.LineEndPosition(this.CurrentLineIdx);
            this.NewLineMarker = LineEndDetector.GetNewLineMarker(sci.EOLMode);

            // Previous / Next
            if (this.WordStartPosition != -1)
            {
                this.PreviousNonWhiteCharPosition = HelpTools.PreviousNonWhiteCharPosition(sci, this.WordStartPosition);
                this.PreviousWordIsFunction = (sci.GetWordFromPosition(this.PreviousNonWhiteCharPosition) == "function");
                this.NextNonWhiteCharPosition = HelpTools.NextNonWhiteCharPosition(sci, this.WordEndPosition);
            }

            // Function
            if (this.PreviousWordIsFunction)
            {
//.........这里部分代码省略.........
开发者ID:heon21st,项目名称:flashdevelop,代码行数:101,代码来源:PluginMain.cs


注:本文中的ScintillaNet.ScintillaControl.PositionAfter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。