public void iscrtaj(Graphics g)
        {
            Random rnd = new Random();

            for (int i = 5; i <= this.Width - 30; i += 35)
            {
                for (int j = 0; j <= 150; j += 21)
                {
                    if (rnd.Next(10) < 6)
                    {
                        Color boja = Color.FromArgb(rnd.Next(255), rnd.Next(255), rnd.Next(255));
                        Brush b    = new SolidBrush(boja);

                        Rectangle r = new Rectangle(i, j, 30, 20);
                        Cigla     c = new Cigla(r, b);

                        cigli.lstCigli.Add(c);
                        pomosna.lstCigli.Add(c);
                    }
                }
            }
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: viktor11/VizuelnoSeminarska
        public void iscrtaj(Graphics g)
        {
            Random rnd = new Random();

            for (int i = 5; i <= this.Width-30; i += 35)
            {
                for (int j = 0; j <= 150; j += 21)
                {

                   if (rnd.Next(10) < 6)
                    {
                        Color boja = Color.FromArgb(rnd.Next(255), rnd.Next(255), rnd.Next(255));
                        Brush b = new SolidBrush(boja);

                        Rectangle r = new Rectangle(i, j, 30, 20);
                        Cigla c = new Cigla(r, b);

                        cigli.lstCigli.Add(c);
                        pomosna.lstCigli.Add(c);
                    }

                }
            }
        }
コード例 #3
0
 public void brisi(Cigla c)
 {
     lstCigli.Remove(c);
 }
コード例 #4
0
 public void brisi(Cigla c)
 {
     lstCigli.Remove(c);
 }