Пример #1
0
        public DatabaseViewModel()
        {
            LoadData();
            LoadAllFrageStatus();

            Pruefungen.SelectMany(x => x.Fragen).ToList().ForEach(x => x.PropertyChanged += Frage_PropertyChanged);
        }
Пример #2
0
        private void LoadAllFrageStatus()
        {
            saveDatabase.CreateTable <SaveDataViewModel>();

            List <SaveDataViewModel> saveData = saveDatabase.Table <SaveDataViewModel>().ToList();

            foreach (SaveDataViewModel save in saveData)
            {
                Pruefungen.SelectMany(x => x.Fragen).ToList().FirstOrDefault(x => x.Id == save.Id).Status = save.Status;
            }
        }
Пример #3
0
 public void ResetAllData()
 {
     saveDatabase.DeleteAll <SaveDataViewModel>();
     Pruefungen.SelectMany(x => x.Fragen).ToList().ForEach(x => { x.Status = FrageStatus.Unbearbeitet; x.Antworten.ToList().ForEach(y => y.Status = AntwortStatus.NotSelected); });
 }