Exemplo n.º 1
0
 /// <summary>
 /// Adds a new vocabulary
 /// </summary>
 private void button3_Click(object sender, EventArgs e)
 {
     AddVocabulary form = new AddVocabulary();
     if (form.ShowDialog() == DialogResult.OK)
     {
         Data.vocabulary.Add(form.vocabulary);
     }
     UpdateVocabulary();
 }
Exemplo n.º 2
0
 /// <summary>
 /// Edits the selected vocabulary
 /// </summary>
 private void button_voc_edit_Click(object sender, EventArgs e)
 {
     Vocabulary vocab = getSelectedVocabulary();
     if (vocab != null)
     {
         AddVocabulary form = new AddVocabulary(vocab);
         if (form.ShowDialog() == DialogResult.OK)
         {
             Data.vocabulary.Remove(vocab);
             Data.vocabulary.Add(form.vocabulary);
         }
         UpdateVocabulary();
     }
 }