InputLanguageChangedEventArgs InputLanguageChangedEventArgs InputLanguageChangedEventArgs InputLanguageChangedEventArgs Class

Definición

Proporciona datos para el evento InputLanguageChanged.Provides data for the InputLanguageChanged event.

public ref class InputLanguageChangedEventArgs : EventArgs
public class InputLanguageChangedEventArgs : EventArgs
type InputLanguageChangedEventArgs = class
    inherit EventArgs
Public Class InputLanguageChangedEventArgs
Inherits EventArgs
Herencia
InputLanguageChangedEventArgsInputLanguageChangedEventArgsInputLanguageChangedEventArgsInputLanguageChangedEventArgs

Ejemplos

En el ejemplo siguiente se crea un nuevo Form y adjunta un controlador de eventos para el InputLanguageChanged eventos.The following example creates a new Form and attaches an event handler to the InputLanguageChanged event. Este evento cambia el IMEmode cuando cambia el idioma de entrada para japonés.This event changes the IMEmode when the input language changes to Japanese.

#using <System.Data.dll>
#using <System.Windows.Forms.dll>
#using <System.dll>
#using <System.Drawing.dll>

using namespace System;
using namespace System::Drawing;
using namespace System::Collections;
using namespace System::ComponentModel;
using namespace System::Windows::Forms;
using namespace System::Data;
public ref class Form1: public System::Windows::Forms::Form
{
private:
   RichTextBox^ rtb;

public:
   Form1()
   {
      rtb = gcnew RichTextBox;
      this->Controls->Add( rtb );
      rtb->Dock = DockStyle::Fill;
      this->InputLanguageChanged += gcnew InputLanguageChangedEventHandler( this, &Form1::languageChange );
   }


private:
   void languageChange( Object^ /*sender*/, InputLanguageChangedEventArgs^ e )
   {
      
      // If the input language is Japanese.
      // set the initial IMEMode to Katakana.
      if ( e->InputLanguage->Culture->TwoLetterISOLanguageName->Equals( "ja" ) )
      {
         rtb->ImeMode = System::Windows::Forms::ImeMode::Katakana;
      }
   }

};

int main()
{
   Application::Run( gcnew Form1 );
}

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

public class Form1 : System.Windows.Forms.Form
{
	RichTextBox rtb = new RichTextBox();
	public Form1()
	{
		this.Controls.Add(rtb);
		rtb.Dock = DockStyle.Fill;
		this.InputLanguageChanged += new InputLanguageChangedEventHandler(languageChange);
	}
	private void languageChange(Object sender, InputLanguageChangedEventArgs e)
	{
		// If the input language is Japanese.
		// set the initial IMEMode to Katakana.
		if (e.InputLanguage.Culture.TwoLetterISOLanguageName.Equals("ja"))
		{
			rtb.ImeMode = System.Windows.Forms.ImeMode.Katakana;
		}
	}
	public static void Main(string[] args)
	{
		Application.Run(new Form1());
	}
}
Imports System
Imports System.Drawing
Imports System.Collections
Imports System.ComponentModel
Imports System.Windows.Forms
Imports System.Data

Public Class Form1
   Inherits System.Windows.Forms.Form
   
   Dim WithEvents rtb As New RichTextBox()
   
   Public Sub New()
      MyBase.New()
      Me.Controls.Add(rtb)
      rtb.Dock = DockStyle.Fill
   End Sub

   Private Sub languageChange( _
      ByVal sender As Object, _
      ByVal e As InputLanguageChangedEventArgs _
   ) Handles MyBase.InputLanguageChanged

      ' If the input language is Japanese.
      ' set the initial IMEMode to Katakana.
      If e.InputLanguage.Culture.TwoLetterISOLanguageName.Equals("ja") = True Then
         rtb.ImeMode = System.Windows.Forms.ImeMode.Katakana
      End If
   End Sub

   Public Shared Sub Main()
      Application.Run(new Form1())
   End Sub

End Class

Comentarios

Puede usar los datos desde el InputLanguageChangedEventArgs para tomar decisiones sobre si se debe cambiar los editores de métodos de entrada (IME) o intercambiar valores de derecha a izquierda.You can use the data from the InputLanguageChangedEventArgs to make decisions about whether to change Input Method Editors (IMEs) or swap right-to-left values. También puede cambiar el CurrentCulture de un subproceso y el CurrentUICulture propiedades para que se recogen los distintos recursos.You can also change the CurrentCulture of a thread and the CurrentUICulture properties so that different resources get picked up.

Un InputLanguageChangedEventArgs identifica la configuración regional y el juego de caracteres del idioma de entrada nueva.An InputLanguageChangedEventArgs identifies the locale and the character set of the new input language.

El InputLanguageChanging event precede a la InputLanguageChanged eventos.The InputLanguageChanging event precedes the InputLanguageChanged event.

Constructores

InputLanguageChangedEventArgs(CultureInfo, Byte) InputLanguageChangedEventArgs(CultureInfo, Byte) InputLanguageChangedEventArgs(CultureInfo, Byte) InputLanguageChangedEventArgs(CultureInfo, Byte)

Inicializa una nueva instancia de la clase InputLanguageChangedEventArgs con la configuración regional y el juego de caracteres especificados.Initializes a new instance of the InputLanguageChangedEventArgs class with the specified locale and character set.

InputLanguageChangedEventArgs(InputLanguage, Byte) InputLanguageChangedEventArgs(InputLanguage, Byte) InputLanguageChangedEventArgs(InputLanguage, Byte) InputLanguageChangedEventArgs(InputLanguage, Byte)

Inicializa una nueva instancia de la clase InputLanguageChangedEventArgs con el idioma de entrada y el juego de caracteres especificados.Initializes a new instance of the InputLanguageChangedEventArgs class with the specified input language and character set.

Propiedades

CharSet CharSet CharSet CharSet

Obtiene el juego de caracteres asociado al nuevo idioma de entrada.Gets the character set associated with the new input language.

Culture Culture Culture Culture

Obtiene la configuración regional del idioma de entrada.Gets the locale of the input language.

InputLanguage InputLanguage InputLanguage InputLanguage

Obtiene un valor que indica el idioma de entrada.Gets a value indicating the input language.

Métodos

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determina si el objeto especificado es igual al objeto actual.Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Sirve como la función hash predeterminada.Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Obtiene el Type de la instancia actual.Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Crea una copia superficial del objeto Object actual.Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Devuelve una cadena que representa el objeto actual.Returns a string that represents the current object.

(Inherited from Object)

Se aplica a

Consulte también: