Beispiel #1
0
 /*
  * private void tsm(void)
  * {
  *    env.OnIterationEnd+=new Swarm_Logic.Environment.VoidFunction(env_OnIterationEnd);
  * }
  * /*/
 private void Run_Click(object sender, EventArgs e)
 {
     pictureBox1.Refresh();
     env.Run(1);
     drawAgents();
     drawSource();
     drawBarr();
 }
Beispiel #2
0
 private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
 {
     try
     {
         if (int.Parse(textBox1.Text) < 1)
         {
             throw new Exception("Iteration must be > 0");
         }
         env.Run(int.Parse(textBox1.Text));
     }
     catch (Exception exp)
     {
         MessageBox.Show(exp.Message);
     }
 }