Ejemplo n.º 1
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (Clicked == false)
            {
                Random r = new Random();
                num1.setnum(r.Next(1, 100));
                label1.Text = num1.getnum().ToString();

                num2.setnum(r.Next(1, 100));
                label2.Text = num2.getnum().ToString();

                num3.setnum(r.Next(1, 100));
                label3.Text = num3.getnum().ToString();

                num4.setnum(r.Next(1, 100));
                label4.Text = num4.getnum().ToString();

                num5.setnum(r.Next(1, 100));
                label5.Text = num5.getnum().ToString();
            }
            else
            {
                sum            = num1.getnum() + num2.getnum() + num3.getnum() + num4.getnum() + num5.getnum();
                timer1.Enabled = false;
                MessageBox.Show("To Athrisma Einai : " + sum);
            }
        }