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


InkOverlay.GetGestureStatus - метод

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

Returns a value that indicates whether the InkOverlay object has interest in a particular application gesture.

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

Синтаксис

'Декларация
Public Function GetGestureStatus ( _
    gesture As ApplicationGesture _
) As Boolean
'Применение
Dim instance As InkOverlay
Dim gesture As ApplicationGesture
Dim returnValue As Boolean

returnValue = instance.GetGestureStatus(gesture)
public bool GetGestureStatus(
    ApplicationGesture gesture
)
public:
bool GetGestureStatus(
    ApplicationGesture gesture
)
public boolean GetGestureStatus(
    ApplicationGesture gesture
)
public function GetGestureStatus(
    gesture : ApplicationGesture
) : boolean

Параметры

Возвращаемое значение

Тип: System.Boolean
Whether the InkOverlay object has interest in a particular application gesture.

Value

Meaning

true

The InkOverlay object has interest in the gesture. The Gesture event is raised when the gesture is recognized.

false

The InkOverlay object has no interest in the gesture.

Заметки

This method throws an exception if the gesture parameter is set to AllGestures.

To set the interest of the InkOverlay object in a particular gesture, call the SetGestureStatus method.

ms569277.alert_note(ru-ru,VS.90).gifПримечание.

By default, the InkOverlay object does not have interest in any application gesture.

Примеры

This C# example creates an ArrayList containing all application gestures for which an InkOverlay object, theInkOverlay, has interest.

using Microsoft.Ink;
// . . .
// Return an array of all of the ApplicationGestures that
// have their status set to true on the InkOverlay object.
private ApplicationGesture [] GetSetAppGestures(InkOverlay theInkOverlay)
{
    ArrayList result = new ArrayList();
    Array gestureArray = System.Enum.GetValues(typeof(ApplicationGesture));
    foreach (ApplicationGesture theGesture in gestureArray)
    {
        // ApplicationGesture.AllGestures is not a meaningful 
        // gesture to pass to GetGestureStatus()
        if (theGesture != ApplicationGesture.AllGestures && 
            theInkOverlay.GetGestureStatus(theGesture))
        {
            result.Add(theGesture);
        }
    }
    return (ApplicationGesture[])result.ToArray(typeof(ApplicationGesture));
}

This Microsoft Visual Basic .NET example creates an ArrayList containing all application gestures for which an InkOverlay object, theInkOverlay, has interest.

Imports Microsoft.Ink
' . . .
' Return an array of all of the ApplicationGestures that
' have their status set to true on the InkOverlay object.
Private Function GetSetAppGestures(ByVal theInkOverlay As InkOverlay) As ApplicationGesture()
    Dim result As New ArrayList()
    Dim sampleGesture As ApplicationGesture = ApplicationGesture.NoGesture
    Dim theGestures As Array = System.Enum.GetValues(sampleGesture.GetType())
    Dim theGesture As ApplicationGesture
    For Each theGesture In theGestures
        ' ApplicationGesture.AllGestures is not a meaningful 
        ' gesture to pass to GetGestureStatus
        If (Not theGesture.Equals(ApplicationGesture.AllGestures)) AndAlso _
            theInkOverlay.GetGestureStatus(theGesture) Then
            result.Add(theGesture)
        End If
    Next
    Return CType(result.ToArray(test.GetType()), ApplicationGesture())
End Function

Платформы

Windows Vista

Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.

Сведения о версии

.NET Framework

Поддерживается в версии: 3.0

См. также

Ссылки

InkOverlay Класс

InkOverlay - члены

Microsoft.Ink - пространство имен

ApplicationGesture

InkOverlay.Gesture

InkOverlay.SetGestureStatus