示例#1
0
 /// <summary>
 /// sets up the control. adding all rule controls to the datagridview 
 /// and changeing the size to accomodate the extra components
 /// </summary>
 /// <param name="boids"></param>
 public BoidControls(Boids_Factory boids)
 {
     InitializeComponent();
     this.boids = boids;
     nudFlockCount.Value = 1;
     int tmp = boids.getControls(flowLayoutPanel1);
     this.Height += 36 * tmp;
     flowLayoutPanel1.Height += 36 * tmp;
 }
示例#2
0
        /// <summary>
        /// create and add all the controls to the form.
        /// </summary>
        public BoidForm()
        {
            InitializeComponent();

            rand = new Random();
            g = CreateGraphics();
            map = new BasicMapView(panel1);

            boids = new Boids_Factory(rand,map,panel1.Width, panel1.Height);
            controls = new BoidControls(boids);
            this.Controls.Add(controls);
        }