Пример #1
0
        private void Form2_Paint(object sender, PaintEventArgs e)
        {
            int a = 120;
            int b = 50;

            for (int x = a / 2; x < ClientRectangle.Width; x += a + 10)
            {
                for (int y = b / 2; y < ClientRectangle.Height; y += b)
                {
                    int    crvena = random.Next(256);
                    int    zelena = random.Next(256);
                    int    plava  = random.Next(256);
                    Color  boja   = Color.FromArgb(crvena, zelena, plava);
                    Mashna mashna = new Mashna();
                    mashna.Postavi(new Point(x, y), a, b, boja);
                    mashna.Crtaj(e.Graphics);
                }
            }
        }
Пример #2
0
 private void Form3_Paint(object sender, PaintEventArgs e)
 {
     m1.Crtaj(e.Graphics);
     m2.Crtaj(e.Graphics);
     m3.Crtaj(e.Graphics);
 }
Пример #3
0
 private void Form1_Paint(object sender, PaintEventArgs e)
 {
     mashna.Crtaj(e.Graphics);
 }