コード例 #1
0
 public AutoCorrectTestResults(AutoCompleteMethods autoCompleteMethod,
     IEnumerable<SpellingCorrectionTestResult> results, long memorySize)
 {
     AutoCompleteMethod = autoCompleteMethod;
     Results = results;
     MemorySize = memorySize;
 }
コード例 #2
0
ファイル: AutoCorrectTester.cs プロジェクト: zbc/OptiKey
 public AutoCorrectTestResults(AutoCompleteMethods autoCompleteMethod,
                               IEnumerable <SpellingCorrectionTestResult> results, long memorySize)
 {
     AutoCompleteMethod = autoCompleteMethod;
     Results            = results;
     MemorySize         = memorySize;
 }
コード例 #3
0
        public DictionaryService(AutoCompleteMethods autoCompleteMethod)
        {
            this.autoCompleteMethod = autoCompleteMethod;

            MigrateLegacyDictionaries();
            LoadDictionary();

            //Subscribe to changes in the keyboard language to reload the dictionary
            Settings.Default.OnPropertyChanges(settings => settings.KeyboardAndDictionaryLanguage).Subscribe(_ => LoadDictionary());
        }
コード例 #4
0
        public DictionaryService(AutoCompleteMethods autoCompleteMethod)
        {
            this.autoCompleteMethod = autoCompleteMethod;

            MigrateLegacyDictionaries();
            LoadDictionary();

            //Subscribe to changes in the keyboard language to reload the dictionary
            Settings.Default.OnPropertyChanges(settings => settings.KeyboardAndDictionaryLanguage).Subscribe(_ => LoadDictionary());
        }
コード例 #5
0
        public SpellingCorrectionTester(AutoCompleteMethods autoCompleteMethod, Languages language)
        {
            switch (autoCompleteMethod)
            {
                case AutoCompleteMethods.NGram:
                    autoComplete = new NGramAutoComplete();
                    break;
                case AutoCompleteMethods.Basic:
                    autoComplete = new BasicAutoComplete();
                    break;
                default:
                    throw new ArgumentOutOfRangeException("autoCompleteMethod", autoCompleteMethod, null);
            }

            Configure(language);
        }
コード例 #6
0
        public SpellingCorrectionTester(AutoCompleteMethods autoCompleteMethod, Languages language)
        {
            switch (autoCompleteMethod)
            {
            case AutoCompleteMethods.NGram:
                autoComplete = new NGramAutoComplete();
                break;

            case AutoCompleteMethods.Basic:
                autoComplete = new BasicAutoComplete();
                break;

            default:
                throw new ArgumentOutOfRangeException("autoCompleteMethod", autoCompleteMethod, null);
            }

            Configure(language);
        }