public World(FlyingObj obj, decimal dt, Chart chart) { T = 0; Obj = obj; _dt = dt; _chart = chart; _chart.Series[0].Points.Clear(); }
private void button1_Click(object sender, EventArgs e) { if (!timer1.Enabled) { button2.Enabled = true; chart1.Series[0].Points.Clear(); timer1.Start(); var y0 = HeightButton.Value; var a = AngleButton.Value; var v0 = SpeedButton.Value; flobj = new FlyingObj(y0, a, v0); world = new World(flobj, 0.01M, chart1); } }