Nota
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare ad accedere o modificare le directory.
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare a modificare le directory.
Aggiornamento: novembre 2007
Inizializza una nuova istanza della classe InkAnalyzer associata all'oggetto Microsoft.Ink.Ink specificato.
Spazio dei nomi: Microsoft.Ink
Assembly: Microsoft.Ink.Analysis (in Microsoft.Ink.Analysis.dll)
Sintassi
'Dichiarazione
Public Sub New ( _
ink As Ink, _
synchronizingObject As ISynchronizeInvoke _
)
'Utilizzo
Dim ink As Ink
Dim synchronizingObject As ISynchronizeInvoke
Dim instance As New InkAnalyzer(ink, synchronizingObject)
public InkAnalyzer(
Ink ink,
ISynchronizeInvoke synchronizingObject
)
public:
InkAnalyzer(
Ink^ ink,
ISynchronizeInvoke^ synchronizingObject
)
public InkAnalyzer(
Ink ink,
ISynchronizeInvoke synchronizingObject
)
public function InkAnalyzer(
ink : Ink,
synchronizingObject : ISynchronizeInvoke
)
Parametri
- ink
Tipo: Microsoft.Ink.Ink
Oggetto Ink dal quale il nuovo oggetto InkAnalyzer riceve i dati del tratto.
- synchronizingObject
Tipo: System.ComponentModel.ISynchronizeInvoke
Controllo associato all'oggetto InkAnalyzer che implementa l'interfaccia System.ComponentModel.ISynchronizeInvoke.
Note
L'oggetto InkAnalyzer può analizzare i dati del tratto di un solo oggetto Ink. Non è possibile modificare questa associazione una volta inizializzato l'analizzatore dell'input penna.
Se si passa un valore null per synchronizingObject, non è garantita la sincronizzazione dei thread in caso di gestione di eventi generati da InkAnalyzer.
Esempi
In questo esempio vengono eseguite le operazioni seguenti.
Inizializza un nuovo oggetto Microsoft.Ink.Ink, theInk.
Associa un gestore eventi Ink.InkAdded, theInk_InkAdded all'oggetto theInk.
Inizializza un nuovo oggetto InkAnalyzer, theInkAnalyzer che può analizzare i dati del tratto di theInk.
' Create the Ink for use with the InkCollector and attach
' event handlers.
Me.theInk = New Microsoft.Ink.Ink()
AddHandler Me.theInk.InkAdded, AddressOf theInk_InkAdded
' Create the InkAnalyzer.
Me.theInkAnalyzer = New Microsoft.Ink.InkAnalyzer(Me.theInk, Me)
// Create the Ink for use with the InkCollector and attach
// event handlers.
this.theInk = new Microsoft.Ink.Ink();
this.theInk.InkAdded +=
new Microsoft.Ink.StrokesEventHandler(theInk_InkAdded);
// Create the InkAnalyzer.
this.theInkAnalyzer =
new Microsoft.Ink.InkAnalyzer(this.theInk, this);
In questo esempio, il gestore eventi theInk_InkAdded utilizza i tratti che sono stati aggiunti all'oggetto theInk e li aggiunge all'oggetto theInkAnalyzer.
''' <summary>
''' The ink's InkAdded event handler.
''' </summary>
''' <param name="sender">The source of the event.</param>
''' <param name="e">The event data.</param>
Sub theInk_InkAdded( _
ByVal sender As Object, ByVal e As Microsoft.Ink.StrokesEventArgs)
' This event handler is attached to an Ink object.
Dim theInk As Microsoft.Ink.Ink = DirectCast(sender, Microsoft.Ink.Ink)
' Add the new strokes to the InkAnalyzer.
Me.theInkAnalyzer.AddStrokes(theInk.CreateStrokes(e.StrokeIds))
End Sub 'theInk_InkAdded
/// <summary>
/// The ink's InkAdded event handler.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The event data.</param>
void theInk_InkAdded(object sender, Microsoft.Ink.StrokesEventArgs e)
{
// This event handler is attached to an Ink object.
Microsoft.Ink.Ink theInk = sender as Microsoft.Ink.Ink;
// Add the new strokes to the InkAnalyzer.
this.theInkAnalyzer.AddStrokes(theInk.CreateStrokes(e.StrokeIds));
}
Piattaforme
Windows Vista
.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