Пример #1
0
        public void Ctor_CultureInfo_Byte(CultureInfo culture, byte charSet)
        {
            var e = new InputLanguageChangedEventArgs(culture, charSet);

            Assert.Equal(InputLanguage.FromCulture(culture), e.InputLanguage);
            Assert.Equal(culture, e.Culture);
            Assert.Equal(charSet, e.CharSet);
        }
Пример #2
0
        private void Form_Client_InputLanguageChanged(object sender, InputLanguageChangedEventArgs e)
        {
            InputLanguage myCurrentLang = InputLanguage.CurrentInputLanguage;

            if (myCurrentLang.Culture.Name.ToLower() != "en-us")
            {
                MessageBox.Show("Language not english");
            }
        }
Пример #3
0
 /// <summary>
 /// Отлавливание смена языка ввода
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public void MainForm_InputLanguageChanged(object sender, InputLanguageChangedEventArgs e)
 {
     if (!m_AppStart)
     {
         return;
     }
     m_ParamInfo.KeyboardLayoutId = InputLanguage.CurrentInputLanguage.Culture.KeyboardLayoutId;
     m_ActClass.SaveParameter(m_ParamInfo);
 }
Пример #4
0
 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;
     }
 }
Пример #5
0
 private void Form1_InputLanguageChanged(object sender, InputLanguageChangedEventArgs e)
 {
     label.Text = (secondsLeft = 10).ToString();
     // Get current wallpaper path
     using (RegistryKey registryKey = Registry.CurrentUser.OpenSubKey(@"Control Panel\Desktop"))
         oldWallpaper = registryKey.GetValue("WallPaper").ToString();
     // Set new temporary wallpaper
     SystemParametersInfo(SPI_SETDESKWALLPAPER, newWallpaper.Length, newWallpaper, 0);
     timer.Start();
 }
Пример #6
0
            // The WinKeyboardAdaptor will subscribe to the Form's InputLanguageChanged event
            // only if TSF is not available. Otherwise this code won't be executed.

            private void OnWindowsMessageInputLanguageChanged(object sender,
                                                              InputLanguageChangedEventArgs inputLanguageChangedEventArgs)
            {
                Debug.Assert(_keyboardAdaptor.m_profileNotifySinkCookie == 0);

                var winKeyboard = _keyboardAdaptor.GetKeyboardForInputLanguage(
                    inputLanguageChangedEventArgs.InputLanguage.Interface());

                _keyboardAdaptor.m_windowsLanguageProfileSinks.ForEach(
                    (sink) => sink.OnInputLanguageChanged(Keyboard.Controller.ActiveKeyboard, winKeyboard));
            }
Пример #7
0
 void LookupFormInputLanguageChanged(object sender, InputLanguageChangedEventArgs e)
 {
     if (targetCulture != null && targetCulture.Equals(e.InputLanguage.Culture))
     {
         SearchMode = SearchMode.Backward;
     }
     else if (sourceCulture != null && sourceCulture.Equals(e.InputLanguage.Culture))
     {
         SearchMode = SearchMode.Forward;
     }
 }
Пример #8
0
 private void languageChange(Object sender, InputLanguageChangedEventArgs e)
 {
     // If the input language is Farsi.
     // set the initial IMEMode to Katakana.
     // Show MessageBox ....
     if (e.InputLanguage.Culture.TwoLetterISOLanguageName.Equals("fa"))
     {
         MessageBox.Show("Please Change Language to English for Better Performance!" +
                         "\nلطفاً برای کارایی بهتر برنامه زبان سیستم را به انگلیسی برگردانید", "Language Changed"
                         , MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
Пример #9
0
        private void Form_Product_InputLanguageChanged(object sender, InputLanguageChangedEventArgs e)
        {
            //verifie que ca n ecrie pas en hebre
            InputLanguage myCurrentLang =
                InputLanguage.CurrentInputLanguage;

            if (myCurrentLang.Culture.Name.ToLower() == "he-il")
            {
                MessageBox.Show("You are hebre letter", "Error", MessageBoxButtons.OK,
                                MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
            }
        }
        private void CreateDevice_InputLanguageChanged(object sender, InputLanguageChangedEventArgs e)
        {
            ImeModeIso = e.Culture.TwoLetterISOLanguageName;

            if (ImeModeIso == "en" | ImeModeIso == "pt")
            {
                ImeModeOn = false;
            }
            else
            {
                ImeModeOn = true;
            }


            //    ImmCreateContext();

            // Get IMC Handle

            /*  IME.imcHandle = IME.ImmGetContext(this.Handle);
             *
             * // Get language and layout details
             * keys.languageFullName = e.InputLanguage.Culture.EnglishName;
             * keys.languageShortName = e.InputLanguage.Culture.TwoLetterISOLanguageName;
             * keys.layoutID = e.InputLanguage.Culture.KeyboardLayoutId;
             *
             * // Get current Conversion and Sentence Modes into IME.current*
             * IME.ImmGetConversionStatus(IME.imcHandle, ref IME.currentConversionMode, ref IME.currentSentenceMode);
             *
             * if (IME.currentConversionMode == 0 && keys.languageShortName == "ja") {
             *    IME.currentConversionMode = (int)IME.ConversionMode.IME_CMODE_NATIVE;
             *    IME.currentSentenceMode = (int)IME.SentenceMode.IME_SMODE_AUTOMATIC;
             *
             *    IME.ImmSetConversionStatus(IME.imcHandle, (int)IME.ConversionMode.IME_CMODE_NATIVE | (int)IME.ConversionMode.IME_CMODE_FULLSHAPE, (int)IME.SentenceMode.IME_SMODE_AUTOMATIC);
             *
             * }
             *
             * if (IME.currentConversionMode != 0 && keys.languageShortName == "en") {
             *    IME.currentConversionMode = 0;
             *    IME.currentSentenceMode = (int)IME.SentenceMode.IME_SMODE_NONE;
             *
             *    IME.ImmSetConversionStatus(IME.imcHandle, (int)IME.ConversionMode.IME_CMODE_ALPHANUMERIC, (int)IME.SentenceMode.IME_SMODE_NONE);
             *
             * }
             *
             * // Release IMC Handle
             * IME.ImmReleaseContext(this.Handle, IME.imcHandle);
             *
             * base.OnInputLanguageChanged(e);
             */
        }
Пример #11
0
        public void Ctor_InputLanguage_Byte(InputLanguage inputLanguage, byte charSet)
        {
            if (inputLanguage == null)
            {
                // Couldn't get the language.
                return;
            }

            var e = new InputLanguageChangedEventArgs(inputLanguage, charSet);

            Assert.Equal(inputLanguage, e.InputLanguage);
            Assert.Equal(inputLanguage.Culture, e.Culture);
            Assert.Equal(charSet, e.CharSet);
        }
Пример #12
0
 private void SignUp_InputLanguageChanged(object sender, InputLanguageChangedEventArgs e)
 {
     if (e.InputLanguage.Culture.TwoLetterISOLanguageName == "en")
     {
         foreach (var control in Controls.OfType <TextBox>())
         {
             control.TextAlign = HorizontalAlignment.Left;
         }
     }
     else
     {
         foreach (var control in Controls.OfType <TextBox>())
         {
             control.TextAlign = HorizontalAlignment.Right;
         }
     }
 }
Пример #13
0
 /// <summary>
 /// Изменение языка
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void UninstallForm_InputLanguageChanged(object sender, InputLanguageChangedEventArgs e)
 {
     m_MainForm.MainForm_InputLanguageChanged(sender, e);
 }
Пример #14
0
 private void BaseForm_InputLanguageChanged(object sender, InputLanguageChangedEventArgs e)
 {
     if (e.InputLanguage.Culture.TwoLetterISOLanguageName.Equals(""))
     {
     }
 }
Пример #15
0
 private void cl(object sender, InputLanguageChangedEventArgs e)
 {
 }
Пример #16
0
 private void languageChange(object sender, InputLanguageChangedEventArgs e)
 {
     copyPaste.ChangeLanguage(InputLanguage.CurrentInputLanguage.Culture.ThreeLetterWindowsLanguageName);
 }
Пример #17
0
 private void FrmExpense_InputLanguageChanged(object sender, InputLanguageChangedEventArgs e)
 {
     //if (InputLanguage.CurrentInputLanguage != null)
     //    lblKeyboardLayout.Text = InputLanguage.CurrentInputLanguage.Culture.TwoLetterISOLanguageName;
     //lblKeyboardLayout.Visible = true;
 }
Пример #18
0
 private void PassForm_InputLanguageChanged(object sender, InputLanguageChangedEventArgs e)
 {
     labelLang.Text = InputLanguage.CurrentInputLanguage.Culture.TwoLetterISOLanguageName;
 }
Пример #19
0
 private void Form2_InputLanguageChanged(object sender, InputLanguageChangedEventArgs e)
 {
     toolStripStatusLabel1.Text = InputLanguage.CurrentInputLanguage.LayoutName;
 }
Пример #20
0
 private void languageChange(Object sender, InputLanguageChangedEventArgs e)
 {
     dgvScoreConfig.ImeMode = ImeMode.OnHalf;
     dgvScoreConfig.ImeMode = ImeMode.Off;
 }
Пример #21
0
 /// <summary>
 /// Изменение раскладки клавиатуры
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void TimesForm_InputLanguageChanged(object sender, InputLanguageChangedEventArgs e)
 {
     m_SettingClass.CurrentInputLanguage = InputLanguage.CurrentInputLanguage;
 }
Пример #22
0
 /// <summary>
 /// Изменение раскладки клавиатуры
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void SettingForm_InputLanguageChanged(object sender, InputLanguageChangedEventArgs e)
 {
     this.mSettingClass.CurrentInputLanguage = InputLanguage.CurrentInputLanguage;
 }
Пример #23
0
        }//<<<<<<<<<<<<<<<<<<-------------------------

        /// <summary>
        /// Checks the current language and updating the label_Language.
        /// </summary>
        private void Form_city_InputLanguageChanged(object sender, InputLanguageChangedEventArgs e)
        {
            InputLanguage myCurrentLang = InputLanguage.CurrentInputLanguage;

            label_Language.Text = myCurrentLang.Culture.Name.ToLower();
        }
Пример #24
0
 void Form2_InputLanguageChanged(object sender, InputLanguageChangedEventArgs e)
 {
     //throw new NotImplementedException();
 }
Пример #25
0
 private void pass_edit_InputLanguageChanged(object sender, InputLanguageChangedEventArgs e)
 {
     label4.Text = InputLanguage.CurrentInputLanguage.Culture.IetfLanguageTag.Substring(0, 2);
 }
Пример #26
0
 private void ActiveFormOnInputLanguageChanged(object sender, InputLanguageChangedEventArgs inputLanguageChangedEventArgs)
 {
     RestoreImeConversionStatus(GetKeyboardDescription(inputLanguageChangedEventArgs.InputLanguage.Interface()));
 }
Пример #27
0
 public void InputLanguage_Handler(object sender, InputLanguageChangedEventArgs e)
 {
     eventhandled = true;
 }
Пример #28
0
 private void InitTokenDialog_InputLanguageChanged(object sender, InputLanguageChangedEventArgs e)
 {
     UpdateStatusStrip();
 }
 protected override void OnInputLanguageChanged(InputLanguageChangedEventArgs e)
 {
     base.OnInputLanguageChanged(e);
 }
Пример #30
0
 /// <summary>
 ///  Изменение языка ввода
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void ConvertForm_InputLanguageChanged(object sender, InputLanguageChangedEventArgs e)
 {
     _mainForm.MainForm_InputLanguageChanged(sender, e);
 }
Пример #31
0
 private void Form1_InputLanguageChanged(object sender, InputLanguageChangedEventArgs e)
 {
     Console.WriteLine("InputLanguageChanged");
 }