TabletPropertyDescription, constructeur
Mise à jour : November 2007
Initialise une nouvelle instance de la classe TabletPropertyDescription.
Espace de noms : Microsoft.Ink
Assembly : Microsoft.Ink (dans Microsoft.Ink.dll)
Syntaxe
'Déclaration
Public Sub New ( _
packetPropertyId As Guid, _
tabletPropertyMetrics As TabletPropertyMetrics _
)
'Utilisation
Dim packetPropertyId As Guid
Dim tabletPropertyMetrics As TabletPropertyMetrics
Dim instance As New TabletPropertyDescription(packetPropertyId, _
tabletPropertyMetrics)
public TabletPropertyDescription(
Guid packetPropertyId,
TabletPropertyMetrics tabletPropertyMetrics
)
public:
TabletPropertyDescription(
Guid packetPropertyId,
TabletPropertyMetrics tabletPropertyMetrics
)
public TabletPropertyDescription(
Guid packetPropertyId,
TabletPropertyMetrics tabletPropertyMetrics
)
public function TabletPropertyDescription(
packetPropertyId : Guid,
tabletPropertyMetrics : TabletPropertyMetrics
)
Paramètres
- packetPropertyId
Type : System.Guid
Identifie la propriété de paquet.
- tabletPropertyMetrics
Type : Microsoft.Ink.TabletPropertyMetrics
Propriété TabletPropertyMetrics de l'objet TabletPropertyDescription, définie par le périphérique de la tablette.
Exemples
Dans cet exemple, une collection TabletPropertyDescriptionCollection est créée et remplie avec des objets TabletPropertyDescription pour chaque propriété de paquet prise en charge par l'objet Tablet spécifié.
Private Function GetPropertyDescriptionCollection(ByVal theTablet As Tablet) As TabletPropertyDescriptionCollection
Dim Result As TabletPropertyDescriptionCollection = New TabletPropertyDescriptionCollection()
For Each PropertyID As Guid In GetPacketPropertyList()
If theTablet.IsPacketPropertySupported(PropertyID) Then
' get the property metrics
Dim Metrics As TabletPropertyMetrics = theTablet.GetPropertyMetrics(PropertyID)
' add to the collection
Result.Add(New TabletPropertyDescription(PropertyID, Metrics))
End If
Next
Return Result
End Function
' returns a list of all Packet Property Guids
Private Function GetPacketPropertyList() As List(Of Guid)
Dim Result As List(Of Guid) = New List(Of Guid)()
Result.Add(PacketProperty.AltitudeOrientation)
Result.Add(PacketProperty.AzimuthOrientation)
Result.Add(PacketProperty.ButtonPressure)
Result.Add(PacketProperty.Height)
Result.Add(PacketProperty.NormalPressure)
Result.Add(PacketProperty.PacketStatus)
Result.Add(PacketProperty.PitchRotation)
Result.Add(PacketProperty.RollRotation)
Result.Add(PacketProperty.SerialNumber)
Result.Add(PacketProperty.SystemTouch)
Result.Add(PacketProperty.TangentPressure)
Result.Add(PacketProperty.TimerTick)
Result.Add(PacketProperty.TwistOrientation)
Result.Add(PacketProperty.Width)
Result.Add(PacketProperty.X)
Result.Add(PacketProperty.XTiltOrientation)
Result.Add(PacketProperty.Y)
Result.Add(PacketProperty.YawRotation)
Result.Add(PacketProperty.YTiltOrientation)
Result.Add(PacketProperty.Z)
Return Result
End Function
private TabletPropertyDescriptionCollection GetPropertyDescriptionCollection(Tablet theTablet)
{
TabletPropertyDescriptionCollection Result = new TabletPropertyDescriptionCollection();
foreach (Guid PropertyID in GetPacketPropertyList())
{
if (theTablet.IsPacketPropertySupported(PropertyID))
{
// get the property metrics
TabletPropertyMetrics Metrics = theTablet.GetPropertyMetrics(PropertyID);
// add to the collection
Result.Add(new TabletPropertyDescription(PropertyID, Metrics));
}
}
return Result;
}
// returns a list of all Packet Property Guids
private List<Guid> GetPacketPropertyList()
{
List<Guid> Result = new List<Guid>();
Result.Add(PacketProperty.AltitudeOrientation);
Result.Add(PacketProperty.AzimuthOrientation);
Result.Add(PacketProperty.ButtonPressure);
Result.Add(PacketProperty.Height);
Result.Add(PacketProperty.NormalPressure);
Result.Add(PacketProperty.PacketStatus);
Result.Add(PacketProperty.PitchRotation);
Result.Add(PacketProperty.RollRotation);
Result.Add(PacketProperty.SerialNumber);
Result.Add(PacketProperty.SystemTouch);
Result.Add(PacketProperty.TangentPressure);
Result.Add(PacketProperty.TimerTick);
Result.Add(PacketProperty.TwistOrientation);
Result.Add(PacketProperty.Width);
Result.Add(PacketProperty.X);
Result.Add(PacketProperty.XTiltOrientation);
Result.Add(PacketProperty.Y);
Result.Add(PacketProperty.YawRotation);
Result.Add(PacketProperty.YTiltOrientation);
Result.Add(PacketProperty.Z);
return Result;
}
Plateformes
Windows Vista
Le .NET Framework et le .NET Compact Framework ne prennent pas en charge toutes les versions de chaque plateforme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise du .NET Framework.
Informations de version
.NET Framework
Pris en charge dans : 3.0
Voir aussi
Référence
TabletPropertyDescription, classe
Membres TabletPropertyDescription
TabletPropertyDescription