Поделиться через


Tablets.TabletsEnumerator - класс

Обновлен: Ноябрь 2007

An implementation of the IEnumerator interface that supports iterating over a Tablets collection.

Пространство имен:  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

Примеры

This example uses the IEnumerator for the Tablets collection to iterate over the Tablets collection, allTablets, and populate the ListBox object listBoxTablets with the names of each tablet device that is attached to the system.

' 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

Потокобезопасность

Любые открытые члены этого типа, объявленные как static (Shared в Visual Basic), являются потокобезопасными. Потокобезопасность членов экземпляров не гарантируется.

Платформы

Windows Vista

Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.

Сведения о версии

.NET Framework

Поддерживается в версии: 3.0

См. также

Ссылки

Tablets.TabletsEnumerator - члены

Microsoft.Ink - пространство имен

Tablets