InkAnalyzerBase.GetTextRangeFromNodes - метод
Обновлен: Ноябрь 2007
Finds the text range in the recognized string that corresponds to a collection of context nodes.
Пространство имен: System.Windows.Ink.AnalysisCore
Сборка: IACore (в IACore.dll)
Синтаксис
'Декларация
Public Sub GetTextRangeFromNodes ( _
nodesToSearch As ContextNodeBaseCollection, _
<OutAttribute> ByRef start As Integer, _
<OutAttribute> ByRef length As Integer _
)
'Применение
Dim instance As InkAnalyzerBase
Dim nodesToSearch As ContextNodeBaseCollection
Dim start As Integer
Dim length As Integer
instance.GetTextRangeFromNodes(nodesToSearch, _
start, length)
public void GetTextRangeFromNodes(
ContextNodeBaseCollection nodesToSearch,
out int start,
out int length
)
public:
void GetTextRangeFromNodes(
ContextNodeBaseCollection^ nodesToSearch,
[OutAttribute] int% start,
[OutAttribute] int% length
)
public void GetTextRangeFromNodes(
ContextNodeBaseCollection nodesToSearch,
/** @attribute OutAttribute */ /** @ref */int start,
/** @attribute OutAttribute */ /** @ref */int length
)
public function GetTextRangeFromNodes(
nodesToSearch : ContextNodeBaseCollection,
start : int,
length : int
)
Параметры
- nodesToSearch
Тип: System.Windows.Ink.AnalysisCore.ContextNodeBaseCollection
The collection of context nodes for which to find the text range.
- start
Тип: System.Int32%
When this method returns, the start parameter contains a 32-bit signed integer that indicates the start of the text range. This parameter is passed uninitialized.
- length
Тип: System.Int32%
When this method returns, the length parameter contains a 32-bit signed integer that indicates the length of the text range. This parameter is passed uninitialized.
Заметки
If nodesToSearch contains ContextNodeBase objects that are not consecutive, then this method returns the smallest text range that covers all of the context nodes.
This method throws a System.ArgumentException when nodesToSearch contains a context node that is not associated with the InkAnalyzerBase.
Примеры
The following example retrieves the text range for the first line node of the InkAnalyzerBase, theInkAnalyzerBase.
' Get all line nodes.
Dim theLineNodes As System.Windows.Ink.AnalysisCore.ContextNodeBaseCollection = _
theInkAnalyzerBase.FindNodesOfType( _
System.Windows.Ink.AnalysisCore.ContextNodeTypeBase.Line)
' Remove all but the first line node.
If 0 < theLineNodes.Count Then
Dim firstLineNode As System.Windows.Ink.AnalysisCore.ContextNodeBase = theLineNodes(0)
theLineNodes.Clear()
theLineNodes.Add(firstLineNode)
End If
' Get the text range for the first line node.
Dim selectionStart As Integer = 0
Dim selectionLength As Integer = 0
If 0 < theLineNodes.Count Then
theInkAnalyzerBase.GetTextRangeFromNodes( _
theLineNodes, selectionStart, selectionLength)
End If
// Get all line nodes.
System.Windows.Ink.AnalysisCore.ContextNodeBaseCollection theLineNodes =
theInkAnalyzerBase.FindNodesOfType(
System.Windows.Ink.AnalysisCore.ContextNodeTypeBase.Line);
// Remove all but the first line node.
if (0 < theLineNodes.Count)
{
System.Windows.Ink.AnalysisCore.ContextNodeBase firstLineNode = theLineNodes[0];
theLineNodes.Clear();
theLineNodes.Add(firstLineNode);
}
// Get the text range for the first line node.
int selectionStart = 0;
int selectionLength = 0;
if (0 < theLineNodes.Count)
{
theInkAnalyzerBase.GetTextRangeFromNodes(
theLineNodes, out selectionStart, out selectionLength);
}
Платформы
Windows Vista, Windows XP с пакетом обновления 2 (SP2), Windows Server 2003
Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.
Сведения о версии
.NET Framework
Поддерживается в версии: 3.0