本文整理汇总了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();
}
示例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;
}
示例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;
}
示例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)
{
//.........这里部分代码省略.........