Esempio n. 1
0
 private async Task OnReadyGoToNew()
 {
     if (Checked == true)
     {
         UserNew();
     }
     else
     {
         await DialogExtensions.ShowDialog("ERROR", "Para continuar, Debes de aceptar los términos y Condiciones", "Aceptar");
     }
 }
Esempio n. 2
0
        private async Task OnReadyGoToNext()
        {
            if (Index < Total)
            {
                Index           = Index + 1;
                TipsImage       = TipsLoad[Index - 1].Image;
                TipsType        = TipsLoad[Index - 1].Type;
                TipsName        = TipsLoad[Index - 1].Name;
                TipsDescription = TipsLoad[Index - 1].Description;
            }
            else
            {
                await DialogExtensions.ShowDialog("Fin de los tips", "Haz finalizado la lista de los tips disponibles!!!", "Aceptar");

                await App.Navigation.PushAsync(new MainPage());
            }
        }
        private async Task OnReadyGoToNext()
        {
            if (Index < Total)
            {
                Index               = Index + 1;
                ExerciseImage       = ExerciseLoad[Index - 1].Image;
                ExerciseLevel       = ExerciseLoad[Index - 1].Type;
                ExerciseName        = ExerciseLoad[Index - 1].Exercise;
                ExerciseDescription = ExerciseLoad[Index - 1].Description;
            }
            else
            {
                await DialogExtensions.ShowDialog("Fin de los ejercicios", "Haz finalizado la lista de los ejercicios disponibles!!!", "Aceptar");

                await App.Navigation.PushAsync(new MainPage());
            }
        }
Esempio n. 4
0
        private async Task OnReady()
        {
            if (New)
            {
                var flag = true;
                if (string.IsNullOrEmpty(Info.Name))
                {
                    await DialogExtensions.ShowDialog("ERROR", "Para continuar, no olvides escribir tu nombre", "Aceptar");

                    flag = false;
                }
                if (Edad < 0)
                {
                    await DialogExtensions.ShowDialog("ERROR", "Para continuar, no olvides seleccionar tu edad", "Aceptar");

                    flag = false;
                }
                if (Sexo < 0)
                {
                    await DialogExtensions.ShowDialog("ERROR", "Para continuar, no olvides seleccionar el sexo", "Aceptar");

                    flag = false;
                }
                if (flag)
                {
                    Info.Age = AgeOptions[Edad];
                    Info.Sex = SexOptions[Sexo];
                    var json = JsonConvert.SerializeObject(Info);
                    DependencyService.Get <IFile>().SaveText("Info", json);
                    await App.Navigation.PushAsync(new Loading());
                }
            }
            else
            {
                await App.Navigation.PushAsync(new Loading());
            }
        }
Esempio n. 5
0
        private async Task OnReadyGoToNext()
        {
            if (CheckedOpt1 == true)
            {
                Info.Points = Info.Points + 2;
            }
            else if (CheckedOpt2 == true)
            {
                Info.Points = Info.Points + 1;
            }
            else if (CheckedOpt3 == true)
            {
                Info.Points = Info.Points + 0;
            }

            if (Index < Total)
            {
                Index               = Index + 1;
                ExerciseImage       = ExerciseLoad[Index - 1].Image;
                ExerciseLevel       = ExerciseLoad[Index - 1].Type;
                ExerciseName        = ExerciseLoad[Index - 1].Exercise;
                ExerciseDescription = ExerciseLoad[Index - 1].Description;
                CheckedOpt1         = false;
                CheckedOpt2         = false;
                CheckedOpt3         = false;
            }
            else
            {
                var json = JsonConvert.SerializeObject(Info);
                DependencyService.Get <IFile>().Delete("Info");
                DependencyService.Get <IFile>().SaveText("Info", json);
                await DialogExtensions.ShowDialog("Fin de los ejercicios", "Haz finalizado tu práctica de hoy. Felicidades!!!. Consulta tu puntuación la la sección -Progresos-", "Aceptar");

                await App.Navigation.PushAsync(new MainPage());
            }
        }