Exemplo n.º 1
0
 void resetCircles()
 {
     foreach (var item in groupBox1.Controls)
     {
         OvalPBox pb = (OvalPBox)item;
         pb.BackColor = Color.Black;
     }
 }
Exemplo n.º 2
0
 private void Form1_Load(object sender, EventArgs e)
 {
     SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);
     foreach (var item in groupBox1.Controls)
     {
         OvalPBox pb = (OvalPBox)item;
         pb.Click += Pb_Click;
     }
 }
Exemplo n.º 3
0
        void setPassword()
        {
            randoms = new int[6];
            Random rnd = new Random();

            for (int i = 0; i < 6; i++)
            {
                randoms[i] = rnd.Next(1, 6);
                OvalPBox pb = (OvalPBox)groupBox1.Controls.Find((rows[i] + randoms[i]), true)[0];
                pb.BackColor = Color.Cyan;
            }
        }