コード例 #1
0
        public DictionaryViewModel(IDictionarySearchManager dictionarySearchManager, IFlashCardManager flashCardManager, IStudySettingsService studySettingsService)
        {
            _dictionarySearchManager = dictionarySearchManager;
            _flashCardManager = flashCardManager;
            _studySettingsService = studySettingsService;

            _searchInputType = DictionarySearchInputType.English;
            SearchTypeIsEnglish = true;
            AvailibleDictionarySearchInputTypes = new[]
            {
                DictionarySearchInputType.English,
                DictionarySearchInputType.Chinese,
                DictionarySearchInputType.Pinyin
            };

            SetListPopUpIsOpen = false;
            GetFlashCardSets();

			Filter = "dictionary";
        }
コード例 #2
0
        private void UpdateSearchType(DictionarySearchInputType type)
        {
            _searchTypeIsEnglish = false;
            _searchTypeIsChinese = false;
            _searchTypeIsPinyin = false;

            switch (type)
            {
                 case DictionarySearchInputType.Chinese:
                    _searchTypeIsChinese = true;
                    break;
                case DictionarySearchInputType.English:
                    _searchTypeIsEnglish = true;
                    break;
                case DictionarySearchInputType.Pinyin:
                    _searchTypeIsPinyin = true;
                    break;
            }
            RaiseAllPropertiesChanged();
        }