private void buttonStartSimulation_Click(object sender, EventArgs e) { Series s1 = chart1.Series.First(); loaders = new ConcurrentQueue<bool>(); s1.Points.Clear(); SimZPA.Simulation sim = new SimZPA.Simulation(); timer1.Interval = 100; timer1.Start(); sim.start((int)numericUpDownStudents.Value, loaders, textBoxOutput); }