업데이트: 2007년 11월
선택한 패킷 데이터가 들어 있는 Int32 형식의 배열을 가져옵니다.
네임스페이스: Microsoft.Ink
어셈블리: Microsoft.Ink(Microsoft.Ink.dll)
구문
‘선언
Public ReadOnly Property PacketData As Integer()
‘사용 방법
Dim instance As InkCollectorNewInAirPacketsEventArgs
Dim value As Integer()
value = instance.PacketData
public int[] PacketData { get; }
public:
property array<int>^ PacketData {
array<int>^ get ();
}
/** @property */
public int[] get_PacketData()
public function get PacketData () : int[]
속성 값
형식: array<System.Int32[]
선택한 패킷 데이터가 들어 있는 배열입니다.
설명
이 배열에 포함되는 속성을 설정하려면 InkCollector 개체의 DesiredPacketDescription 속성을 사용합니다. PacketData 속성이 반환하는 배열에는 해당 속성의 데이터가 들어 있습니다.
참고
패킷 데이터를 수정할 수는 있지만 이러한 수정 사항이 유지되거나 사용되지는 않습니다.
PacketData 속성에 포함할 수 있는 데이터의 가능한 모든 속성이 나와 있는 전체 목록을 보려면 InkCollector 개체의 DesiredPacketDescription 속성을 참조하십시오.
예제
이 예제에서 InkCollectorNewInAirPacketsEventHandler 인스턴스는 InkCollectorNewInAirPacketsEventArgs 개체를 통해 전달된 마지막 패킷의 X 및 Y 값을 가져옵니다. 패킷 데이터의 처음 두 위치는 항상 X 및 Y 값이 차지합니다.
Private Sub mInkObject_NewInAirPackets2(ByVal sender As Object, ByVal e As InkCollectorNewInAirPacketsEventArgs)
Dim DescriptorsPerPacket As Integer = 0
' determine how many descriptors there are per packet
' you could also obtain this value using:
' e.PacketData.Length / e.PacketCount
' but if you need to know which particular properties
' are supported (beyond X and Y which are always placed first)
' you will need to query e.Cursor.Tablet.IsPacketPropertySupported()
For Each G As Guid In mInkObject.DesiredPacketDescription
If (e.Cursor.Tablet.IsPacketPropertySupported(G)) Then
DescriptorsPerPacket += 1
End If
Next
Dim LastX As Integer = e.PacketData(DescriptorsPerPacket * (e.PacketCount - 1))
Dim LastY As Integer = e.PacketData((DescriptorsPerPacket * (e.PacketCount - 1)) + 1)
End Sub
private void mInkObject_NewInAirPackets2(object sender, InkCollectorNewInAirPacketsEventArgs e)
{
int DescriptorsPerPacket = 0;
// determine how many descriptors there are per packet
// you could also obtain this value using:
// e.PacketData.Length / e.PacketCount
// but if you need to know which particular properties
// are supported (beyond X and Y which are always placed first)
// you will need to query e.Cursor.Tablet.IsPacketPropertySupported()
foreach (Guid G in mInkObject.DesiredPacketDescription)
{
if (e.Cursor.Tablet.IsPacketPropertySupported(G))
{
DescriptorsPerPacket++;
}
}
int LastX = e.PacketData[DescriptorsPerPacket * (e.PacketCount - 1)];
int LastY = e.PacketData[(DescriptorsPerPacket * (e.PacketCount - 1)) + 1];
}
플랫폼
Windows Vista
.NET Framework 및 .NET Compact Framework에서 모든 플랫폼의 전체 버전을 지원하지는 않습니다. 지원되는 버전의 목록을 보려면 .NET Framework 시스템 요구 사항을 참조하십시오.
버전 정보
.NET Framework
3.0에서 지원
참고 항목
참조
InkCollectorNewInAirPacketsEventArgs 클래스