public void setUI(Word word) { _word = word; tbkWord.Text = word.Name; tbkMeaning.Text = word.Meaning; tbkSentence.Text = word.Sentence; }
public void setPropertyOnPanel(WordPanel wpanel,Word word) { wpanel.setUI(word); wpanel.BorderBrush = wordPanel1.BorderBrush; wpanel.BorderThickness = wordPanel1.BorderThickness; wpanel.Width = 300; }
public void initializeBackend(List<Word> wordList,Word word_) { isSynonymPopulated = false; WordList = wordList; CurrentWord = word_; myIterator = new WordListIterator(WordList); }
public void setText(Word word_) { CurrentWord = word_; tblkWord.Text = CurrentWord.Name; tbMeaning.Text = CurrentWord.Meaning; populateSynonyms(); }
public void init(Word word, List<Word> wordList) { CurrentWord = word; UnMasteredWord = wordList; wordTab1.initializeBackend(UnMasteredWord,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 initializeUI(Word word) { Word = word.Name; Homophones hp = new Homophones(); try { List<Word> stringList = hp.getHomonymsWords(Word); } catch(Exception e) { } xdgHomoPhones.ItemsSource = hp.getHomonymsForWord("accessory"); }
public void setWord(Word word) { WordPanel wordPanel = new WordPanel(); if (stkWordDefinition.Children.Count == 1) { setPropertyOnPanel(wordPanel,word); stkWordDefinition.Children.Add(wordPanel); } else { stkWordDefinition.Children.RemoveRange(1, stkWordDefinition.Children.Count); setPropertyOnPanel(wordPanel, word); stkWordDefinition.Children.Add(wordPanel); } }
public WordIterator() { InitializeComponent(); tblSentence.Text = ""; currentWord = new Word(); }
private void setText(Word word) { txtWord.Text = word.Name; txtMeaning.Text = word.Meaning; txtNote.Text = word.AdditionalInfo; tblSentence.Text = word.Sentence; }
private Word getText() { Word editedWord = new Word(); editedWord.Name = txtWord.Text.ToString(); editedWord.Meaning = txtMeaning.Text.ToString(); editedWord.AdditionalInfo = txtNote.Text; return editedWord; }
private void chkBxIsMastered_Checked(object sender, RoutedEventArgs e) { currentWord = getText(); wordDictionary.markWordAsMastered(currentWord); btnForward_Click(sender,e); }
private void changeAvailableWords() { Word editedWord = new Word(); editedWord = getText(); wordDictionary.checkNAdd(editedWord); }
public void Show(Word word) { currentWord = word; this.Show(); }
public void markWordAsMastered(Word currentWord) { WordDaoImpl dao = new WordDaoImpl(); dao.updateNote(currentWord); UnMasteredWordList.Remove(currentWord); }
public static Word text2Word(String text2word) { Word word = new Word(); string copy = text2word; int firstCommaIndex = copy.IndexOf(","); string word2 = null; string meaning = null; string additionalMeaning = null; try { word2 = copy.Substring(0, firstCommaIndex); string wordMeaningPlusAdditionalInfo = copy.Substring(firstCommaIndex + 1); int additionalInfoIndex = wordMeaningPlusAdditionalInfo.IndexOf("@#"); if (additionalInfoIndex != -1) { meaning = copy.Substring(firstCommaIndex + 1, additionalInfoIndex); additionalMeaning = wordMeaningPlusAdditionalInfo.Substring(additionalInfoIndex + 2); additionalMeaning = additionalMeaning.Replace("\n",""); additionalMeaning = additionalMeaning.Replace("\r", ""); } else { meaning = copy.Substring(firstCommaIndex + 1); additionalMeaning = null; } } catch (Exception e) { } if (word2 != null) { word.Name = word2; word.Meaning = meaning; word.AdditionalInfo = additionalMeaning; } return word; }
public void Add(Word word) { meaningList.Add(word.Meaning); }