Ejemplo n.º 1
0
        private void Start_Click(object sender, EventArgs e)
        {
            Point Cordinates = new Point();

            Cordinates.pointX = Convert.ToInt32(X1.Text);
            Cordinates.pointY = Convert.ToInt32(Y1.Text);
            textBox1.Text    += "Точка имеет координаты" + Environment.NewLine;
            textBox1.Text    += "x= " + Cordinates.pointX + "\t";
            textBox1.Text    += "y= " + Cordinates.pointY + Environment.NewLine;
            textBox1.Text    += Environment.NewLine + Environment.NewLine;

            int h1 = Convert.ToInt32(H1.Text);
            int r1 = Convert.ToInt32(R1.Text);
            int h2 = Convert.ToInt32(H2.Text);
            int r2 = Convert.ToInt32(R2.Text);

            Imarea Crug = new Circle();

            textBox1.Text += "Площадь окружности = " + Crug.Area(r1) + Environment.NewLine;
            textBox1.Text += Environment.NewLine + Environment.NewLine;

            Imarea PCone = new Cone();

            textBox1.Text += "Площадь поверхности конуса = " + PCone.Area(r1, h1) + Environment.NewLine;
            textBox1.Text += Environment.NewLine + Environment.NewLine;

            Imarea VCone = new Frustrum();

            textBox1.Text += "Объем усеченного конуса = " + VCone.Area(r1, r2, h1) + Environment.NewLine;
            textBox1.Text += Environment.NewLine + Environment.NewLine;
        }
Ejemplo n.º 2
0
        private void Start_Click(object sender, EventArgs e)
        {
            Point Cordinates = new Point();

            Cordinates.pointX = Convert.ToInt32(X1.Text);
            Cordinates.pointY = Convert.ToInt32(Y1.Text);
            textBox1.Text    += "Точка имеет координаты" + Environment.NewLine;
            textBox1.Text    += "x = " + Cordinates.pointX + "; ";
            textBox1.Text    += "y = " + Cordinates.pointY + "." + Environment.NewLine;
            textBox1.Text    += Environment.NewLine + Environment.NewLine;

            Circle Crug = new Circle();

            Crug.Radius1   = Convert.ToInt32(R1.Text);
            textBox1.Text += "Площадь окружности = " + Crug.Area + Environment.NewLine;
            textBox1.Text += Environment.NewLine + Environment.NewLine;

            Cone PCone = new Cone();

            PCone.Radius1  = Convert.ToInt32(R1.Text);
            PCone.ConeArea = Convert.ToInt32(H1.Text);
            textBox1.Text += "Площадь поверхности конуса = " + PCone.ConeArea + Environment.NewLine;
            textBox1.Text += Environment.NewLine + Environment.NewLine;

            Frustum VCone = new Frustum();

            VCone.Radius1    = Convert.ToInt32(R1.Text);
            VCone.Radius2    = Convert.ToInt32(R2.Text);
            VCone.ConeVolume = Convert.ToInt32(H2.Text);
            textBox1.Text   += "Объем усеченного конуса = " + VCone.ConeVolume + Environment.NewLine;
            textBox1.Text   += Environment.NewLine + Environment.NewLine;
        }