Esempio n. 1
0
        async void Votar(object sender, EventArgs args)
        {
            adVideo.ShowAdVideo("ca-app-pub-6499029686626513/3014389692");
            var valores = new Criterios
            {
                player1     = Player1.Text,
                player2     = Player2.Text,
                sitio       = Sitio.Text,
                sumaTotalP1 = Convert.ToInt32(TotalFinal.Text),
                sumaTotalP2 = Convert.ToInt32(TotalFinalP2.Text),
                //  respuestasP1 = Convert.ToInt32(RespuestaP1.Text),
                //  respuestasP2 = Convert.ToInt32(RespuestaP2.Text),
                suma             = Convert.ToInt32(SumaEasy.Text),
                sumaP2           = Convert.ToInt32(SumaEasyP2.Text),
                sumaHardModeP1   = Convert.ToInt32(HardMode.Text),
                sumaHardModep2   = Convert.ToInt32(HardModeP2.Text),
                sumaTematicaP1   = Convert.ToInt32(TematicaP1.Text),
                sumaTematicaP2   = Convert.ToInt32(TematicaP2.Text),
                sumaPersonajesP1 = Convert.ToInt32(PersonajesP1.Text),
                sumaPersonajesP2 = Convert.ToInt32(PersonajesP2.Text),
                sumaSangreP1     = Convert.ToInt32(SangreP1.Text),
                sumaSangreP2     = Convert.ToInt32(SangreP2.Text),
                sumaDeluxeP1     = Convert.ToInt32(DeluxeP1.Text),
                sumaDeluxeP2     = Convert.ToInt32(DeluxeP2.Text)
            };

            var replica4x = new Replica4x();

            replica4x.BindingContext = valores;
            await Navigation.PushAsync(replica4x);
        }
Esempio n. 2
0
        async void GuardarHardMode(object sender, EventArgs e)
        {
            var valores = new Criterios
            {
                player1        = Player1.Text,
                player2        = Player2.Text,
                sitio          = Sitio.Text,
                sumaTotalP1    = Convert.ToInt32(SumaEasy.Text) + sumaHard,
                sumaTotalP2    = Convert.ToInt32(SumaEasyP2.Text) + sumaHardP2,
                suma           = Convert.ToInt32(SumaEasy.Text),
                sumaP2         = Convert.ToInt32(SumaEasyP2.Text),
                sumaHardModeP1 = sumaHard,
                sumaHardModep2 = sumaHardP2
            };

            valores.lstCalificacionesP2.Add(sumaHardP2);
            var Tematicas = new FMSPuntuacion.Vistas.Tematica();

            Tematicas.BindingContext = valores;
            if (sumaHard == 0 || sumaHardP2 == 0)
            {
                await Application.Current.MainPage.DisplayAlert("Alerta", "Verifica que ambos jugadores tenga calificación en total", "OK");
            }
            else
            {
                await Navigation.PushAsync(Tematicas);
            }
        }
Esempio n. 3
0
        async void GuardarEsayMode(object sender, EventArgs e)
        {
            var valores = new Criterios
            {
                player1 = Player1.Text,
                player2 = Player2.Text,
                sitio   = Sitio.Text,
                suma    = suma,
                sumaP2  = sumaP2
            };

            valores.lstCalificacionesP2.Add(suma);
            var hardMode = new HardMode();

            hardMode.BindingContext = valores;

            if (suma == 0 || sumaP2 == 0)
            {
                await Application.Current.MainPage.DisplayAlert("Alerta", "Verifica que ambos jugadores tenga calificación en total", "OK");
            }//else
            else if (valores.player1 == null || valores.player2 == null)
            {
                await Application.Current.MainPage.DisplayAlert("Alerta", "Verifica que ambos jugadores tenga Nombre", "OK");
            }
            else
            {
                await Navigation.PushAsync(hardMode);
            }
            //await Navigation.PushAsync(new HardMode(suma, sumaP2));
        }
Esempio n. 4
0
        async void GuardarEsayMode(object sender, EventArgs e)
        {
            var valores = new Criterios
            {
                //player1 = Player1.Text,
                // player2 = Player2.Text,
                suma   = suma,
                sumaP2 = sumaP2
            };
            var hardMode = new HardMode();

            hardMode.BindingContext = valores;

            /* if (suma == 0 || sumaP2 == 0)
             * {
             *   Application.Current.MainPage.DisplayAlert("Mensaje de Error", "Verifica que ambos jugadores tenga calificación", "OK");
             * }else */
            if (valores.player1 == null || valores.player2 == null)
            {
                await Application.Current.MainPage.DisplayAlert("Mensaje de Error", "Verifica que ambos jugadores tenga Nombre", "OK");
            }
            else
            {
                await Navigation.PushAsync(hardMode);
            }
            //await Navigation.PushAsync(new HardMode(suma, sumaP2));
        }
Esempio n. 5
0
        async void GuardarPersonajes(object sender, EventArgs e)
        {
            var valores = new Criterios
            {
                player1          = Player1.Text,
                player2          = Player2.Text,
                sitio            = Sitio.Text,
                sumaTotalP1      = Convert.ToInt32(SumaTematica.Text) + sumaPersonajes + respuestaP1,
                sumaTotalP2      = Convert.ToInt32(SumaTematicaP2.Text) + sumaPersonajesP2 + respuestaP2,
                suma             = Convert.ToInt32(SumaEasy.Text),
                sumaP2           = Convert.ToInt32(SumaEasyP2.Text),
                sumaHardModeP1   = Convert.ToInt32(HardMode.Text),
                sumaHardModep2   = Convert.ToInt32(HardModeP2.Text),
                sumaTematicaP1   = Convert.ToInt32(TematicaP1.Text),
                sumaTematicaP2   = Convert.ToInt32(TematicaP2.Text),
                sumaPersonajesP1 = sumaPersonajes + respuestaP1,
                sumaPersonajesP2 = sumaPersonajesP2 + respuestaP2
            };

            valores.lstCalificacionesP2.Add(sumaPersonajesP2);
            var Sangre = new Sangre();

            Sangre.BindingContext = valores;
            if (sumaPersonajes == 0 || sumaPersonajesP2 == 0)
            {
                await Application.Current.MainPage.DisplayAlert("Alerta", "Verifica que ambos jugadores tenga calificación en total", "OK");
            }
            else
            {
                await Navigation.PushAsync(Sangre);
            }
        }
Esempio n. 6
0
        public async Task <ActionResult <Criterios> > PostCriterios(Criterios criterios)
        {
            _context.Criterios.Add(criterios);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetCriterios", new { id = criterios.idCriterio }, criterios));
        }
Esempio n. 7
0
        public async Task <IActionResult> PutCriterios(int id, Criterios criterios)
        {
            if (id != criterios.idCriterio)
            {
                return(BadRequest());
            }

            _context.Entry(criterios).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!CriteriosExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Esempio n. 8
0
        async void GuardarDeluxe(object sender, EventArgs e)
        {
            var valores = new Criterios
            {
                player1          = Player1.Text,
                player2          = Player2.Text,
                sitio            = Sitio.Text,
                sumaTotalP1      = Convert.ToInt32(SumaSangre.Text) + suma,
                sumaTotalP2      = Convert.ToInt32(SumaSangreP2.Text) + sumaP2,
                sumaDeluxeP1     = suma,
                sumaDeluxeP2     = sumaP2,
                respuestasP1     = Convert.ToInt32(RespuestaP1.Text),
                respuestasP2     = Convert.ToInt32(RespuestaP2.Text),
                suma             = Convert.ToInt32(SumaEasy.Text),
                sumaP2           = Convert.ToInt32(SumaEasyP2.Text),
                sumaHardModeP1   = Convert.ToInt32(HardMode.Text),
                sumaHardModep2   = Convert.ToInt32(HardModeP2.Text),
                sumaTematicaP1   = Convert.ToInt32(TematicaP1.Text),
                sumaTematicaP2   = Convert.ToInt32(TematicaP2.Text),
                sumaPersonajesP1 = Convert.ToInt32(PersonajesP1.Text),
                sumaPersonajesP2 = Convert.ToInt32(PersonajesP2.Text),
                sumaSangreP1     = Convert.ToInt32(SangreP1.Text),
                sumaSangreP2     = Convert.ToInt32(SangreP2.Text)
            };

            if ((valores.sumaTotalP1 - valores.sumaTotalP2) >= 5)
            {
                valores.ganador = Player1.Text;
                valores.replica = false;
            }
            else if ((valores.sumaTotalP2 - valores.sumaTotalP1) >= 5)
            {
                valores.ganador = Player2.Text;
                valores.replica = false;
            }
            else
            {
                valores.ganador = "Réplica, Diferencia de " + Math.Abs(valores.sumaTotalP1 - valores.sumaTotalP2) + " Puntos";
                valores.replica = true;
            }

            valores.lstCalificacionesP2.Add(sumaP2);
            var Resultado = new FMSPuntuacion.Vistas.Resultado();

            Resultado.BindingContext = valores;
            if (suma == 0 || sumaP2 == 0)
            {
                await Application.Current.MainPage.DisplayAlert("Alerta", "Verifica que ambos jugadores tenga calificación en total", "OK");
            }
            else
            {
                await Navigation.PushAsync(Resultado);
            }
        }
        async void IniciarPatrones(object sender, EventArgs args)
        {
            var valores = new Criterios
            {
                player1 = Player1.Text,
                player2 = Player2.Text,
            };
            var Patrones = new CuatroX4();

            Patrones.BindingContext = valores;
            if (valores.player1 == null || valores.player2 == null)
            {
                await Application.Current.MainPage.DisplayAlert("Alerta", "Verifica que ambos jugadores tenga Nombre", "OK");
            }
            else
            {
                await Navigation.PushAsync(Patrones);
            }
        }
Esempio n. 10
0
        async void IniciarFMS(object sender, EventArgs args)
        {
            var valores = new Criterios
            {
                player1 = Player1.Text,
                player2 = Player2.Text,
                sitio   = Sitio.Text
            };
            var FormatoFMS = new EligeTemporada();

            FormatoFMS.BindingContext = valores;
            if (valores.player1 == null || valores.player2 == null)
            {
                await Application.Current.MainPage.DisplayAlert("Alerta", "Verifica que ambos jugadores tenga Nombre", "OK");
            }
            else
            {
                await Navigation.PushAsync(FormatoFMS);
            }
        }