Beispiel #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Retangulo f = new Retangulo(double.Parse(txtb.Text), double.Parse(txth.Text));

            txta.Text = f.CalqA().ToString();
            txtd.Text = f.CalcD().ToString();
        }
        private void CalcularClick(Object sender, RoutedEventArgs e)
        {
            Retangulo x = new Retangulo();

            x.SetBase(double.Parse(txtB.Text));
            x.SetAltura(double.Parse(txtAlt.Text));
            txtA.Text = x.CalcArea().ToString("0");
            txtD.Text = x.CalcDiagonal().ToString("0");
        }
Beispiel #3
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Retangulo r = new Retangulo();

            r.SetBase(double.Parse(txtBase.Text));
            r.SetAltura(double.Parse(txtAltura.Text));
            txtArea.Text     = r.CalcArea().ToString();
            txtDiagonal.Text = r.CalcDiagonal().ToString();
        }
Beispiel #4
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Retangulo retan = new Retangulo();

            retan.SetBase(double.Parse(bas.Text));
            retan.SetAltura(double.Parse(altura.Text));
            area.Text = retan.CalcArea().ToString();
            diag.Text = retan.CalcDiag().ToString();
        }
Beispiel #5
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Retangulo x = new Retangulo();

            x.SetAltura(double.Parse(a.Text));
            x.SetBase(double.Parse(b.Text));
            area.Text     = x.CalcArea().ToString();
            diagonal.Text = x.CalcDiagonal().ToString();
        }