TabletPropertyDescription 생성자
업데이트: 2007년 11월
TabletPropertyDescription 클래스의 새 인스턴스를 초기화합니다.
네임스페이스: Microsoft.Ink
어셈블리: Microsoft.Ink(Microsoft.Ink.dll)
구문
‘선언
Public Sub New ( _
packetPropertyId As Guid, _
tabletPropertyMetrics As TabletPropertyMetrics _
)
‘사용 방법
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
)
매개 변수
- packetPropertyId
형식: System.Guid
패킷 속성을 식별합니다.
- tabletPropertyMetrics
형식: Microsoft.Ink.TabletPropertyMetrics
태블릿 장치에 정의된 TabletPropertyDescription 개체의 TabletPropertyMetrics 속성입니다.
예제
이 예제에서는 TabletPropertyDescriptionCollection 컬렉션을 만들고 지정된 Tablet 개체에서 지원하는 각 패킷 속성에 대한 TabletPropertyDescription 개체로 채웁니다.
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;
}
플랫폼
Windows Vista
.NET Framework 및 .NET Compact Framework에서 모든 플랫폼의 전체 버전을 지원하지는 않습니다. 지원되는 버전의 목록을 보려면 .NET Framework 시스템 요구 사항을 참조하십시오.
버전 정보
.NET Framework
3.0에서 지원
참고 항목
참조
TabletPropertyDescription