Example #1
0
 private void menuItemNewEnvironment_Click(object sender, EventArgs e)
 {
     if (EnvironmentGeneratorForm.ShowDialog() == DialogResult.OK)
     {
         var spaceDefinition = new SpaceTemplateGeneratorDefinition(EnvironmentGeneratorForm.Properties);
         Workspace.Spaces.Add(spaceDefinition);
         Add(spaceDefinition);
     }
 }
Example #2
0
        private void Add(SpaceTemplateGeneratorDefinition spaceDefinition)
        {
            var item = new ListViewItem(spaceDefinition.Name);

            item.SubItems.Add(spaceDefinition.GeneratorProperties.Width.ToString());
            item.SubItems.Add(spaceDefinition.GeneratorProperties.Height.ToString());
            item.SubItems.Add(spaceDefinition.GeneratorProperties.Seed.ToString());
            item.SubItems.Add(spaceDefinition.GeneratorProperties.NumberOfAgents.ToString());
            item.SubItems.Add(spaceDefinition.GeneratorProperties.NumberOfObstacles.ToString());
            item.Tag = spaceDefinition;
            listViewEnvironments.AddWithAutoResize(item);
        }