InkAnalyzer.CreateCustomRecognizer 方法

为分析器创建新的 CustomRecognizerNode

命名空间:  Microsoft.Ink
程序集:  Microsoft.Ink.Analysis(在 Microsoft.Ink.Analysis.dll 中)

语法

声明
Public Function CreateCustomRecognizer ( _
    inkRecognizerId As Guid _
) As CustomRecognizerNode
用法
Dim instance As InkAnalyzer
Dim inkRecognizerId As Guid
Dim returnValue As CustomRecognizerNode

returnValue = instance.CreateCustomRecognizer(inkRecognizerId)
public CustomRecognizerNode CreateCustomRecognizer(
    Guid inkRecognizerId
)
public:
CustomRecognizerNode^ CreateCustomRecognizer(
    Guid inkRecognizerId
)
public CustomRecognizerNode CreateCustomRecognizer(
    Guid inkRecognizerId
)
public function CreateCustomRecognizer(
    inkRecognizerId : Guid
) : CustomRecognizerNode

参数

返回值

类型:Microsoft.Ink.CustomRecognizerNode
新的 CustomRecognizerNode

备注

创建 CustomRecognizerNode 对象作为 RootNode 的直接子级。

示例

下面的示例获取自定义识别器的 System.Guid (customRecognizerId),并随其为 InkAnalyzer (theInkAnalyzer) 创建一个 CustomRecognizerNode。然后从 Strokes 集合 strokesForCustomAnalysis 添加笔画。然后调用 Analyze,将已识别的字符串放入 TextBox (theResultsTextBox)。

Dim customRecognizer As CustomRecognizerNode = _
    theInkAnalyzer.CreateCustomRecognizer(customRecognizerId)
theInkAnalyzer.AddStrokesToCustomRecognizer(strokesForCustomAnalysis, customRecognizer)

Dim theStatus As Microsoft.Ink.AnalysisStatus = theInkAnalyzer.Analyze()
theResultsTextBox.Text = customRecognizer.GetRecognizedString()
CustomRecognizerNode customRecognizer = 
    theInkAnalyzer.CreateCustomRecognizer(customRecognizerId);
theInkAnalyzer.AddStrokesToCustomRecognizer(strokesForCustomAnalysis, customRecognizer);

Microsoft.Ink.AnalysisStatus theStatus = theInkAnalyzer.Analyze();
theResultsTextBox.Text = customRecognizer.GetRecognizedString();

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

InkAnalyzer 类

InkAnalyzer 成员

Microsoft.Ink 命名空间

Microsoft.Ink.CustomRecognizerNode

Microsoft.Ink.InkRecognizer

InkAnalyzer.GetInkRecognizersByPriority