コード例 #1
0
        private async Task Start()
        {
            Disable();
            var levelIndex = ((Level)SelectedLevel).LevelIndex;

            CurrentWordIndex = 0;
            var wls = new WordListService();

            _wordsToMatch = (await wls.GetWordsAsync(100, levelIndex)).ToList();
            var wordViewModels = _wordsToMatch.Select((w, i) => new WordViewModel
            {
                Active = i == 0,
                Text   = new StringTupple
                {
                    Display = w,
                    Compare = ""
                }
            });

            WordsToType = new ObservableCollection <WordViewModel>(wordViewModels);
            WordToMatch = WordsToType[0].Text.Display;

            IsMainInputFocused = true;
            ResetScroll        = true;
            _startTime         = DateTime.Now;
            Enable();
        }
コード例 #2
0
        public async Task GetWordsTxtFile(string pathFie)
        {
            WordListEnginner We = new WordListEnginner();
            var WList           = We.GetAllWordsClean(pathFie);

            _WlS = new WordListService();
            await _WlS.InsertAsync(WList);
        }
コード例 #3
0
ファイル: LetterCall.cs プロジェクト: NSTI2020/WordList
        public async Task OrderAll()
        {
            WordListService wLs = new WordListService();
            LetterService   Le  = new LetterService();
            await Le.OrderByLetter("a");

            await Le.OrderByLetter("b");

            await Le.OrderByLetter("c");

            await Le.OrderByLetter("d");

            await Le.OrderByLetter("e");

            await Le.OrderByLetter("f");

            await Le.OrderByLetter("g");

            await Le.OrderByLetter("h");

            await Le.OrderByLetter("i");

            await Le.OrderByLetter("j");

            await Le.OrderByLetter("k");

            await Le.OrderByLetter("l");

            await Le.OrderByLetter("m");

            await Le.OrderByLetter("n");

            await Le.OrderByLetter("o");

            await Le.OrderByLetter("p");

            await Le.OrderByLetter("q");

            await Le.OrderByLetter("r");

            await Le.OrderByLetter("s");

            await Le.OrderByLetter("t");

            await Le.OrderByLetter("u");

            await Le.OrderByLetter("v");

            await Le.OrderByLetter("w");

            await Le.OrderByLetter("x");

            await Le.OrderByLetter("y");

            await Le.OrderByLetter("z");

            wLs.Clear();
        }
コード例 #4
0
 public void ClearWordlist()
 {
     _WlS = new WordListService();
     _WlS.Clear();
 }