Compartir a través de


InkRecognizer.Equals Method (Object)

Determines whether the specified object is equal to the InkRecognizer.

Namespace: System.Windows.Ink
Assembly: IAWinFX (in iawinfx.dll)

Syntax

'Declaration
Public Overrides Function Equals ( _
    obj As Object _
) As Boolean
'Usage
Dim instance As InkRecognizer
Dim obj As Object
Dim returnValue As Boolean

returnValue = instance.Equals(obj)
public override bool Equals (
    Object obj
)
public:
virtual bool Equals (
    Object^ obj
) override
public boolean Equals (
    Object obj
)
public override function Equals (
    obj : Object
) : boolean
Not applicable.

Parameters

  • obj

Return Value

true if the current InkRecognizer and the otherRecognizer are instances of the same InkRecognizer; otherwise, false.

Remarks

The object otherRecognizer is considered equal to this InkRecognizer if otherRecognizer and this InkRecognizer are instances of the same InkRecognizer.

Example

The following example gets the default recognizer and the Japanese recognizer and compares them for equality.

' Get the InkRecognitionCollection from the InkAnalyzer
Dim inkRecognizers As InkRecognizerCollection = theInkAnalyzer.GetInkRecognizersByPriority()

' Only check fo equality if there are 2 ink recognizers 
' associated with the InkAnalyzer.
If inkRecognizers.Count >= 2 Then
    ' Get the default InkRecognizer.
    Dim defaultInkRecognizer As InkRecognizer = inkRecognizers(0)
    
    ' Get the Japanese InkRecognizer.
    Dim japaneseInkRecognizer As InkRecognizer = _
        inkRecognizers.GetPriorityInkRecognizer(&H11)
    
    ' Check the default recognizer.
    If Not defaultInkRecognizer.Equals(japaneseInkRecognizer) Then
        ' The default InkRecognizer is not the Japanese InkRecognizer.
        MessageBox.Show("The default InkRecognizer is not the Japanese InkRecognizer.")
    End If
End If
// Get the InkRecognitionCollection from the InkAnalyzer
InkRecognizerCollection inkRecognizers = theInkAnalyzer.GetInkRecognizersByPriority();

// Only check fo equality if there are 2 ink recognizers 
// associated with the InkAnalyzer.
if (inkRecognizers.Count >= 2)
{
    // Get the default InkRecognizer.
    InkRecognizer defaultInkRecognizer =
        inkRecognizers[0];

    // Get the Japanese InkRecognizer.
    InkRecognizer japaneseInkRecognizer =
        inkRecognizers.GetPriorityInkRecognizer(0x0011);

    // Check the default recognizer.
    if (!defaultInkRecognizer.Equals(japaneseInkRecognizer))
    {
        // The default InkRecognizer is not the Japanese InkRecognizer.
        MessageBox.Show("The default InkRecognizer is not the Japanese InkRecognizer.");
    }
}

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkRecognizer Class
InkRecognizer Members
System.Windows.Ink Namespace