void Imagenes1_Loaded(object sender, RoutedEventArgs e) { re = new Recursos(); re.reporducirSonido("/Sonidos/Voces/PintarGatoPelota.mp3"); dragTranslation = new CompositeTransform(); }
void ImagenesLetraE_Loaded(object sender, RoutedEventArgs e) { recurso = new Recursos(); timer = new DispatcherTimer(); timer.Interval = TimeSpan.FromMilliseconds(1500); timer.Tick += timer_Tick; timer.Start(); }
void LetraE_Loaded(object sender, RoutedEventArgs e) { recurso = new Recursos(); recurso.reporducirSonido("/Sonidos/Voces/LetraE.mp3"); timer = new DispatcherTimer(); timer.Interval = TimeSpan.FromMilliseconds(4000); timer.Tick += timer_Tick; timer.Start(); }
private void alternativa2_Click_1(object sender, RoutedEventArgs e) { Recursos recurso = new Recursos(); recurso.reporducirSonido("Sonidos/luciernaga.mp3"); if (correcto.Opacity == 1.0) correcto.Opacity = 0; SBIncorrecto.Begin(); timer.Start(); }
private void alternativa1_Click_1(object sender, RoutedEventArgs e) { Recursos recurso = new Recursos(); recurso.reporducirSonido("Sonidos/obeja.mp3"); if(incorrecto.Opacity != 100) //incorrecto.Opacity = 100; StoryboardIncorrecto.Begin(); timer.Start(); }
private void Ellipse_ManipulationCompleted_1(object sender, System.Windows.Input.ManipulationCompletedEventArgs e) { Recursos re = new Recursos(); //fondoPescado.Source = new BitmapImage(new Uri("imagenes/coloresPintados/fish3_color.png", UriKind.Relative)); Ellipse elipse = sender as Ellipse; if (elipse.Name == "rana" && validarRana(elipse,e)&&!pintoRana) { ranaDibujo.Source = new BitmapImage(new Uri("../../imagenes/coloresPintados/frog1_color.png", UriKind.Relative)); pintoRana=true; if (pintoLago && pintoPlantas) { Botones.Begin(); Botones.Completed += Botones_Completed; } else { re.Correcto(); } } else if (elipse.Name == "aguaLago" && validarAgua(elipse, e)&&!pintoLago) { lago.Source = new BitmapImage(new Uri("../../imagenes/coloresPintados/frog3_color.png", UriKind.Relative)); pintoLago=true; if (pintoPlantas && pintoRana) { Botones.Begin(); Botones.Completed += Botones_Completed; } else { re.Correcto(); } } else if (elipse.Name == "hojasLago" && validarHojas(elipse, e)&&!pintoPlantas) { hojas.Source = new BitmapImage(new Uri("../../imagenes/coloresPintados/frog2_color.png", UriKind.Relative)); pintoPlantas = true; if (pintoRana && pintoLago) { Botones.Begin(); Botones.Completed += Botones_Completed; } else { re.Correcto(); } } else { //Cuando existe error re.Error(); } elipse.RenderTransform = null; }
private void Ellipse_ManipulationCompleted_1(object sender, System.Windows.Input.ManipulationCompletedEventArgs e) { Recursos re = new Recursos(); //fondoPescado.Source = new BitmapImage(new Uri("imagenes/coloresPintados/fish3_color.png", UriKind.Relative)); Ellipse elipse = sender as Ellipse; if (elipse.Name == "rana" && validarRana(elipse, e) && !pintoRana) { ranaDibujo.Source = new BitmapImage(new Uri("../../imagenes/coloresPintados/frog1_color.png", UriKind.Relative)); pintoRana = true; if (pintoLago && pintoPlantas) { Botones.Begin(); Botones.Completed += Botones_Completed; } else { re.Correcto(); } } else if (elipse.Name == "aguaLago" && validarAgua(elipse, e) && !pintoLago) { lago.Source = new BitmapImage(new Uri("../../imagenes/coloresPintados/frog3_color.png", UriKind.Relative)); pintoLago = true; if (pintoPlantas && pintoRana) { Botones.Begin(); Botones.Completed += Botones_Completed; } else { re.Correcto(); } } else if (elipse.Name == "hojasLago" && validarHojas(elipse, e) && !pintoPlantas) { hojas.Source = new BitmapImage(new Uri("../../imagenes/coloresPintados/frog2_color.png", UriKind.Relative)); pintoPlantas = true; if (pintoRana && pintoLago) { Botones.Begin(); Botones.Completed += Botones_Completed; } else { re.Correcto(); } } else { //Cuando existe error re.Error(); } elipse.RenderTransform = null; }
private void Ellipse_ManipulationCompleted_1(object sender, System.Windows.Input.ManipulationCompletedEventArgs e) { Recursos re = new Recursos(); Ellipse elipse = sender as Ellipse; if (elipse.Name == "burbujas" && validarBurbujas(elipse, e) && !pintoBurbujas) { burbujasPescado.Source = new BitmapImage(new Uri("../../imagenes/coloresPintados/fish1_color.png", UriKind.Relative)); pintoBurbujas = true; if (pintoPes && pintoAgua) { Botones.Begin(); Botones.Completed += Botones_Completed; } else { re.Correcto(); } } else if (elipse.Name == "pez" && validarPez(elipse, e) && !pintoPes) { pescado.Source = new BitmapImage(new Uri("../../imagenes/coloresPintados/fish2_color.png", UriKind.Relative)); pintoPes = true; if (pintoAgua && pintoBurbujas) { Botones.Begin(); Botones.Completed += Botones_Completed; } else { re.Correcto(); } } else if (elipse.Name == "agua" && validarAgua(elipse, e) && !pintoAgua) { fondoPescado.Source = new BitmapImage(new Uri("../../imagenes/coloresPintados/fish3_color.png", UriKind.Relative)); pintoAgua = true; if (pintoPes && pintoBurbujas) { Botones.Begin(); Botones.Completed += Botones_Completed; } else { re.Correcto(); } } else { //cuando es error re.Error(); } elipse.RenderTransform = null; }
private void Ellipse_ManipulationCompleted_1(object sender, System.Windows.Input.ManipulationCompletedEventArgs e) { Recursos re = new Recursos(); Ellipse elipse = sender as Ellipse; if (elipse.Name == "burbujas" && validarBurbujas(elipse,e)&&!pintoBurbujas) { burbujasPescado.Source = new BitmapImage(new Uri("../../imagenes/coloresPintados/fish1_color.png", UriKind.Relative)); pintoBurbujas = true; if (pintoPes && pintoAgua) { Botones.Begin(); Botones.Completed += Botones_Completed; } else { re.Correcto(); } } else if (elipse.Name == "pez" && validarPez(elipse,e)&&!pintoPes) { pescado.Source = new BitmapImage(new Uri("../../imagenes/coloresPintados/fish2_color.png", UriKind.Relative)); pintoPes = true; if ( pintoAgua && pintoBurbujas) { Botones.Begin(); Botones.Completed += Botones_Completed; } else { re.Correcto(); } } else if (elipse.Name == "agua" && validarAgua(elipse, e)&&!pintoAgua) { fondoPescado.Source = new BitmapImage(new Uri("../../imagenes/coloresPintados/fish3_color.png", UriKind.Relative)); pintoAgua = true; if (pintoPes && pintoBurbujas) { Botones.Begin(); Botones.Completed += Botones_Completed; } else { re.Correcto(); } } else { //cuando es error re.Error(); } elipse.RenderTransform = null; }
// Constructor public MainPage() { InitializeComponent(); Storyboard1.Begin(); Recursos recurso = new Recursos(); recurso.reporducirSonido("/Sonidos/DescubreCaballo.mp3"); timer = new DispatcherTimer(); timer.Interval = TimeSpan.FromSeconds(1); timer.Tick += new EventHandler(timer_Tick); correcto.Opacity = 0; incorrecto.Opacity = 0; }
protected override void OnNavigatedTo(NavigationEventArgs e) { if (e.Uri.ToString() == "/../../Niveles.xaml") { NavigationService.RemoveBackEntry(); NavigationService.RemoveBackEntry(); } else if (e.Uri.ToString() == "/../Niveles.xaml") { NavigationService.RemoveBackEntry(); NavigationService.RemoveBackEntry(); } Recursos recurso = new Recursos(); recurso.pararSonido(); base.OnNavigatedTo(e); }
private void Ellipse_ManipulationCompleted_1(object sender, System.Windows.Input.ManipulationCompletedEventArgs e) { Recursos re = new Recursos(); //fondoPescado.Source = new BitmapImage(new Uri("imagenes/coloresPintados/fish3_color.png", UriKind.Relative)); Ellipse elipse = sender as Ellipse; if (elipse.Name == "colorPelota" && validacionPelota(elipse, e)&&!pintoPelota) { pelotaGato.Source = new BitmapImage(new Uri("../../imagenes/coloresPintados/cat2_color.png", UriKind.Relative)); pintoPelota = true; if (pintoGato == true) { Botones.Begin(); Botones.Completed += Botones_Completed; //re.TodoBien(); } else { re.Correcto(); } } else if (elipse.Name == "colorGato" && validacionGato(elipse, e)&&!pintoGato) { gato.Source = new BitmapImage(new Uri("../../imagenes/coloresPintados/cat1_color.png", UriKind.Relative)); pintoGato = true; if (pintoPelota == true) { //re.TodoBien(); Botones.Begin(); Botones.Completed += Botones_Completed; } else { re.Correcto(); } } else { //Cuando es error re.Error(); } elipse.RenderTransform = null; }
private void Ellipse_ManipulationCompleted_1(object sender, System.Windows.Input.ManipulationCompletedEventArgs e) { Recursos re = new Recursos(); //fondoPescado.Source = new BitmapImage(new Uri("imagenes/coloresPintados/fish3_color.png", UriKind.Relative)); Ellipse elipse = sender as Ellipse; if (elipse.Name == "colorPelota" && validacionPelota(elipse, e) && !pintoPelota) { pelotaGato.Source = new BitmapImage(new Uri("../../imagenes/coloresPintados/cat2_color.png", UriKind.Relative)); pintoPelota = true; if (pintoGato == true) { Botones.Begin(); Botones.Completed += Botones_Completed; //re.TodoBien(); } else { re.Correcto(); } } else if (elipse.Name == "colorGato" && validacionGato(elipse, e) && !pintoGato) { gato.Source = new BitmapImage(new Uri("../../imagenes/coloresPintados/cat1_color.png", UriKind.Relative)); pintoGato = true; if (pintoPelota == true) { //re.TodoBien(); Botones.Begin(); Botones.Completed += Botones_Completed; } else { re.Correcto(); } } else { //Cuando es error re.Error(); } elipse.RenderTransform = null; }
private void alternativa2_Click_1(object sender, RoutedEventArgs e) { Recursos recurso = new Recursos(); recurso.reporducirSonido("Sonidos/caballo.mp3"); StoryboardCorrecto.Begin(); timer.Start(); if (incorrecto.Opacity == 1.0) incorrecto.Opacity = 0; if (contador == 3) { correcto.Opacity = 100; } }
private void alternativa3_Click_1(object sender, RoutedEventArgs e) { Recursos recurso = new Recursos(); recurso.reporducirSonido("Sonidos/pato.mp3"); StoryboardIncorrecto.Begin(); if (incorrecto.Opacity != 100) incorrecto.Opacity = 100; timer.Start(); if (contador == 3 && incorrecto.Opacity == 100) { //timer.Stop(); //contador = 0; } }
private void playSound() { Recursos recurso = new Recursos(); recurso.reporducirSonido("Sonidos/perro.mp3"); // }