public static Task <WorkoutViewModel> CreateAsync(Workout workout, IWorkoutStore workoutStore, IPageService pageService) { _workoutStore = workoutStore; _pageService = pageService; var ret = new WorkoutViewModel(workout); return(ret.GetWorkoutObjects(workout)); }
public ModelExercisesViewModel(IWorkoutStore workoutStore, IPageService pageService) { _pageService = pageService; _workoutStore = workoutStore; RefreshDatabaseCommand = new Command(async() => await RefreshDatabase()); LoadDataCommand = new Command(async() => await LoadData()); ReloadDataCommand = new Command(async() => await ReloadData()); DropModelExercisesCommand = new Command(async() => await DropModelExercises()); SelectExerciseCommand = new Command <ModelExercise>(async(e) => await SelectExercise(e)); }
public WorkoutsOverviewViewModel(IWorkoutStore workoutStore, IPageService pageService) { _pageService = pageService; _workoutStore = workoutStore; LoadDataCommand = new Command(async() => await LoadData()); AddWorkoutCommand = new Command(async() => await AddWorkout()); EditWorkoutCommand = new Command(async() => await EditWorkout()); DeleteWorkoutCommand = new Command(async() => await DeleteWorkout()); SelectWorkoutCommand = new Command <Workout>(w => SelectWorkout(w)); }
public static async Task <ModelExerciseViewModel> CreateAsync(ModelExercise exercise, IWorkoutStore workoutStore) { _workoutStore = workoutStore; ModelExerciseViewModel exerciseViewModel = new ModelExerciseViewModel(exercise); exerciseViewModel.PrimaryMuscles = await GetMuscles("Primary"); exerciseViewModel.SecondaryMuscles = await GetMuscles("Secondary"); return(exerciseViewModel); }
public WorkoutController(IUserContext usercontext, IWorkoutStore workoutStore) { _userContext = usercontext; _workoutStore = workoutStore; }