Aracılığıyla paylaş


InputLanguageChangingEventArgs.Culture Özellik

Tanım

İstenen giriş dilinin yerel ayarını alır.

public:
 property System::Globalization::CultureInfo ^ Culture { System::Globalization::CultureInfo ^ get(); };
public System.Globalization.CultureInfo Culture { get; }
member this.Culture : System.Globalization.CultureInfo
Public ReadOnly Property Culture As CultureInfo

Özellik Değeri

CultureInfo İstenen giriş dilinin yerel ayarını belirten bir.

Örnekler

Aşağıdaki kod örneğinde bu üyenin kullanımı gösterilmektedir. Örnekte, olay işleyicisi olayın oluşumunu Form.InputLanguageChanging bildirir. Bu rapor, olayın ne zaman gerçekleştiğini öğrenmenize yardımcı olur ve hata ayıklamada size yardımcı olabilir. Birden çok olayı veya sık gerçekleşen olayları raporlamak için, iletisini ile MessageBox.Show değiştirmeyi Console.WriteLine veya çok satırlı TextBoxbir iletiye eklemeyi göz önünde bulundurun.

Örnek kodu çalıştırmak için, adlı Formtürünün Form1 bir örneğini içeren bir projeye yapıştırın. Ardından olay işleyicisinin olayla ilişkilendirildiğinden Form.InputLanguageChanging emin olun.

private void Form1_InputLanguageChanging(Object sender, InputLanguageChangingEventArgs e) {

System.Text.StringBuilder messageBoxCS = new System.Text.StringBuilder();
messageBoxCS.AppendFormat("{0} = {1}", "InputLanguage", e.InputLanguage );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "Culture", e.Culture );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "SysCharSet", e.SysCharSet );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "Cancel", e.Cancel );
messageBoxCS.AppendLine();
MessageBox.Show(messageBoxCS.ToString(), "InputLanguageChanging Event" );
}
Private Sub Form1_InputLanguageChanging(sender as Object, e as InputLanguageChangingEventArgs) _ 
     Handles Form1.InputLanguageChanging

    Dim messageBoxVB as New System.Text.StringBuilder()
    messageBoxVB.AppendFormat("{0} = {1}", "InputLanguage", e.InputLanguage)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "Culture", e.Culture)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "SysCharSet", e.SysCharSet)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "Cancel", e.Cancel)
    messageBoxVB.AppendLine()
    MessageBox.Show(messageBoxVB.ToString(),"InputLanguageChanging Event")

End Sub

Açıklamalar

Culture özelliği, kullanıcının diline, alt diline, ülkesine/bölgesine ve kültürel kurallarına bağlı bir kullanıcı tercih bilgileri kümesini tanımlayan bir CultureInfo öğesini belirtir.

Şunlara uygulanır