Example #1
0
 public Form1()
 {
     InitializeComponent();
     topcinja = new BallDoc();
     timer1.Start();
     this.DoubleBuffered = true;
     r = new Random();
     for (int i = 0; i < 4; i++)
     {
         int       x         = r.Next(2 * BlackBall.Radius, this.Width - 2 * BlackBall.Radius);
         int       y         = r.Next(2 * BlackBall.Radius, this.Height - 2 * BlackBall.Radius);
         Point     center    = new Point(x, y);
         BlackBall blackBall = new BlackBall(center);
         topcinja.AddBlackBall(blackBall);
     }
 }
Example #2
0
 public void AddBlackBall(BlackBall b)
 {
     blackBalls.Add(b);
 }