示例#1
0
        private void Show_Click(object sender, EventArgs e)
        {
            CEmblem figure = (CEmblem)comboBox1.SelectedItem;

            figure.Show();
            figure.Draw(pictureBox1);
        }
示例#2
0
        private void full_left_Click(object sender, EventArgs e)
        {
            CEmblem figure = (CEmblem)comboBox1.SelectedItem;

            if (figure.currentColor == Color.White)
            {
                return;
            }
            figure.Hide();
            figure.Draw(pictureBox1);
            figure.Full_Left();
            figure.Show();
            figure.Draw(pictureBox1);
        }
示例#3
0
        private void New_Click(object sender, EventArgs e)
        {
            count++;
            int randSize = rnd.Next(100, 200);
            int rand     = rnd.Next(0, 500 - randSize);
            int rand2    = rnd.Next(0, 450 - randSize);

            CEmblem figure = new CEmblem(rand, rand2, randSize, "Емблема №" + count, Color.Red);

            figure.Show();
            figure.Draw(pictureBox1);
            comboBox1.Items.Add(figure);

            comboBox1.SelectedIndex = count - 1;
        }