AnalysisAlternateCollection 類別
包含 AnalysisAlternate 物件的集合。
命名空間: Microsoft.Ink
組件: Microsoft.Ink.Analysis (在 Microsoft.Ink.Analysis.dll 中)
語法
'宣告
Public Class AnalysisAlternateCollection _
Implements ICollection, IEnumerable
'用途
Dim instance As AnalysisAlternateCollection
public class AnalysisAlternateCollection : ICollection,
IEnumerable
public ref class AnalysisAlternateCollection : ICollection,
IEnumerable
public class AnalysisAlternateCollection implements ICollection,
IEnumerable
public class AnalysisAlternateCollection implements ICollection, IEnumerable
範例
這個範例會在 InkAnalyzer, theInkAnalyzer 上呼叫 GetAlternates。然後,對 AnalysisAlternateCollection 執行迴圈,並將所有沒有 Poor 辨識信賴度的替代元素填入 ListBox (英文) (變數名稱為 alternatesListBox)。
alternatesListBox.Items.Clear()
' ContextNodeCollection selectedSubNodes is obtained via
' DirectCast(theInkAnalyzer.RootNode, RootNode).GetNodesFromTextRange(selStart, selLength);
Me.currentAlternates = theInkAnalyzer.GetAlternates(selectedSubNodes)
Dim alternate As AnalysisAlternate
For Each alternate In Me.currentAlternates
' Add only those that are not Poor confidence
If alternate.InkRecognitionConfidence <> _
Microsoft.Ink.InkRecognitionConfidence.Poor Then
alternatesListBox.Items.Add(alternate.RecognizedString)
End If
Next alternate
alternatesListBox.Items.Clear();
// ContextNodeCollection selectedSubNodes is obtained via
// ((RootNode)theInkAnalyzer.RootNode).GetNodesFromTextRange(ref selStart, ref selLength);
this.currentAlternates = theInkAnalyzer.GetAlternates(selectedSubNodes);
foreach (AnalysisAlternate alternate in this.currentAlternates)
{
// Add only those that are not Poor confidence
if (alternate.InkRecognitionConfidence !=
Microsoft.Ink.InkRecognitionConfidence.Poor)
{
alternatesListBox.Items.Add(alternate.RecognizedString);
}
}
繼承階層架構
System.Object
Microsoft.Ink.AnalysisAlternateCollection
執行緒安全
這個型別的任何 Public static (在 Visual Basic 中為 Shared) 成員都具備執行緒安全。並非所有的執行個體成員都是安全執行緒。
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求。
版本資訊
.NET Framework
支援版本:3.0
請參閱
參考
AnalysisAlternateCollection 成員