Tablets.IsPacketPropertySupported (Método)
Actualización: noviembre 2007
Devuelve un valor que indica si un campo PacketProperty, reconocido mediante un identificador único global (GUID), es admitido por todos los objetos Tablet de esta colección Tablets.
Espacio de nombres: Microsoft.Ink
Ensamblado: Microsoft.Ink (en Microsoft.Ink.dll)
Sintaxis
'Declaración
Public Function IsPacketPropertySupported ( _
g As Guid _
) As Boolean
'Uso
Dim instance As Tablets
Dim g As Guid
Dim returnValue As Boolean
returnValue = instance.IsPacketPropertySupported(g)
public bool IsPacketPropertySupported(
Guid g
)
public:
bool IsPacketPropertySupported(
Guid g
)
public boolean IsPacketPropertySupported(
Guid g
)
public function IsPacketPropertySupported(
g : Guid
) : boolean
Parámetros
- g
Tipo: System.Guid
El identificador de Guid del campo PacketProperty solicitado.
Valor devuelto
Tipo: System.Boolean
Devuelve un valor que indica si un campo PacketProperty, reconocido mediante un identificador único global (GUID), es admitido por todos los objetos Tablet de esta colección Tablets.
Valor |
Significado |
---|---|
true |
El campo PacketProperty se admite en toda esta colección Tablets. |
false |
El campo PacketProperty no se admite en toda esta colección Tablets. |
Comentarios
Este método determina si una colección Tablets admite varios campos de la clase PacketProperty.
Nota
Cuando se llama a este método en la colección Tablets, consulta todos los Tablet PC del sistema. Si alguno de ellos no admite la propiedad, devuelve falso. Llame al método Tablet.IsPacketPropertySupported en un objeto Tablet individual para determinar si el dispositivo admite una propiedad conocida.
Ejemplos
En este ejemplo se notifica que los campos PacketProperty están disponibles para todos los objetos Tablet de la colección Tablets, allTablets.
Private Function Report_Properties_AllTablets() As String
Dim SB As StringBuilder = New StringBuilder(1024)
Dim allTablets As Tablets = New Tablets()
' Generate a report on which PacketProperties are supported by all tablets.
SB.AppendLine("Packet Properties supported by all tablets")
If allTablets.IsPacketPropertySupported(PacketProperty.AltitudeOrientation) Then
SB.AppendLine("AltitudeOrientation: YES")
Else
SB.AppendLine("AltitudeOrientation: NO")
End If
If allTablets.IsPacketPropertySupported(PacketProperty.AzimuthOrientation) Then
SB.AppendLine("AzimuthOrientation: YES")
Else
SB.AppendLine("AzimuthOrientation: NO")
End If
If allTablets.IsPacketPropertySupported(PacketProperty.ButtonPressure) Then
SB.AppendLine("ButtonPressure: YES")
Else
SB.AppendLine("ButtonPressure: NO")
End If
If allTablets.IsPacketPropertySupported(PacketProperty.NormalPressure) Then
SB.AppendLine("NormalPressure: YES")
Else
SB.AppendLine("NormalPressure: NO")
End If
If allTablets.IsPacketPropertySupported(PacketProperty.PacketStatus) Then
SB.AppendLine("PacketStatus: YES")
Else
SB.AppendLine("PacketStatus: NO")
End If
If allTablets.IsPacketPropertySupported(PacketProperty.PitchRotation) Then
SB.AppendLine("PitchRotation: YES")
Else
SB.AppendLine("PitchRotation: NO")
End If
If allTablets.IsPacketPropertySupported(PacketProperty.RollRotation) Then
SB.AppendLine("RollRotation: YES")
Else
SB.AppendLine("RollRotation: NO")
End If
If allTablets.IsPacketPropertySupported(PacketProperty.SerialNumber) Then
SB.AppendLine("SerialNumber: YES")
Else
SB.AppendLine("SerialNumber: NO")
End If
If allTablets.IsPacketPropertySupported(PacketProperty.TangentPressure) Then
SB.AppendLine("TangentPressure: YES")
Else
SB.AppendLine("TangentPressure: NO")
End If
If allTablets.IsPacketPropertySupported(PacketProperty.TimerTick) Then
SB.AppendLine("TimerTick: YES")
Else
SB.AppendLine("TimerTick: NO")
End If
If allTablets.IsPacketPropertySupported(PacketProperty.TwistOrientation) Then
SB.AppendLine("TwistOrientation: YES")
Else
SB.AppendLine("TwistOrientation: NO")
End If
If allTablets.IsPacketPropertySupported(PacketProperty.X) Then
SB.AppendLine("X: YES")
Else
SB.AppendLine("X: NO")
End If
If allTablets.IsPacketPropertySupported(PacketProperty.XTiltOrientation) Then
SB.AppendLine("XTiltOrientation: YES")
Else
SB.AppendLine("XTiltOrientation: NO")
End If
If allTablets.IsPacketPropertySupported(PacketProperty.Y) Then
SB.AppendLine("Y: YES")
Else
SB.AppendLine("Y: NO")
End If
If allTablets.IsPacketPropertySupported(PacketProperty.YawRotation) Then
SB.AppendLine("YawRotation: YES")
Else
SB.AppendLine("YawRotation: NO")
End If
If allTablets.IsPacketPropertySupported(PacketProperty.YTiltOrientation) Then
SB.AppendLine("YTiltOrientation: YES")
Else
SB.AppendLine("YTiltOrientation: NO")
End If
If allTablets.IsPacketPropertySupported(PacketProperty.Z) Then
SB.AppendLine("Z: YES")
Else
SB.AppendLine("Z: NO")
End If
Return SB.ToString
End Function
public string Report_Properties_AllTablets()
{
StringBuilder SB = new StringBuilder(1024);
Tablets allTablets = new Tablets();
// Generate a report on which PacketProperties are supported by all tablets.
SB.AppendLine("Packet Properties supported by all tablets");
SB.AppendLine("AltitudeOrientation: " + ((allTablets.IsPacketPropertySupported(PacketProperty.AltitudeOrientation)) ? "YES" : "NO"));
SB.AppendLine("AzimuthOrientation: " + ((allTablets.IsPacketPropertySupported(PacketProperty.AzimuthOrientation)) ? "YES" : "NO"));
SB.AppendLine("ButtonPressure: " + ((allTablets.IsPacketPropertySupported(PacketProperty.ButtonPressure)) ? "YES" : "NO"));
SB.AppendLine("NormalPressure: " + ((allTablets.IsPacketPropertySupported(PacketProperty.NormalPressure)) ? "YES" : "NO"));
SB.AppendLine("PacketStatus: " + ((allTablets.IsPacketPropertySupported(PacketProperty.PacketStatus)) ? "YES" : "NO"));
SB.AppendLine("PitchRotation: " + ((allTablets.IsPacketPropertySupported(PacketProperty.PitchRotation)) ? "YES" : "NO"));
SB.AppendLine("RollRotation: " + ((allTablets.IsPacketPropertySupported(PacketProperty.RollRotation)) ? "YES" : "NO"));
SB.AppendLine("SerialNumber: " + ((allTablets.IsPacketPropertySupported(PacketProperty.SerialNumber)) ? "YES" : "NO"));
SB.AppendLine("TangentPressure: " + ((allTablets.IsPacketPropertySupported(PacketProperty.TangentPressure)) ? "YES" : "NO"));
SB.AppendLine("TimerTick: " + ((allTablets.IsPacketPropertySupported(PacketProperty.TimerTick)) ? "YES" : "NO"));
SB.AppendLine("TwistOrientation: " + ((allTablets.IsPacketPropertySupported(PacketProperty.TwistOrientation)) ? "YES" : "NO"));
SB.AppendLine("X: " + ((allTablets.IsPacketPropertySupported(PacketProperty.X)) ? "YES" : "NO"));
SB.AppendLine("XTiltOrientation: " + ((allTablets.IsPacketPropertySupported(PacketProperty.XTiltOrientation)) ? "YES" : "NO"));
SB.AppendLine("Y: " + ((allTablets.IsPacketPropertySupported(PacketProperty.Y)) ? "YES" : "NO"));
SB.AppendLine("YawRotation: " + ((allTablets.IsPacketPropertySupported(PacketProperty.YawRotation)) ? "YES" : "NO"));
SB.AppendLine("YTiltOrientation: " + ((allTablets.IsPacketPropertySupported(PacketProperty.YTiltOrientation)) ? "YES" : "NO"));
SB.AppendLine("Z: " + ((allTablets.IsPacketPropertySupported(PacketProperty.Z)) ? "YES" : "NO"));
return SB.ToString();
}
Plataformas
Windows Vista
.NET Framework y .NET Compact Framework no admiten todas las versiones de cada plataforma. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.
Información de versión
.NET Framework
Compatible con: 3.0
Vea también
Referencia
Microsoft.Ink (Espacio de nombres)