為分析器建立新 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
參數
- inkRecognizerId
型別:System.Guid
要為其建立節點的 InkRecognizer 之全域唯一識別項 (GUID)。
傳回值
型別:Microsoft.Ink.CustomRecognizerNode
新的 CustomRecognizerNode。
備註
CustomRecognizerNode 物件會建立為 RootNode 的直接子系。
範例
下列範例會取得自訂辨識器 customRecognizerId 的 System.Guid,並且用它建立 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