Example #1
0
 public void SaveOriginalWordDescription()
 {
     if (SelectedOriginalWord != null)
     {
         Description description;
         if (tradicIterator.GetDescriptions().ToList().Exists(d => d.WordId == SelectedOriginalWord.Id))
         {
             description      = tradicIterator.GetDescriptions().First(d => d.WordId == SelectedOriginalWord.Id);
             description.Text = OriginalWordDescription;
             tradicIterator.ChangeEntity(description);
             Descriptions.First(d => d.WordId == SelectedOriginalWord.Id).Text = OriginalWordDescription;
         }
         else
         {
             description = new Description {
                 WordId = SelectedOriginalWord.Id, Text = OriginalWordDescription
             };
             tradicIterator.AddEntity(description);
             Descriptions.Add(tradicIterator.GetDescriptions().Last());
         }
     }
     else
     {
         MessageBox.Show("You must choose original word", "Choose warning", MessageBoxButton.OK, MessageBoxImage.Warning);
     }
 }
Example #2
0
 private void SaveChangedWord()
 {
     entitiesIterator.ChangeEntity(examinationalWord);
 }