Beispiel #1
0
        private void MenuItem_Click_1(object sender, RoutedEventArgs e)
        {
            OpenFileDialog opnRom = new OpenFileDialog();

            opnRom.Filter = "Rom Pokemon GBA|*.gba";
            try
            {
                if (opnRom.ShowDialog().GetValueOrDefault())
                {
                    rom = new RomGba(opnRom.FileName);
                    PonTexto();
                    btnPonerOQuitar.IsEnabled = true;
                    switch (EdicionPokemon.GetEdicionPokemon(rom).AbreviacionRom)
                    {
                    case AbreviacionCanon.BPE: imgDecoración.SetImage(Imagenes.PokeballEsmeralda); break;

                    case AbreviacionCanon.BPR: imgDecoración.SetImage(Imagenes.PokeballRojoFuego); break;

                    case AbreviacionCanon.BPG: imgDecoración.SetImage(Imagenes.PokeballVerdeHoja); break;

                    case AbreviacionCanon.AXV: imgDecoración.SetImage(Imagenes.PokeballRuby); break;

                    case AbreviacionCanon.AXP: imgDecoración.SetImage(Imagenes.PokeballZafiro); break;
                    }
                }
                else if (rom != null)
                {
                    MessageBox.Show("No se ha cambiado la rom", "Atención", MessageBoxButton.OK, MessageBoxImage.Exclamation);
                }
                else
                {
                    MessageBox.Show("No se ha cargado nada...");
                }
            }catch
            {
                btnPonerOQuitar.IsEnabled = false;
                rom = null;
                imgDecoración.SetImage(new Bitmap(1, 1));
                MessageBox.Show("La rom no es compatible", "Aun no es universal...");
            }
        }
Beispiel #2
0
 private void PonTexto()
 {
     if (PokemonGBAFrameWork.SistemaMTBW.EstaActivado(rom, EdicionPokemon.GetEdicionPokemon(rom), Compilacion.GetCompilacion(rom, EdicionPokemon.GetEdicionPokemon(rom))))
     {
         btnPonerOQuitar.Content = "Volver al sistema anterior";
     }
     else
     {
         btnPonerOQuitar.Content = "Poner Sistema MT BW!";
     }
 }