예제 #1
0
파일: Form1.cs 프로젝트: vetal54/Laba_3_2_
        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);
        }
예제 #2
0
파일: Form1.cs 프로젝트: vetal54/Laba_3_2_
        private void button3_Click(object sender, EventArgs e)
        {
            CEmblem figure = (CEmblem)comboBox1.SelectedItem;

            figure.Show();
            figure.Draw(pictureBox1);
        }
예제 #3
0
파일: Form1.cs 프로젝트: vetal54/Laba_3_2_
        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;
        }