InkAnalyzer.FindNodesOfType 메서드 (Guid)
업데이트: 2007년 11월
지정된 형식의 모든 ContextNode 개체를 반환합니다.
네임스페이스: Microsoft.Ink
어셈블리: Microsoft.Ink.Analysis(Microsoft.Ink.Analysis.dll)
구문
‘선언
Public Function FindNodesOfType ( _
type As Guid _
) As ContextNodeCollection
‘사용 방법
Dim instance As InkAnalyzer
Dim type As Guid
Dim returnValue As ContextNodeCollection
returnValue = instance.FindNodesOfType(type)
public ContextNodeCollection FindNodesOfType(
Guid type
)
public:
ContextNodeCollection^ FindNodesOfType(
Guid type
)
public ContextNodeCollection FindNodesOfType(
Guid type
)
public function FindNodesOfType(
type : Guid
) : ContextNodeCollection
매개 변수
- type
형식: System.Guid
찾을 ContextNode 개체의 형식입니다.
반환 값
형식: Microsoft.Ink.ContextNodeCollection
InkAnalyzer 의 노드 트리에 있는 지정된 형식의 모든 ContextNode 개체가 들어 있는 ContextNodeCollection입니다.
예제
다음 예제에서는 InkAnalyzer인 theInkAnalyzer의 모든 LineNode 개체를 순환 검색하는 방법을 보여 줍니다. 각 줄의 모든 InkWordNode 개체를 순환 검색하면서 두 잉크 단어 노드가 서로 같은 단어로 인식되면 이러한 노드를 빨간색으로 표시합니다.
' If two identical ink words occur next to each other, mark them as red.
' Note: This doesn't actually look for pairs that go across two lines.
Dim lines As ContextNodeCollection = _
theInkAnalyzer.FindNodesOfType(Microsoft.Ink.ContextNodeType.Line)
Dim lineNode As ContextNode
Dim stroke As Stroke
For Each lineNode In lines
Dim previousWord As InkWordNode = Nothing
Dim inkWord As InkWordNode
For Each inkWord In _
theInkAnalyzer.FindNodesOfType(Microsoft.Ink.ContextNodeType.InkWord, lineNode)
If Not (previousWord Is Nothing) AndAlso _
previousWord.GetRecognizedString() = inkWord.GetRecognizedString() Then
For Each stroke In previousWord.Strokes
stroke.DrawingAttributes = New DrawingAttributes(Color.Red)
Next stroke
For Each stroke In inkWord.Strokes
stroke.DrawingAttributes = New DrawingAttributes(Color.Red)
Next stroke
End If
previousWord = inkWord
Next inkWord
Next lineNode
// If two identical ink words occur next to each other, mark them as red.
// Note: This doesn't actually look for pairs that go across two lines.
ContextNodeCollection lines =
theInkAnalyzer.FindNodesOfType(Microsoft.Ink.ContextNodeType.Line);
foreach (ContextNode lineNode in lines)
{
InkWordNode previousWord = null;
foreach (InkWordNode inkWord in
theInkAnalyzer.FindNodesOfType(Microsoft.Ink.ContextNodeType.InkWord, lineNode))
{
if (previousWord != null &&
previousWord.GetRecognizedString() == inkWord.GetRecognizedString())
{
foreach (Stroke stroke in previousWord.Strokes)
stroke.DrawingAttributes = new DrawingAttributes(Color.Red);
foreach (Stroke stroke in inkWord.Strokes)
stroke.DrawingAttributes = new DrawingAttributes(Color.Red);
}
previousWord = inkWord;
}
}
플랫폼
Windows Vista
.NET Framework 및 .NET Compact Framework에서 모든 플랫폼의 전체 버전을 지원하지는 않습니다. 지원되는 버전의 목록을 보려면 .NET Framework 시스템 요구 사항을 참조하십시오.
버전 정보
.NET Framework
3.0에서 지원