private void addword(object sender, RoutedEventArgs e) { if(AddWordDisplay.Text.Length==0)return ; userwords newone = new userwords(AddWordDisplay.Text, AddPsDisplay.Text, AddSpeechDisplay.Text, AddExplainDisplay.Text); words.add(newone); words.savemyfile(); }
public void add(userwords addone) { int i; for( i=0;i<wordslist.Count();) { if(addone.word.CompareTo(wordslist[i].word)>0)i++; else break; } if(i<wordslist.Count())wordslist.Insert(i,addone); else wordslist.Add(addone); }
private void savechange(object sender, RoutedEventArgs e) { if (UserWordBox.SelectedItems.Count < 1) return; userwords edit = new userwords(WordDisplay.Text, PsDisplay.Text, SpeechDisplay.Text, ExplainDisplay.Text); wordlist.edit(UserWordBox.SelectedIndex,edit); wordlist.savemyfile(); }
public void edit(int Index,userwords editone) { wordslist[Index]=editone; }
public void edit(int Index,userwords editone) { autocompletelist[Index] = editone; }
public void add(userwords addone) { autocompletelist.Add(addone); }