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


InkAnalyzerBase.UpdateStrokeData - метод

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

Updates the packet data for the specified stroke.

Пространство имен:  System.Windows.Ink.AnalysisCore
Сборка:  IACore (в IACore.dll)

Синтаксис

'Декларация
Public Sub UpdateStrokeData ( _
    strokeId As Integer, _
    strokePacketData As Integer(), _
    strokePacketDescription As Guid() _
)
'Применение
Dim instance As InkAnalyzerBase
Dim strokeId As Integer
Dim strokePacketData As Integer()
Dim strokePacketDescription As Guid()

instance.UpdateStrokeData(strokeId, strokePacketData, _
    strokePacketDescription)
public void UpdateStrokeData(
    int strokeId,
    int[] strokePacketData,
    Guid[] strokePacketDescription
)
public:
void UpdateStrokeData(
    int strokeId, 
    array<int>^ strokePacketData, 
    array<Guid>^ strokePacketDescription
)
public void UpdateStrokeData(
    int strokeId,
    int[] strokePacketData,
    Guid[] strokePacketDescription
)
public function UpdateStrokeData(
    strokeId : int, 
    strokePacketData : int[], 
    strokePacketDescription : Guid[]
)

Параметры

  • strokePacketData
    Тип: array<System.Int32[]
    An array containing the packet data for the stroke.
  • strokePacketDescription
    Тип: array<System.Guid[]
    An array containing the packet property identifiers.

Заметки

strokePacketData contains packet data for all of the points in the stroke. strokePacketDescription contains the globally unique identifiers (GUIDs) that describe the types of packet data included for each point in the stroke. For a complete list of available packet properties, see the Microsoft.Ink.PacketProperty class.

This method does not update the ink analyzer's DirtyRegion.

If the specified stroke is not associated with the ink analyzer, this method returns without updating the ink analyzer.

Примеры

The following example defines a method, theInkAnalyzerBase_UpdateStrokesCacheBase, that handles the UpdateStrokesCacheBase event of an InkAnalyzerBase. This method retrieves stroke data from an Microsoft.Ink.Ink object, theInk. In practice, if your application is using a Microsoft.Ink.Ink object to store stroke data, your application should use the derived Microsoft.Ink.InkAnalyzer class.

''' <summary>
''' Handles the UpdateStrokesCacheBase event of an InkAnalyzerBase.
''' </summary>
''' <param name="sender">The source of the event.</param>
''' <param name="e">The event data.</param>
''' <remarks>
''' This method converts stroke data to packet data for example only.
''' The InkAnalyzerBase is used when your application is handling packet
''' data. If your application uses stroke data from an Ink object, then
''' you would use InkAnalyzer.
''' </remarks>
Sub theInkAnalyzerBase_UpdateStrokesCacheBase( _
ByVal sender As Object, _
ByVal e As System.Windows.Ink.AnalysisCore.UpdateStrokesCacheBaseEventArgs)
    ' The source is an InkAnalyzerBase.
    Dim theInkAnalyzerBase As System.Windows.Ink.AnalysisCore.InkAnalyzerBase = _
        DirectCast(sender, System.Windows.Ink.AnalysisCore.InkAnalyzerBase)

    ' Add the stroke data to the ink analyzer.
    Dim theStroke As Microsoft.Ink.Stroke
    For Each theStroke In Me.theInk.CreateStrokes(e.GetStrokeIds())
        theInkAnalyzerBase.UpdateStrokeData( _
            theStroke.Id, _
            theStroke.GetPacketData(), _
            theStroke.PacketDescription)
    Next theStroke

End Sub 'theInkAnalyzerBase_UpdateStrokesCacheBase
/// <summary>
/// Handles the UpdateStrokesCacheBase event of an InkAnalyzerBase.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The event data.</param>
/// <remarks>
/// This method converts stroke data to packet data for example only.
/// The InkAnalyzerBase is used when your application is handling packet
/// data. If your application uses stroke data from an Ink object, then
/// you would use InkAnalyzer.
/// </remarks>
void theInkAnalyzerBase_UpdateStrokesCacheBase(
    object sender, System.Windows.Ink.AnalysisCore.UpdateStrokesCacheBaseEventArgs e)
{
    // The source is an InkAnalyzerBase.
    System.Windows.Ink.AnalysisCore.InkAnalyzerBase theInkAnalyzerBase =
        sender as System.Windows.Ink.AnalysisCore.InkAnalyzerBase;

    // Add the stroke data to the ink analyzer.
    foreach (Microsoft.Ink.Stroke theStroke
        in this.theInk.CreateStrokes(e.GetStrokeIds()))
    {
        theInkAnalyzerBase.UpdateStrokeData(
            theStroke.Id, theStroke.GetPacketData(),
            theStroke.PacketDescription);
    }
}

Платформы

Windows Vista, Windows XP с пакетом обновления 2 (SP2), Windows Server 2003

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

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

.NET Framework

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

См. также

Ссылки

InkAnalyzerBase Класс

InkAnalyzerBase - члены

System.Windows.Ink.AnalysisCore - пространство имен

InkAnalyzerBase.AddStroke

InkAnalyzerBase.AddStrokes

InkAnalyzerBase.ClearStrokeData

InkAnalyzerBase.UpdateStrokesData

InkAnalyzerBase.UpdateStrokesCacheBase