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


InkAnalyzerBase.SetStrokesLanguageId - метод

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

Changes the locale identifier for the specified strokes.

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

Синтаксис

'Декларация
Public Sub SetStrokesLanguageId ( _
    strokeIds As Integer(), _
    languageId As Integer _
)
'Применение
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
)

Параметры

  • strokeIds
    Тип: array<System.Int32[]
    An array containing the stroke identifiers of the strokes to which to assign the locale identifier.
  • languageId
    Тип: System.Int32
    The language identifier to assign to specified strokes.

Заметки

A stroke's locale is set when you add the stroke by calling AddStroke or AddStrokes. To get the locale currently assigned to a stroke, call GetStrokeLanguageId.

The specified strokes are moved to an unclassified ink node that contains strokes of the same language. If no such context node exists, this method creates a new unclassified ink node and adds the strokes to it. An unclassified ink node is a ContextNodeBase that has a Type property value of ContextNodeTypeBase.UnclassifiedInk.

If this method moves a stroke from a context node that is not an unclassified ink node, this method also adds the stroke's bounding box to the ink analyzer's DirtyRegion.

This method does not move a stroke if the languageId parameter matches the stroke's current language identifier.

If a stroke identified in strokeIds is not associated with the ink analyzer, this method ignores the identifier.

If none of the strokes identified in strokeIds identify a stroke associated with the ink analyzer, this method returns without updating the ink analyzer.

This method throws a System.ArgumentNullException when strokeIds is nullссылка null (Nothing в Visual Basic).

Примеры

The following example sets the stroke type to the StrokeType value Writing and the stroke locale to French for all the strokes in the specified node. The InkAnalyzerBase, theInkAnalyzerBase, contains the specified ContextNodeBase, theNode.

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

Платформы

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

InkAnalyzerBase.SetStrokeLanguageId