Ejemplo n.º 1
0
        public void Start()
        {
            try
            {
                String   writtenWord   = Graphic.GetWords();
                string[] splittedWords = writtenWord.Split(' ', '\t');

                List <String> toFind = splittedWords.Select(x => x.ToLower()).ToList();

                /*
                 * foreach (String word in splittedWords)
                 * {
                 *  String lowerCaseWord = word.ToLower();
                 *  toFind.Add(lowerCaseWord);
                 * }
                 */

                List <string> findedWords = null;
                if (toFind.Count > 0)
                {
                    findedWords = Solver.FindWords(toFind);
                }

                Graphic.WriteWords(findedWords);
            } catch (Exception e)
            {
                Graphic.ErrorMessage(e.Message);
            }
        }
Ejemplo n.º 2
0
        public void Start()
        {
            ArrayList words       = DataReader.GetData();
            String    writtenWord = Graphic.GetWords();

            string[] splittedWords = writtenWord.Split(' ', '\t');

            ArrayList toFind = new ArrayList();

            foreach (String word in splittedWords)
            {
                String lowerCaseWord = word.ToLower();
                toFind.Add(lowerCaseWord);
            }

            List <string> findedWords = null;

            if (toFind.Count > 0)
            {
                findedWords = Solver.FindWords(words, toFind);
            }

            Graphic.WriteWords(findedWords);
        }