Beispiel #1
0
        public void addRandomSquare()
        {
            Random rnd = new Random();
            int    x   = rnd.Next(100, 1000);
            int    y   = rnd.Next(100, 600);

            SquareShape square = new SquareShape(new RectangleF(x, y, 50, 50));

            ShapeList.Add(square);
        }
Beispiel #2
0
        // added from me


        public void AddRandomSquare()
        {
            Random rnd = new Random();
            int    x   = rnd.Next(100, 1000);
            int    y   = rnd.Next(100, 600);

            SquareShape square = new SquareShape(new Rectangle(x, y, 200, 200));

            square.FillColor   = Color.Yellow;
            square.BorderColor = Color.Red;
            ShapeList.Add(square);
        }
        public void AddRandomSquare()
        {
            Random rnd = new Random();
            int    x   = rnd.Next(100, 1000);
            int    y   = rnd.Next(100, 600);

            SquareShape square = new SquareShape(new Rectangle(x, y, 100, 100));

            square.FillColor = Color.White;

            ShapeList.Add(square);
        }
Beispiel #4
0
 public SquareShape(SquareShape rectangle) : base(rectangle)
 {
 }