Tablets.TabletsEnumerator 類別
IEnumerator (英文) 介面的實作 (Implementation),可用來支援反覆查看 Tablets 集合。
命名空間: Microsoft.Ink
組件: Microsoft.Ink (在 Microsoft.Ink.dll 中)
語法
'宣告
<PermissionSetAttribute(SecurityAction.InheritanceDemand, Name := "FullTrust")> _
Public Class TabletsEnumerator _
Implements IEnumerator
'用途
Dim instance As Tablets.TabletsEnumerator
[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")]
public class TabletsEnumerator : IEnumerator
[PermissionSetAttribute(SecurityAction::InheritanceDemand, Name = L"FullTrust")]
public ref class TabletsEnumerator : IEnumerator
/** @attribute PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust") */
public class TabletsEnumerator implements IEnumerator
public class TabletsEnumerator implements IEnumerator
範例
這個範例會對 Tablets 集合使用 IEnumerator,以便反覆查看 Tablets 集合 (變數名稱為 allTablets),並且將附加至系統的每個手寫板裝置的名稱填入 ListBox (英文) 物件 (變數名稱為 listBoxTablets)。
' Calling the constructor automatically fills the
' Tablets collection with the available Tablet objects.
Dim allTablets As Tablets = New Tablets()
' clear the list box
Me.listBoxTablets.Items.Clear()
' populate the list box with the name of each tablet
' version using GetEnumerator()
Dim theTabletsEnumerator As IEnumerator = allTablets.GetEnumerator()
While (theTabletsEnumerator.MoveNext())
Dim T As Tablet = theTabletsEnumerator.Current
Me.listBoxTablets.Items.Add(T.Name)
End While
// Calling the constructor automatically fills the
// Tablets collection with the available Tablet objects.
Tablets allTablets = new Tablets();
// clear the list box
this.listBoxTablets.Items.Clear();
// populate the list box with the name of each tablet
// version using GetEnumerator()
IEnumerator theTabletsEnumerator = allTablets.GetEnumerator();
while (theTabletsEnumerator.MoveNext())
{
Tablet T = (Tablet)theTabletsEnumerator.Current;
this.listBoxTablets.Items.Add(T.Name);
}
繼承階層架構
System.Object
Microsoft.Ink.Tablets.TabletsEnumerator
執行緒安全
這個型別的任何 Public static (在 Visual Basic 中為 Shared) 成員都具備執行緒安全。並非所有的執行個體成員都是安全執行緒。
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求。
版本資訊
.NET Framework
支援版本:3.0