Share via


Metodo InkAnalyzerBase.SetStrokesLanguageId

Aggiornamento: novembre 2007

Modifica l'identificatore delle impostazioni locali per i tratti specificati.

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

Sintassi

'Dichiarazione
Public Sub SetStrokesLanguageId ( _
    strokeIds As Integer(), _
    languageId As Integer _
)
'Utilizzo
Dim instance As InkAnalyzerBase
Dim strokeIds As Integer()
Dim languageId As Integer

instance.SetStrokesLanguageId(strokeIds, _
    languageId)
public void SetStrokesLanguageId(
    int[] strokeIds,
    int languageId
)
public:
void SetStrokesLanguageId(
    array<int>^ strokeIds, 
    int languageId
)
public void SetStrokesLanguageId(
    int[] strokeIds,
    int languageId
)
public function SetStrokesLanguageId(
    strokeIds : int[], 
    languageId : int
)

Parametri

  • strokeIds
    Tipo: array<System.Int32[]
    Matrice che contiene gli identificatori dei tratti ai quali assegnare l'identificatore delle impostazioni locali.
  • languageId
    Tipo: System.Int32
    Identificatore di lingua da assegnare ai tratti specificati.

Note

Le impostazioni locali del tratto vengono impostate quando si aggiunge il tratto tramite la chiamata del metodo AddStroke o AddStrokes. Per ottenere le impostazioni locali assegnate attualmente a un tratto, chiamare GetStrokeLanguageId.

I tratti specificati vengono spostati in un nodo dell'input penna non classificato che contiene tratti della stessa lingua. Se non esiste nessun nodo di contesto simile, questo metodo crea un nuovo nodo dell'input penna non classificato e aggiunge i tratti ad esso. Un nodo dell'input penna non classificato è un oggetto ContextNodeBase che dispone di un valore della proprietà Type di ContextNodeTypeBase.UnclassifiedInk.

Se questo metodo sposta un tratto da un nodo di contesto che non è un nodo dell'input penna non classificato, il metodo aggiunge anche il riquadro del tratto alla proprietà DirtyRegion dell'analizzatore dell'input penna.

Questo metodo non sposta un tratto se il parametro languageId corrisponde l'identificatore di lingua corrente del tratto.

Se un tratto identificato in strokeIds non è associato all'analizzatore dell'input penna, questo metodo ignora l'identificatore.

Se nessuno dei tratti identificati in strokeIds identifica un tratto associato all'analizzatore dell'input penna, questo metodo restituisce un risultato senza aggiornare l'analizzatore dell'input penna.

Questo metodo genera un'eccezione System.ArgumentNullException quando strokeIds è nullriferimento null (Nothing in Visual Basic).

Esempi

Nell'esempio seguente viene impostato il tipo di tratto sul valore Writing di StrokeType e le impostazioni locali del tratto sulla lingua francese per tutti i tratti nel nodo specificato. L'oggetto InkAnalyzerBase, theInkAnalyzerBase, contiene l'oggetto ContextNodeBase, theNode specificato.

' For all strokes in the specified node or one of its descendants,
' set the stroke type to Writing and the stroke locale to French.
Dim theStrokeIds As Integer() = theNode.GetStrokeIds()
If 0 < theStrokeIds.Length Then
    theInkAnalyzerBase.SetStrokesType( _
        theStrokeIds, System.Windows.Ink.AnalysisCore.StrokeType.Writing)
    theInkAnalyzerBase.SetStrokesLanguageId(theStrokeIds, &H40C)
End If
// For all strokes in the specified node or one of its descendants,
// set the stroke type to Writing and the stroke locale to French.
int[] theStrokeIds = theNode.GetStrokeIds();
if (0 < theStrokeIds.Length)
{
    theInkAnalyzerBase.SetStrokesType(theStrokeIds,
        System.Windows.Ink.AnalysisCore.StrokeType.Writing);
    theInkAnalyzerBase.SetStrokesLanguageId(theStrokeIds, 0x040c);
}

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.GetStrokeLanguageId

InkAnalyzerBase.SetStrokeLanguageId