using OOPLS;
using System.Drawing;
using System.Windows.Forms;

namespace BouncingBallClient
{
    public partial class BouncingBallForm : Form
    {
        BouncingBall ball;
        partial void onLoad()
        {
            ball = new BouncingBall();
            ball.BallColor = Color.Green;
            ball.Rect = ClientRectangle;
            timer1.Interval = 30;
            timer1.Start();
        }
        partial void onResize()
        {
            ball.Rect = ClientRectangle;
        }

        partial void onPaint(Graphics g)
        {
            ball.Draw(g);
        }
        partial void onTick()
        {
            ball.Cycle(timer1.Interval);
            Refresh();
        }
    }
}
