Ejemplo n.º 1
0
        public RectDrawer()
            : base(800, 400, false, false)
        {
            myRND = new MyRandom(ScaledWidth / 5);
            BBColour = Color.White;

            for (int i = 0; i < 100; i++)
            {
                Rectangle tRect = myRND.NextDrawerRect(this);
                AddRectangle(tRect.X, tRect.Y, tRect.Width, tRect.Height, RandColor.GetKnownColor());
            }

            //   List<Rectangle> lRect = new List<Rectangle>();

            //     for (int i = 0; i < 100; i++)
            //         lRect.Add(myRND.NextDrawerRect(this));

            //   foreach (Rectangle rect in lRect)
            //       AddRectangle(rect.X, rect.Y, rect.Width, rect.Height, RandColor.GetKnownColor());

            Render();
        }
Ejemplo n.º 2
0
        public Form1()
        {
            InitializeComponent();

            rnd = new MyRandom(1);
        }