public void LoadSpeciesTest1() { // Test with existing XML file _lifeApplication.CreateSpecies("Dog", 15, 4, Digestion.Carnivore, 20, 60, 10, 100, 0, 95, 20); _lifeApplication.SaveSpecies(XMLPath); _lifeApplication.LoadSpecies(XMLPath); var s = _lifeApplication.GetSpecies().Count; Assert.AreEqual(s, 1); }
private void startSimulatieToolStripMenuItem_Click(object sender, System.EventArgs e) { SettingsForm sf = new SettingsForm(); sf.ShowDialog(); if (sf.DialogResult == DialogResult.OK) { // TODO INITEN MET GOEDE WAARDEN ILifeSimulation simulation = new LifeSimulation.LifeSimulation(LifeApplication.Layouts[0], sf.nElements, LifeApplication.GetSpecies(), sf.plants, sf.carnivores, sf.herbivores, sf.omnivores, sf.nonivores, sf.obstacles, 100); // Toevoegen aan mainForm LifeApplication.AddSimulation(simulation); // Nieuw formulier maken en simulation meesturen. SimulationForm simForm = new SimulationForm(simulation); simForm.MdiParent = this; simForm.Show(); } }
private void startSimulatieToolStripMenuItem_Click(object sender, System.EventArgs e) { SettingsForm sf = new SettingsForm(); sf.ShowDialog(); if (sf.DialogResult == DialogResult.OK) { ILifeSimulation simulation = new LifeSimulation.LifeSimulation(LifeApplication.Layouts[0], sf.nElements, LifeApplication.GetSpecies(), sf.plants, sf.carnivores, sf.herbivores, sf.omnivores, sf.nonivores, sf.obstacles, 100); LifeApplication.AddSimulation(simulation); SimulationForm simForm = new SimulationForm(simulation); simForm.MdiParent = this; simForm.Show(); } }