Пример #1
0
 private void Update(ITest test)
 {
     test.Calculate();
     _vm.OnPropertyChanged(nameof(MainWindowVM.SelectedPerson));
     RefreshDataGrid();
     _m.Save(_vm.Persons.ToList());
     MessageBox.Show("Данные сохранены");
 }
Пример #2
0
 public bool Save()
 {
     Answers.ForEach(x => _test.Answers[x.Id - 1] = x.Text);
     try
     {
         _test.Calculate();
         return(true);
     }
     catch (Exception e)
     {
         MessageBox.Show("Одно из значений выходит за диапазон: " + _test.Story);
         return(false);
     }
 }