InkRecognizer.Equals 方法

确定指定对象是否等于该 InkRecognizer

命名空间:  System.Windows.Ink
程序集:  IAWinFX(在 IAWinFX.dll 中)

语法

声明
Public Overrides Function Equals ( _
    obj As Object _
) As Boolean
用法
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

参数

返回值

类型:System.Boolean
如果当前的 InkRecognizer 和 otherRecognizer 是同一个 InkRecognizer 的实例,则为 true,否则为 false。

备注

如果 otherRecognizer 和此 InkRecognizer 是同一个 InkRecognizer 的实例,则对象 otherRecognizer 将被视为等于此 InkRecognizer

示例

下面的示例获取默认识别器和日语识别器并比较二者是否相等。

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

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

InkRecognizer 类

InkRecognizer 成员

System.Windows.Ink 命名空间