public void markWordAsMastered(Word currentWord) { WordDaoImpl dao = new WordDaoImpl(); dao.updateNote(currentWord); UnMasteredWordList.Remove(currentWord); }
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); } }
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); } }
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(); }
/// <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; }
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); }
/// <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); }