Exemple #1
0
        private void pictureBox14_Click(object sender, EventArgs e)
        {
            pictureBox12.Visible = true;

            Image BC = Properties.Resources.window2;

            this.BackgroundImage = BC;

            timer1.Enabled = false;
            t           = 0;
            label1.Text = rightCounts.ToString();
            CreatorColor RR = new CreatorColor(this);

            RR.visibleColors(this);
            label4.Text = "0";
            valueLevel  = 3;

            groupBox1.Visible  = false;
            groupBox2.Visible  = true;
            groupBox2.Location = new Point(272, 58);
        }
Exemple #2
0
        private void pictureBox13_Click(object sender, EventArgs e)
        {
            //groupBox4.Visible = true;
            //groupBox4.Location = new Point(137, 77);
            pictureBox14.Visible = true;
            pictureBox13.Visible = false;
            label4.Text          = "0:00";
            pictureBox12.Visible = true;
            Image BC = Properties.Resources.window2;

            this.BackgroundImage = BC;
            CreatorColor cc = new CreatorColor(this);

            valueLevel = 3;
            cc.visibleColors(this);
            Controls.Remove(cc);
            timer1.Enabled = false;
            rightCounts    = 0;
            t           = 180;
            lTimer      = 0;
            label1.Text = rightCounts.ToString();
        }
Exemple #3
0
        private void pictureBox12_Click(object sender, EventArgs e)
        {
            pictureBox13.Visible = true;
            pictureBox14.Visible = false;

            Image BC = Properties.Resources.window3;

            this.BackgroundImage = BC;

            int trrt = Convert.ToInt32(label1.Text);

            CreatorColor RR = new CreatorColor(this);

            RR.Create(this, valueLevel, xst, yst, xx, yy, trrt);

            timer1.Enabled       = true;
            pictureBox12.Visible = false;
            valueLevel           = 3;
            t           = 180;
            lTimer      = 0;
            rightCounts = 0;
            label1.Text = "0";
        }
Exemple #4
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            t--;
            if (t % rebrowsBigColors == 0 && valueLevel <= 6)
            {
                valueLevel++;
            }

            else if (t % 4 == 0 && valueLevel == 6)
            {
                valueLevel = 7;
            }

            lTimer++;

            if (t < 10)
            {
                label4.Text = "00:" + "0" + t.ToString();
            }
            else if (t >= 10 && t < 60)
            {
                label4.Text = "00:" + t.ToString();
            }
            else if (t >= 60 && t < 360)
            {
                int y = t / 60;
                label4.Text = "0" + y + ":" + (t - (y * 60)).ToString();
            }
            if (t <= 0)
            {
                timer1.Enabled = false;
                valueLevel     = 3;
                lTimer         = 0;
                CreatorColor RR = new CreatorColor(this);
                RR.visibleColors(this);

                BestRecords BB = new BestRecords();
                BB.labelRecordsCreate(this, Convert.ToInt32(label1.Text), label3.Text);

                groupBox4.Visible    = true;
                groupBox4.Location   = new Point(140, 76);
                pictureBox12.Visible = true;
                t = 60;
                pictureBox14.Visible = true;
                pictureBox13.Visible = false;
                this.BackgroundImage = Properties.Resources.window2;
            }



            if (lTimer == rebrowsLittleColors)
            {
                foreach (PictureBox PBV in this.Controls.OfType <PictureBox>())
                {
                    object tag = PBV.Tag;

                    if (Convert.ToInt32(tag) >= 0 && PBV.Size.Equals(new Size(60, 60)))
                    {
                        PBV.Visible = false;
                    }
                }
            }

            if (lTimer == rebrowsBigColors && valueLevel < 7)
            {
                int rrt = Convert.ToInt32(label1.Text);

                CreatorColor RR = new CreatorColor(this);

                RR.visibleColors(this);
                RR.Create(this, valueLevel, xst, yst, xx, yy, rrt);
                lTimer = 0;
            }


            if (lTimer == rebrowsBigColors && valueLevel == 7)
            {
                int          rrt = Convert.ToInt32(label1.Text);
                CreatorColor RR  = new CreatorColor(this);

                RR.visibleColors(this);
                RR.Create(this, valueLevel, xst, yst, xx, yy, rrt);

                CreatorColor RR2 = new CreatorColor(this);
                RR2.Create(this, r, xst, yst + 110, xx, yy + 110, rrt);

                lTimer = 0;

                if (r < 7)
                {
                    r++;
                }
                if (t >= 60)
                {
                    Records(rrt);
                }
            }


            int x = Convert.ToInt32(label1.Text);

            if (x < 0)
            {
                timer1.Enabled = false;
                t           = 0;
                label1.Text = rightCounts.ToString();
                CreatorColor RR = new CreatorColor(this);
                RR.visibleColors(this);
                valueLevel = 3;
                MessageBox.Show("Вы проиграли " + " Начните новую игру");
                groupBox1.Visible = false;
                groupBox2.Visible = true;
                Image Back = Properties.Resources.window2;
                this.BackgroundImage = Back;
                pictureBox13.Visible = false;
                pictureBox14.Visible = true;
                pictureBox12.Visible = true;
            }
        }