private void AddBallBtn_Click(object sender, EventArgs e) { BouncingBall ball = new BouncingBall(this.ClientSize.Width, this.ClientSize.Height); bouncingBalls.Add(ball); this.Paint += new PaintEventHandler(ball.PaintBall); }
static void Main(string[] args) { // BouncingBall ball = new BouncingBall(); double result = BouncingBall.bouncingBall(3.00, 0.66, 1.50); Console.WriteLine("Mother has seen the ball " + result + " times."); // Close the console window Console.ReadKey(); }
static void Main() { using (var game = new BouncingBall()) game.Run(); }
static void Main(string[] args) { BouncingBall.bouncingBall(3.0, 0.66, 1.5); BouncingBall.bouncingBall(30.0, 0.66, 1.5); }