本文整理匯總了C#中Mono.TextEditor.TextEditorData.FindCurrentWordEnd方法的典型用法代碼示例。如果您正苦於以下問題:C# TextEditorData.FindCurrentWordEnd方法的具體用法?C# TextEditorData.FindCurrentWordEnd怎麽用?C# TextEditorData.FindCurrentWordEnd使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Mono.TextEditor.TextEditorData
的用法示例。
在下文中一共展示了TextEditorData.FindCurrentWordEnd方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: FindSegment
private TextSegment FindSegment(double x, double y, TextEditorData editor)
{
var xWithMarginOffset = x - editor.Parent.TextViewMargin.XOffset;
var location = editor.Parent.PointToLocation(xWithMarginOffset, y);
var offset = editor.Parent.LocationToOffset(location);
var startWord = editor.FindCurrentWordStart(offset);
var endWord = editor.FindCurrentWordEnd(offset);
return new TextSegment(startWord, endWord - startWord);
}
示例2: CurrentWord
public static CommandRange CurrentWord(TextEditorData editor)
{
var start = editor.FindCurrentWordStart(editor.Caret.Offset);
var end = editor.FindCurrentWordEnd(editor.Caret.Offset);
return new CommandRange(start, end);
}
示例3: InnerWord
public static void InnerWord(TextEditorData data)
{
var start = data.FindCurrentWordStart (data.Caret.Offset);
var end = data.FindCurrentWordEnd (data.Caret.Offset);
data.SelectionRange = new TextSegment(start, end - start);
}
示例4: WordEnd
public static void WordEnd(TextEditorData data)
{
data.Caret.Offset = data.FindCurrentWordEnd (data.Caret.Offset);
}