InkRecognizer.GetLanguages 메서드
업데이트: 2007년 11월
이 InkRecognizer에서 지원하는 로캘의 식별자를 가져옵니다.
네임스페이스: System.Windows.Ink
어셈블리: IAWinFX(IAWinFX.dll)
구문
‘선언
Public Function GetLanguages As Integer()
‘사용 방법
Dim instance As InkRecognizer
Dim returnValue As Integer()
returnValue = instance.GetLanguages()
public int[] GetLanguages()
public:
array<int>^ GetLanguages()
public int[] GetLanguages()
public function GetLanguages() : int[]
반환 값
형식: array<System.Int32[]
이 InkRecognizer에서 지원하는 로캘의 식별자입니다.
설명
개체 및 제스처 인식기의 경우에는 빈 배열이 반환됩니다.
예제
다음 예제에서는 문자열을 반환하는 메서드를 정의합니다. 지정된 InkRecognizer에 대한 정보가 들어 있는 문자열입니다. 리플렉션을 사용하여 InkRecognizer의 기능에 대한 정보를 반환하는 도우미 메서드인 ListCapabilities는 이 예제에 나와 있지 않습니다.
' <summary>
' Generates a string containing information about the specified InkRecognizer.
' </summary>
' <param name="theInkRecognizer">
' The InkRecognizer from which to gather the information.
' </param>
' <returns>
' A string containing information about the specified InkRecognizer.
' </returns>
Private Function GetInkRecognizerData(ByVal theInkRecognizer As InkRecognizer) As String
' Create a StringBuilder in which to collect the information.
Dim result As New System.Text.StringBuilder()
' Add the name of the recognizer.
result.AppendLine(String.Format("Name: {0}", theInkRecognizer.Name))
' Add the GUID of the recognizer.
result.AppendLine(String.Format(" Guid: {0}", theInkRecognizer.Guid))
' Add the vendor of the recognizer.
result.AppendLine(String.Format(" Vendor: {0}", theInkRecognizer.Vendor))
' Add the languages the recognizer supports.
result.AppendLine(" Supports the following languages:")
If 0 = theInkRecognizer.GetLanguages().Length Then
result.AppendLine(" No languages supported.")
Else
Dim lcid As Integer
For Each lcid In theInkRecognizer.GetLanguages()
Dim theCultureInfo As New System.Globalization.CultureInfo(lcid)
result.AppendLine(String.Format(" 0x{0:x4}: {1}", lcid, theCultureInfo.EnglishName))
Next lcid
End If
' Add the capabilities of the recognizer.
result.AppendLine(String.Format(" Capabilities: 0x{0:x}", theInkRecognizer.Capabilities))
' List each capability separately, using a helper method.
result.Append(Me.ListCapabilities(theInkRecognizer.Capabilities))
result.AppendLine(String.Format(" {0} properties supported.", _
theInkRecognizer.GetSupportedProperties().Length.ToString()))
Return result.ToString()
End Function 'GetInkRecognizerData
/// <summary>
/// Generates a string containing information about the specified InkRecognizer.
/// </summary>
/// <param name="theInkRecognizer">
/// The InkRecognizer from which to gather the information.
/// </param>
/// <returns>
/// A string containing information about the specified InkRecognizer.
/// </returns>
private string GetInkRecognizerData(
InkRecognizer theInkRecognizer)
{
// Create a StringBuilder in which to collect the information.
System.Text.StringBuilder result = new System.Text.StringBuilder();
// Add the name of the recognizer.
result.AppendLine(string.Format(
"Name: {0}", theInkRecognizer.Name));
// Add the GUID of the recognizer.
result.AppendLine(string.Format(
" Guid: {0}", theInkRecognizer.Guid));
// Add the vendor of the recognizer.
result.AppendLine(string.Format(
" Vendor: {0}", theInkRecognizer.Vendor));
// Add the languages the recognizer supports.
result.AppendLine(" Supports the following languages:");
if (0 == theInkRecognizer.GetLanguages().Length)
{
result.AppendLine(" No languages supported.");
}
else
{
foreach (int lcid in theInkRecognizer.GetLanguages())
{
System.Globalization.CultureInfo theCultureInfo =
new System.Globalization.CultureInfo(lcid);
result.AppendLine(string.Format(
" 0x{0:x4}: {1}", lcid, theCultureInfo.EnglishName));
}
}
// Add the capabilities of the recognizer.
result.AppendLine(string.Format(
" Capabilities: 0x{0:x}", theInkRecognizer.Capabilities));
// List each capability separately, using a helper method.
result.Append(this.ListCapabilities(theInkRecognizer.Capabilities));
result.AppendLine(string.Format(" {0} properties supported.",
theInkRecognizer.GetSupportedProperties().Length.ToString()));
return result.ToString();
}
플랫폼
Windows Vista
.NET Framework 및 .NET Compact Framework에서 모든 플랫폼의 전체 버전을 지원하지는 않습니다. 지원되는 버전의 목록을 보려면 .NET Framework 시스템 요구 사항을 참조하십시오.
버전 정보
.NET Framework
3.0에서 지원