Ejemplo n.º 1
0
        private async void ItemSelected(object sender, SelectedItemChangedEventArgs e)
        {
            var selectedExercise        = listExerciseOverview.SelectedItem;
            var exercise                = (Exercise)selectedExercise;
            var exerciseDescriptionPage = new ExerciseDescription(exercise);

            await Navigation.PushAsync(exerciseDescriptionPage);

            //Dette er nødvendigt for at skjule selected baggrundsfarve.
            //this.listExerciseOverview.selec.Clear();
        }
Ejemplo n.º 2
0
        //async private void ExerciseSelected(object sender, SelectedItemChangedEventArgs e)
        //{
        //    var selectedExercise = listExerciseOverview.SelectedItem;
        //    var exercise = (Exercise)selectedExercise;
        //    var exerciseDescriptionPage = new ExerciseDescription(exercise, true);

        //    await Navigation.PushAsync(exerciseDescriptionPage);
        //}
        private async void goToTrainingExercise(Exercise exercise = null)
        {
            var startable = false;

            if (selectedSession.UserStartDate < DateTime.Now && selectedSession.UserEndDate > DateTime.Now && selectedTraining != null)
            {
                var training = selectedTraining.TrainingExercises.Find(i => i.ExerciseID == exercise.ApiExerciseID);
                if (training == null)
                {
                    startable = true;
                }
            }
            var exerciseDescriptionPage = new ExerciseDescription(exercise, selectedTraining, startable);
            await Navigation.PushAsync(exerciseDescriptionPage);
        }