다음을 통해 공유


IStylusAsyncPlugin.CustomStylusDataAdded 메서드

업데이트: 2007년 11월

구현하는 플러그 인에 CustomStylusData를 사용할 수 있음을 알립니다.

네임스페이스:  Microsoft.StylusInput
어셈블리:  Microsoft.Ink(Microsoft.Ink.dll)

구문

‘선언
Sub CustomStylusDataAdded ( _
    sender As RealTimeStylus, _
    data As CustomStylusData _
)
‘사용 방법
Dim instance As IStylusAsyncPlugin
Dim sender As RealTimeStylus
Dim data As CustomStylusData

instance.CustomStylusDataAdded(sender, _
    data)
void CustomStylusDataAdded(
    RealTimeStylus sender,
    CustomStylusData data
)
void CustomStylusDataAdded(
    RealTimeStylus^ sender, 
    CustomStylusData^ data
)
void CustomStylusDataAdded(
    RealTimeStylus sender,
    CustomStylusData data
)
function CustomStylusDataAdded(
    sender : RealTimeStylus, 
    data : CustomStylusData
)

매개 변수

예제

이 C# 예제는 RealTimeStylus Plug-in Sample에서 가져온 것입니다.

public void CustomStylusDataAdded(RealTimeStylus sender, CustomStylusData data)
{
    // We can identify the kind of custom data via either the Guid or Type.
    // For the purpose of this demonstration we will validate both just to be safe.
    // For other scenarios either approach is valid.
    if (data.CustomDataId == GestureRecognizer.GestureRecognitionDataGuid)
    {
        GestureRecognitionData grd = data.Data as GestureRecognitionData;
        if (grd != null)
        {
            if (grd.Count > 0)
            {
                GestureAlternate ga = grd[0];
                sbGesture.Text = "Gesture=" + ga.Id + ", Confidence=" + ga.Confidence;
            }
        }
    }
}

이 Microsoft Visual Basic .NET 예제는 RealTimeStylus Plug-in Sample에서 가져온 것입니다.

Public Sub CustomStylusDataAdded(sender As RealTimeStylus, data As CustomStylusData)
  Implements IStylusAsyncPlugin.CustomStylusDataAdded
    ' We can identify the kind of custom data via either the Guid or Type.
    ' For the purpose of this demonstration we will validate both just to be safe.
    ' For other scenarios either approach is valid.
    If data.CustomDataId = GestureRecognizer.GestureRecognitionDataGuid Then
      Dim grd As GestureRecognitionData = CType(data.Data, GestureRecognitionData)
      If Not (grd Is Nothing) Then
        If grd.Count > 0 Then
          Dim ga As GestureAlternate = grd(0)
          sbGesture.Text = "Gesture=" + ga.Id + ", Confidence=" + ga.Confidence
        End If
      End If
    End If
End Sub 'CustomStylusDataAdded

플랫폼

Windows Vista, Windows XP SP2, Windows Server 2003

.NET Framework 및 .NET Compact Framework에서 모든 플랫폼의 전체 버전을 지원하지는 않습니다. 지원되는 버전의 목록을 보려면 .NET Framework 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

3.0에서 지원

참고 항목

참조

IStylusAsyncPlugin 인터페이스

IStylusAsyncPlugin 멤버

Microsoft.StylusInput 네임스페이스

CustomStylusData