private void Combo_Seleccion(object sender, EventArgs e)
        {
            IFiguras Rectangulo = Construye_Figuras.Instanciar(4, Datos);
            int      opc        = Vista_Triangulo.cmbOperacion.SelectedIndex;

            switch (opc)
            {
            case 0:
                Vista_Triangulo.txtArea.Text = Rectangulo.Area();
                break;

            case 1:
                Vista_Triangulo.txtPerimetro.Text = Rectangulo.Perimetro();
                break;

            case 2:
                Vista_Triangulo.txtDescripcion.Text = Rectangulo.Descripcion();
                break;

            default:
                break;
            }
        }
        private void Combo_Seleccion(object sender, EventArgs e)
        {
            double[] Datos      = { double.Parse(Vista_Rectangulo.txtBase.Text), double.Parse(Vista_Rectangulo.txtAltura.Text) };
            IFiguras Rectangulo = Construye_Figuras.Instanciar(3, Datos);
            int      opc        = Vista_Rectangulo.cmbOperacion.SelectedIndex;

            switch (opc)
            {
            case 0:
                Vista_Rectangulo.txtArea.Text = Rectangulo.Area();
                break;

            case 1:
                Vista_Rectangulo.txtPerimetro.Text = Rectangulo.Perimetro();
                break;

            case 2:
                Vista_Rectangulo.txtDescripcion.Text = Rectangulo.Descripcion();
                break;

            default:
                break;
            }
        }
예제 #3
0
        private void Combo_Seleccion(object sender, EventArgs e)
        {
            double[] Datos    = { double.Parse(Vista_Circulo.txtRadio.Text), 3.1416 };
            IFiguras Cuadrado = Construye_Figuras.Instanciar(2, Datos);
            int      opc      = Vista_Circulo.cmbOperacion.SelectedIndex;

            switch (opc)
            {
            case 0:
                Vista_Circulo.txtArea.Text = Cuadrado.Area();
                break;

            case 1:
                Vista_Circulo.txtPerimetro.Text = Cuadrado.Perimetro();
                break;

            case 2:
                Vista_Circulo.txtDescripcion.Text = Cuadrado.Descripcion();
                break;

            default:
                break;
            }
        }