Ejemplo n.º 1
0
 public void AddForm(PokemonFormData form)
 {
     if (forms == null)
     {
         forms = new Dictionary <byte, PokemonFormData>();
     }
     forms.Add(form.ID, form);
 }
Ejemplo n.º 2
0
        private static void LoadForms(SQLiteConnection connection)
        {
            SQLiteCommand command;
            SQLiteDataReader reader;
            DataTable table;

            // Load Unown Forms
            command = new SQLiteCommand("SELECT * FROM UnownForms", connection);
            reader = command.ExecuteReader();
            table = new DataTable("UnownForms");
            table.Load(reader);
            foreach (DataRow row in table.Rows) {
                PokemonFormData pokemonForm = new PokemonFormData(row);
                gen3PokemonDexMap[201].AddForm(pokemonForm);
            }

            // Load Deoxys Forms
            command = new SQLiteCommand("SELECT * FROM DeoxysForms", connection);
            reader = command.ExecuteReader();
            table = new DataTable("DeoxysForms");
            table.Load(reader);
            foreach (DataRow row in table.Rows) {
                PokemonFormData pokemonForm = new PokemonFormData(row);
                gen3PokemonDexMap[386].AddForm(pokemonForm);
            }
        }