다음을 통해 공유


InkCollector.GetGestureStatus 메서드

업데이트: 2007년 11월

InkCollector 개체에 특정 응용 프로그램 제스처에 대한 관심도가 있는지 여부를 나타내는 값을 반환합니다.

네임스페이스:  Microsoft.Ink
어셈블리:  Microsoft.Ink(Microsoft.Ink.dll)

구문

‘선언
Public Function GetGestureStatus ( _
    gesture As ApplicationGesture _
) As Boolean
‘사용 방법
Dim instance As InkCollector
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
InkCollector 개체에 특정 응용 프로그램 제스처에 대한 관심도가 있으면 true이고, 그렇지 않으면 false입니다.

설명

제스처가 인식되면 Gesture 이벤트가 발생합니다.

gesture 매개 변수가 ApplicationGesture로 설정되면 이 메서드는 예외를 throw합니다.

특정 제스처에 대한 InkCollector 개체의 관심도를 설정하려면 InkCollector.SetGestureStatus 메서드를 호출합니다.

참고

기본적으로 InkCollector 개체에는 응용 프로그램 제스처에 대한 관심도가 없습니다.

예제

이 C# 예제에서는 InkCollector 개체인 theInkCollector에 관심도가 지정된 모든 응용 프로그램 제스처가 들어 있는 ArrayList를 만듭니다.

using Microsoft.Ink;
// . . .
// Return an array of all of the ApplicationGestures that
// have their status set to true on the InkCollector object.
private ApplicationGesture [] GetSetAppGestures(InkCollector theInkCollector)
{
    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 && 
            theInkCollector.GetGestureStatus(theGesture))
        {
            result.Add(theGesture);
        }
    }
    return (ApplicationGesture[])result.ToArray(typeof(ApplicationGesture));
}

이 Microsoft Visual Basic .NET 예제에서는 InkCollector 개체인 theInkCollector에 관심도가 지정된 모든 응용 프로그램 제스처가 들어 있는 ArrayList를 만듭니다.

Imports Microsoft.Ink
' . . .
' Return an array of all of the ApplicationGestures that
' have their status set to true on the InkCollector object.
Private Function GetSetAppGestures(ByVal theInkCollector As InkCollector) 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 _
            theInkCollector.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에서 지원

참고 항목

참조

InkCollector 클래스

InkCollector 멤버

Microsoft.Ink 네임스페이스

ApplicationGesture

InkCollector.Gesture

InkCollector.SetGestureStatus