ContextNodeType.AnalysisHint 字段
表示节点的类型,该节点向 InkAnalyzer 提供区域的其他上下文信息,以改进分析结果。
命名空间: Microsoft.Ink
程序集: Microsoft.Ink.Analysis(在 Microsoft.Ink.Analysis.dll 中)
语法
声明
Public Shared ReadOnly AnalysisHint As Guid
用法
Dim value As Guid
value = ContextNodeType.AnalysisHint
public static readonly Guid AnalysisHint
public:
static initonly Guid AnalysisHint
public static final Guid AnalysisHint
public static final var AnalysisHint : Guid
备注
此 ContextNodeType 字段的 Guid 值是 b3e85327-34d8-4a53-9bed-c4aa612428d3。
示例
下面的示例在 InkAnalyzer 对象 theInkAnalyzerWithHint 的节点树中查找所有 WritingRegionNode 对象。然后,该示例将那些链接到 Factoid 为“IS_DATE_FULLDATE”的 AnalysisHintNode 的对象放到 ContextNodeCollection 对象 writingRegionsWithFactoids 中。
Dim writingRegionsWithFactoids As _
New ContextNodeCollection(Me.theInkAnalyzerWithHint)
Dim allWritingRegions As ContextNodeCollection = _
Me.theInkAnalyzerWithHint.FindNodesOfType( _
Microsoft.Ink.ContextNodeType.WritingRegion)
Dim writingRegion As WritingRegionNode
For Each writingRegion In allWritingRegions
' See if they are linked to any factoid
Dim link As ContextLink
For Each link In writingRegion.Links
If link.SourceNode.Type = ContextNodeType.AnalysisHint Then
Dim hint As AnalysisHintNode = _
CType(link.SourceNode, AnalysisHintNode)
If hint.Factoid = "IS_DATE_FULLDATE" Then
writingRegionsWithFactoids.Add(writingRegion)
End If
End If
Next link
Next writingRegion
ContextNodeCollection writingRegionsWithFactoids =
new ContextNodeCollection(this.theInkAnalyzerWithHint);
ContextNodeCollection allWritingRegions =
this.theInkAnalyzerWithHint.FindNodesOfType(Microsoft.Ink.ContextNodeType.WritingRegion);
foreach (WritingRegionNode writingRegion in allWritingRegions)
{
// See if they are linked to any factoid
foreach (ContextLink link in writingRegion.Links)
{
if (link.SourceNode.Type == ContextNodeType.AnalysisHint)
{
AnalysisHintNode hint = (AnalysisHintNode) link.SourceNode;
if (hint.Factoid == "IS_DATE_FULLDATE")
{
writingRegionsWithFactoids.Add(writingRegion);
}
}
}
}
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。
版本信息
.NET Framework
受以下版本支持:3.0