Esempio n. 1
0
        private void button5_Click(object sender, EventArgs e)
        {
            CEmblem figure = (CEmblem)comboBox1.SelectedItem;

            if (figure.currentColor == Color.White)
            {
                return;
            }
            figure.Hide();
            figure.Draw(pictureBox1);
            figure.EndUp();
            figure.Show();
            figure.Draw(pictureBox1);
        }
Esempio n. 2
0
        private void button3_Click(object sender, EventArgs e)
        {
            CEmblem figure = (CEmblem)comboBox1.SelectedItem;

            figure.Show();
            figure.Draw(pictureBox1);
        }
Esempio n. 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            count++;

            int     randSize = ra.Next(40, 150);
            int     rand     = ra.Next(30, 610 - randSize);
            int     rand2    = ra.Next(30, 445 - randSize);
            CEmblem figure   = new CEmblem(rand, rand2, randSize, "Фігура " + count, Color.DarkBlue);

            figure.Show();
            figure.Draw(pictureBox1);
            comboBox1.Items.Add(figure);
            comboBox1.SelectedIndex = index;
            index++;
            figure = (CEmblem)comboBox1.SelectedItem;
        }