Exemple #1
0
        public Formelip(elip k)
        {
            //  groupBox1.Text = "Elip "+i.ToString();
            InitializeComponent();
            el = new elip(k.tam, k.a, k.b, k.mau);
            Point d1 = s.toado1(k.tam.X, k.tam.Y);

            textBox1.Text = d1.X.ToString();
            textBox2.Text = d1.Y.ToString();
            int a, b;

            a                  = (int)(k.a / 5);
            b                  = (int)(k.b / 5);
            textBox3.Text      = a.ToString();
            textBox4.Text      = b.ToString();
            textBox5.ForeColor = k.mau;
        }
Exemple #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            int x1 = Convert.ToInt16(textBox1.Text);
            int y1 = Convert.ToInt16(textBox2.Text);
            int x2 = Convert.ToInt16(textBox3.Text);
            int y2 = Convert.ToInt16(textBox4.Text);

            if (radioButton1.Checked == true)
            {
                xoa = 1; chon = 0;
            }
            if (chon != 0 && mauto == textBox5.ForeColor)
            {
                MessageBox.Show("Mau to da bi trung mau duong ve");
                return;
            }
            el = new elip(s.toado2(x1, y1), x2 * 5, y2 * 5, textBox5.ForeColor);
            this.Close();
        }
Exemple #3
0
        public elip getpro()
        {
            elip item = new elip(tam, a, b, mau);

            return(item);
        }