Condividi tramite


Metodo InkAnalyzerBase.UpdateStrokeData

Aggiornamento: novembre 2007

Aggiorna i dati del pacchetto per il tratto specificato.

Spazio dei nomi:  System.Windows.Ink.AnalysisCore
Assembly:  IACore (in IACore.dll)

Sintassi

'Dichiarazione
Public Sub UpdateStrokeData ( _
    strokeId As Integer, _
    strokePacketData As Integer(), _
    strokePacketDescription As Guid() _
)
'Utilizzo
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[]
)

Parametri

  • strokePacketData
    Tipo: array<System.Int32[]
    Matrice che contiene i dati del pacchetto per il tratto.
  • strokePacketDescription
    Tipo: array<System.Guid[]
    Matrice che contiene gli identificatori di proprietà del pacchetto.

Note

strokePacketData contiene dati di pacchetto per tutti i punti nel tratto. strokePacketDescription contiene GUID che descrivono i tipi di dati di pacchetto inclusi per ogni punto nel tratto. Per un elenco completo delle proprietà del pacchetto disponibili, vedere la classe Microsoft.Ink.PacketProperty.

Questo metodo non aggiorna la proprietà DirtyRegion dell'analizzatore dell'input penna.

Se il tratto specificato non è associato all'analizzatore dell'input penna, questo metodo restituisce un risultato senza aggiornare l'analizzatore dell'input penna.

Esempi

Nell'esempio seguente viene definito un metodo, theInkAnalyzerBase_UpdateStrokesCacheBase, che gestisce l'evento UpdateStrokesCacheBase di un oggetto InkAnalyzerBase. Questo metodo recupera dati relativi al tratto da un oggetto Microsoft.Ink.Ink, theInk. In pratica, se l'applicazione sta utilizzando un oggetto Microsoft.Ink.Ink per archiviare dati relativi al tratto, l'applicazione deve utilizzare la classe Microsoft.Ink.InkAnalyzer derivata.

''' <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);
    }
}

Piattaforme

Windows Vista, Windows XP SP2, Windows Server 2003

.NET Framework e .NET Compact Framework non supportano tutte le versioni di ciascuna piattaforma. Per un elenco delle versioni supportate, vedere Requisiti di sistema di .NET Framework.

Informazioni sulla versione

.NET Framework

Supportato in: 3.0

Vedere anche

Riferimenti

InkAnalyzerBase Classe

Membri InkAnalyzerBase

Spazio dei nomi System.Windows.Ink.AnalysisCore

InkAnalyzerBase.AddStroke

InkAnalyzerBase.AddStrokes

InkAnalyzerBase.ClearStrokeData

InkAnalyzerBase.UpdateStrokesData

InkAnalyzerBase.UpdateStrokesCacheBase