示例#1
0
        internal WordVocabularySource(ApplicationModel model)
            : base(model, predictorWidth: 4)
        {
            var words = model.Environment.GetOrderedSeedWords();

            _tokens = StringTokens.Create(words);

            _tileFilter = new WordTileFilter(this, _tokens, CultureInfo.CurrentUICulture);

            _headItems.Add(new HeadStartItem(this));
            _tailItems.Add(null); // Create the slot for the tail item.
            SetSelectedIndex(0);

            HeadItems = new ReadOnlyObservableCollection <ITile>(_headItems);
            TailItems = new ReadOnlyObservableCollection <ITile>(_tailItems);

            PopulateVocabularyList();

            InitializeUtterance();
            SetRunOnSuggestions();

            var spellingSource = new SpellingVocabularySource(model, this);

            _spellingSource = spellingSource;

            ParanoidAssertValid();
        }
示例#2
0
 internal UnicodeVocabularySource(ApplicationModel model, SpellingVocabularySource parent)
     : base(model, CodeMinimum, CodeLimit - (SurrogateCodePointsLimit - SurrogateCodePointsMinimum))
 {
     _parent = parent;
 }