Поделиться через


IStylusSyncPlugin.CustomStylusDataAdded - метод

Обновлен: Ноябрь 2007

Notifies the implementing plug-in that CustomStylusData is available.

Пространство имен:  Microsoft.StylusInput
Сборка:  Microsoft.Ink (в Microsoft.Ink.dll)

Синтаксис

'Декларация
Sub CustomStylusDataAdded ( _
    sender As RealTimeStylus, _
    data As CustomStylusData _
)
'Применение
Dim instance As IStylusSyncPlugin
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
)

Параметры

Примеры

This C# example is excerpted from the 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;
            }
        }
    }
}

This Microsoft Visual Basic .NET example is excerpted from the RealTimeStylus Plug-in Sample.

Public Sub CustomStylusDataAdded(sender As RealTimeStylus, data As CustomStylusData) _
  Implements IStylusSyncPlugin.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 с пакетом обновления 2 (SP2), Windows Server 2003

Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.

Сведения о версии

.NET Framework

Поддерживается в версии: 3.0

См. также

Ссылки

IStylusSyncPlugin Интерфейс

IStylusSyncPlugin - члены

Microsoft.StylusInput - пространство имен

CustomStylusData