Esempio n. 1
0
        public void markWordAsMastered(Word currentWord)
        {
            WordDaoImpl dao = new WordDaoImpl();

            dao.updateNote(currentWord);
            UnMasteredWordList.Remove(currentWord);
        }
Esempio n. 2
0
 public void checkNAdd(Word word)
 {
     Word word2BChanged = new Word();
     if (WordList.Contains(word))
     {
         WordList.ElementAt<Word>(WordList.IndexOf(word)).AdditionalInfo = word.AdditionalInfo;
         WordDaoImpl dao = new WordDaoImpl();
         dao.updateNote(word);
     }
 }
Esempio n. 3
0
        public void checkNAdd(Word word)
        {
            Word word2BChanged = new Word();

            if (WordList.Contains(word))
            {
                WordList.ElementAt <Word>(WordList.IndexOf(word)).AdditionalInfo = word.AdditionalInfo;
                WordDaoImpl dao = new WordDaoImpl();
                dao.updateNote(word);
            }
        }
Esempio n. 4
0
        private void fetchAllWordsFromDB()
        {
            WordDaoImpl dao = new WordDaoImpl();

            WordList = dao.getAllWords();
            foreach (Word word in WordList)
            {
                WDictionary.Add(word);
                WordsNameOnlyList.Add((word.Name));
            }

            UnMasteredWordList = dao.getAllUnmasteredWords();
        }
Esempio n. 5
0
        /// <summary>
        /// Returns word list containg the word itself and its homonyms
        /// </summary>
        /// <param name="text"></param>
        /// <returns></returns>
        public List<Word> getHomonymsWordListSet(string text)
        {
            IWordDao wordDao = new WordDaoImpl();
               List<string> stringList = getHomonymsForWord(text);
               List<Word> wordList = new List<Word>();
               List<Word> wl_ = wordDao.getWord(text);
               foreach (Word word in wl_)
               {
               wordList.Add(word);
               }

               foreach (string wordText in stringList)
               {
               List<Word> words = wordDao.getWord(wordText);
               foreach (Word word in words)
               {
                   wordList.Add(word);
               }
               }
               return wordList;
        }
Esempio n. 6
0
        private void chkbxIsMastered_Checked(object sender, RoutedEventArgs e)
        {
            Xceed.Wpf.Controls.CheckBox chk = (Xceed.Wpf.Controls.CheckBox)sender;
            if (chk.IsChecked != true)
            {
                chk.IsChecked = true;
            }

            Word word = (Word)xdgFocusWords.SelectedItem;
            //   MessageBox.Show("check" + word);

            WordDaoImpl wordDao      = new WordDaoImpl();
            Word        selectedWord = (Word)xdgFocusWords.SelectedItem;

            // MessageBox.Show(selectedWord.IsMastered.ToString());
            selectedWord.IsMastered = true;
            wordDao.updateNote((Word)selectedWord);
            //MessageBox.Show(selectedWord.Name);
            // xdgFocusWords.Columns.Clear();
            xdgFocusWords.ItemsSource =
                wordDao.getFirstNunmasteredWords(15);
        }
Esempio n. 7
0
        /// <summary>
        /// Returns word list containg the word itself and its homonyms
        /// </summary>
        /// <param name="text"></param>
        /// <returns></returns>
        public List <Word> getSynonymsWordListSet(string text)
        {
            IWordDao      wordDao    = new WordDaoImpl();
            List <string> stringList = getSynonymsForWord(text);
            List <Word>   wordList   = new List <Word>();
            List <Word>   wl_        = wordDao.getWord(text);

            foreach (Word word in wl_)
            {
                wordList.Add(word);
            }

            foreach (string wordText in stringList)
            {
                List <Word> words = wordDao.getWord(wordText);
                foreach (Word word in words)
                {
                    wordList.Add(word);
                }
            }
            return(wordList);
        }
Esempio n. 8
0
        private void fetchAllWordsFromDB()
        {
            WordDaoImpl dao  = new WordDaoImpl();

               WordList = dao.getAllWords();
               foreach (Word word in WordList)
               {
               WDictionary.Add(word);
               WordsNameOnlyList.Add((word.Name));
               }

               UnMasteredWordList = dao.getAllUnmasteredWords();
        }
Esempio n. 9
0
 public void markWordAsMastered(Word currentWord)
 {
     WordDaoImpl dao = new WordDaoImpl();
     dao.updateNote(currentWord);
     UnMasteredWordList.Remove(currentWord);
 }