Exemple #1
0
        private void LanguagesCombo_SelectedIndexChanged(object sender, EventArgs e)
        {
            var selIndex = (sender as ComboBox).SelectedIndex;
            var language = WritePadAPI.LanguageType.en;

            switch (selIndex)
            {
            case 0:
                language = WritePadAPI.LanguageType.en;
                break;

            case 1:
                language = WritePadAPI.LanguageType.en_uk;
                break;

            case 2:
                language = WritePadAPI.LanguageType.de;
                break;

            case 3:
                language = WritePadAPI.LanguageType.fr;
                break;

            case 4:
                language = WritePadAPI.LanguageType.es;
                break;

            case 5:
                language = WritePadAPI.LanguageType.pt_PT;
                break;

            case 6:
                language = WritePadAPI.LanguageType.pt_BR;
                break;

            case 7:
                language = WritePadAPI.LanguageType.nl;
                break;

            case 8:
                language = WritePadAPI.LanguageType.it;
                break;

            case 9:
                language = WritePadAPI.LanguageType.fi;
                break;

            case 10:
                language = WritePadAPI.LanguageType.sv;
                break;

            case 11:
                language = WritePadAPI.LanguageType.nb;
                break;

            case 12:
                language = WritePadAPI.LanguageType.da;
                break;

            case 13:
                language = WritePadAPI.LanguageType.id;
                break;
            }
            var flags = WritePadAPI.HWR_GetRecognitionFlags(WritePadAPI.getRecoHandle());

            ClearInk();
            WritePadAPI.releaseRecognizer();
            WritePadAPI.language = language;
            DictionaryChanged();
            WritePadAPI.HWR_SetRecognitionFlags(WritePadAPI.getRecoHandle(), flags);
        }
Exemple #2
0
 private void AutoCorrector_CheckedChanged(object sender, EventArgs e)
 {
     flags = WritePadAPI.setRecoFlag(flags, AutoCorrector.Checked, WritePadAPI.FLAG_CORRECTOR);
     WritePadAPI.HWR_SetRecognitionFlags(WritePadAPI.getRecoHandle(), flags);
 }
Exemple #3
0
 private void DictionaryOnly_CheckedChanged(object sender, EventArgs e)
 {
     flags = WritePadAPI.setRecoFlag(flags, DictionaryOnly.Checked, WritePadAPI.FLAG_ONLYDICT);
     WritePadAPI.HWR_SetRecognitionFlags(WritePadAPI.getRecoHandle(), flags);
 }
Exemple #4
0
 private void DisableSegmentation_CheckedChanged(object sender, EventArgs e)
 {
     flags = WritePadAPI.setRecoFlag(flags, DisableSegmentation.Checked, WritePadAPI.FLAG_SINGLEWORDONLY);
     WritePadAPI.HWR_SetRecognitionFlags(WritePadAPI.getRecoHandle(), flags);
 }
Exemple #5
0
 private void AutoLearner_CheckedChanged(object sender, EventArgs e)
 {
     flags = WritePadAPI.setRecoFlag(flags, AutoLearner.Checked, WritePadAPI.FLAG_ANALYZER);
     WritePadAPI.HWR_SetRecognitionFlags(WritePadAPI.getRecoHandle(), flags);
 }
 private void DictionaryOnly_OnClick(object sender, RoutedEventArgs e)
 {
     flags = WritePadAPI.setRecoFlag(flags, DictionaryOnly.IsChecked ?? false, WritePadAPI.FLAG_ONLYDICT);
     WritePadAPI.HWR_SetRecognitionFlags(WritePadAPI.getRecoHandle(), flags);
 }
Exemple #7
0
 private void SeparateLetters_CheckedChanged(object sender, EventArgs e)
 {
     flags = WritePadAPI.setRecoFlag(flags, SeparateLetters.Checked, WritePadAPI.FLAG_SEPLET);
     WritePadAPI.HWR_SetRecognitionFlags(WritePadAPI.getRecoHandle(), flags);
 }
 private void AutoLearner_OnClick(object sender, RoutedEventArgs e)
 {
     flags = WritePadAPI.setRecoFlag(flags, AutoLearner.IsChecked ?? false, WritePadAPI.FLAG_ANALYZER);
     WritePadAPI.HWR_SetRecognitionFlags(WritePadAPI.getRecoHandle(), flags);
 }
 private void AutoCorrector_OnClick(object sender, RoutedEventArgs e)
 {
     flags = WritePadAPI.setRecoFlag(flags, AutoCorrector.IsChecked ?? false, WritePadAPI.FLAG_CORRECTOR);
     WritePadAPI.HWR_SetRecognitionFlags(WritePadAPI.getRecoHandle(), flags);
 }
 private void DisableSegmentation_OnClick(object sender, RoutedEventArgs e)
 {
     flags = WritePadAPI.setRecoFlag(flags, DisableSegmentation.IsChecked ?? false, WritePadAPI.FLAG_SINGLEWORDONLY);
     WritePadAPI.HWR_SetRecognitionFlags(WritePadAPI.getRecoHandle(), flags);
 }
 private void SeparateLetters_OnClick(object sender, RoutedEventArgs e)
 {
     flags = WritePadAPI.setRecoFlag(flags, SeparateLetters.IsChecked ?? false, WritePadAPI.FLAG_SEPLET);
     WritePadAPI.HWR_SetRecognitionFlags(WritePadAPI.getRecoHandle(), flags);
 }
Exemple #12
0
 private void Dict_words_OnClick(object sender, RoutedEventArgs e)
 {
     recoFlags = WritePadAPI.setRecoFlag(recoFlags, dict_words.IsChecked ?? false, WritePadAPI.FLAG_ONLYDICT);
     WritePadAPI.HWR_SetRecognitionFlags(WritePadAPI.getRecoHandle(), recoFlags);
 }
Exemple #13
0
 private void User_dictionary_OnClick(object sender, RoutedEventArgs e)
 {
     recoFlags = WritePadAPI.setRecoFlag(recoFlags, user_dictionary.IsChecked ?? false, WritePadAPI.FLAG_USERDICT);
     WritePadAPI.HWR_SetRecognitionFlags(WritePadAPI.getRecoHandle(), recoFlags);
 }
Exemple #14
0
 private void Single_word_OnClick(object sender, RoutedEventArgs e)
 {
     recoFlags = WritePadAPI.setRecoFlag(recoFlags, single_word.IsChecked ?? false, WritePadAPI.FLAG_SINGLEWORDONLY);
     WritePadAPI.HWR_SetRecognitionFlags(WritePadAPI.getRecoHandle(), recoFlags);
 }