Exemple #1
0
 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();
 }
Exemple #2
0
 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);
 }
Exemple #3
0
 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();
 }
Exemple #4
0
 public void edit(int Index,userwords editone)
 {
     wordslist[Index]=editone;
 }
Exemple #5
0
 public void edit(int Index,userwords editone)
 {
     autocompletelist[Index] = editone;
 }
Exemple #6
0
 public void add(userwords addone)
 {
     autocompletelist.Add(addone);
 }