internal void AddTimerSet() { TimerSets.Add(new TimerSet() { Timers = new List <AtomicTimer>() { new AtomicTimer() { Duration = new TimeSpan(0, 0, 1) } } }); var currentTimers = TimerSets.ToList <TimerSet>(); AppCore.CurrentWorkout.Timers = currentTimers; var blub = AppCore.Workouts.Where(wo => wo.Id == this.WorkoutId).First(); blub = AppCore.CurrentWorkout; SaveTimerSets(); //{ // SetId = Guid.NewGuid().ToString(), // Name = "neues Set", // Repetitions = 1, // Timers = new List<AtomicTimer>() // { // new AtomicTimer(){Name = "Timer",Repetitions = 1, Duration = new TimeSpan(0,0,1)} // } //}); //throw new NotImplementedException(); }
public void SaveTimerSets() { var currentTimers = TimerSets.ToList <TimerSet>(); AppCore.CurrentWorkout.Timers = currentTimers; var blub = AppCore.Workouts.Where(wo => wo.Id == this.WorkoutId).First(); blub = AppCore.CurrentWorkout; var dbMgr = new DatabaseManager(); dbMgr.SaveWorkouts(AppCore.Workouts); }