Exemple #1
0
        private void btnSolve_Click(object sender, EventArgs e)
        {
            var startTime = new DateTime();

            startTime = DateTime.Now;

            wordFinder.SolveConundrum(txtBoxInput.Text);
            listSolvedWords.Items.Clear();
            foreach (var word in wordFinder.WordDictionary)
            {
                listSolvedWords.Items.Add(word.Key);
            }

            var timeTaken = ((int)(DateTime.Now - startTime).TotalMilliseconds).ToString();

            lblTimer.Text = $"{wordFinder.WordDictionary.Count} words found in {timeTaken}ms.";
        }