示例#1
0
        public override void Cargar(object sender, EventArgs e)
        {
            this.Text      = "Recta de intersección entre dos planos.";
            ventanagrafica = new EspacioIsometrico(830, 640, new Point(5, 80));
            Controls.Add(ventanagrafica.Ventana);
            lbExplicacion.Show();
            if (!directa)
            {
                lbExplicacion.Text = " Introducir las coodenadas del punto de paso y el vector perpendicular de cada plano. ( enteros o racionales ) .\n\n( O pulse el botón [E] para ejemplo con valores por omisión.";
            }
            if (directa)
            {
                lbExplicacion.Text = " Introducir las coodenadas del punto de paso y el vector perpendicular de cada plano. ( enteros o racionales ) .";
            }
            lbExplicacion.Width = btSalir.Location.X;
            tbPunto1X.Focus();
            pnDatos.Show();
            pnDatos.Location   = new Point(ventanagrafica.Ventana.Location.X + ventanagrafica.Ventana.Width, ventanagrafica.Ventana.Location.Y);
            btDefecto.Location = new Point(pnDatos.Location.X + pnDatos.Width, pnDatos.Location.Y);
            tbPunto1X.Focus();
            tbPunto1X.KeyPress += Cajas_KeyPress;
            tbPunto1Y.KeyPress += Cajas_KeyPress;
            tbPunto1Z.KeyPress += Cajas_KeyPress;
            tbPunto2X.KeyPress += Cajas_KeyPress;
            tbPunto2Y.KeyPress += Cajas_KeyPress;
            tbPunto2Z.KeyPress += Cajas_KeyPress;
            tbPunto3X.KeyPress += Cajas_KeyPress;
            tbPunto3Y.KeyPress += Cajas_KeyPress;
            tbPunto3Z.KeyPress += Cajas_KeyPress;
            tbPunto4X.KeyPress += Cajas_KeyPress;
            tbPunto4Y.KeyPress += Cajas_KeyPress;
            tbPunto4Z.KeyPress += Cajas_KeyPress;

            lbTituloAnguloX.Location = new Point(ventanagrafica.Ventana.Width + 10, pnDatos.Location.Y + pnDatos.Height + 30);
            lbAnguloX.Location       = new Point(lbTituloAnguloX.Location.X + lbTituloAnguloX.Width + 10, lbTituloAnguloX.Location.Y);
            sbAngulox.Location       = new Point(lbTituloAnguloX.Location.X, lbAnguloX.Location.Y + lbAnguloX.Height + 5);
            lbTituloAnguloY.Location = new Point(ventanagrafica.Ventana.Width + 10, sbAngulox.Location.Y + sbAngulox.Height + 5);
            lbAnguloY.Location       = new Point(lbTituloAnguloY.Location.X + lbTituloAnguloY.Width + 10, lbTituloAnguloY.Location.Y);
            sbAnguloY.Location       = new Point(lbTituloAnguloY.Location.X, lbAnguloY.Location.Y + lbAnguloY.Height + 5);
            lbTituloAnguloZ.Location = new Point(ventanagrafica.Ventana.Width + 10, sbAnguloY.Location.Y + sbAnguloY.Height + 5);
            lbAnguloZ.Location       = new Point(lbTituloAnguloZ.Location.X + lbTituloAnguloZ.Width + 5, lbTituloAnguloZ.Location.Y);
            sbAnguloZ.Location       = new Point(lbTituloAnguloZ.Location.X, lbAnguloZ.Location.Y + lbAnguloZ.Height + 5);
            btContinuar.Click       += btContinuar_Click;
            pnZoom.Location          = new Point(sbAnguloZ.Location.X, sbAnguloZ.Location.Y + sbAnguloZ.Height + 5);
            btIsometrica.Location    = new Point(lbTituloAnguloX.Location.X + sbAngulox.Width + 10, lbTituloAnguloX.Location.Y);
            btAlzado.Location        = new Point(btIsometrica.Location.X, btIsometrica.Location.Y + btIsometrica.Height + 3);
            btPerfil.Location        = new Point(btAlzado.Location.X, btAlzado.Location.Y + btAlzado.Height + 3);
            btPlanta.Location        = new Point(btPerfil.Location.X, btPerfil.Location.Y + btPerfil.Height + 3);
            sbAngulox.ValueChanged  += RotarX;
            sbAnguloY.ValueChanged  += RotarY;
            sbAnguloZ.ValueChanged  += RotarZ;
            btZoomMas.Click         += ZoomMas;
            btZoomMenos.Click       += ZoomMenos;
            btArriba.Click          += arriba;
            btAbajo.Click           += abajo;
            btDerecha.Click         += derecha;
            btIzquierda.Click       += Izquierda;
            btCentrar.Click         += centrar;
            btIsometrica.Click      += VistaIsometrica;
            btAlzado.Click          += VistaAlzado;
            btPerfil.Click          += VistaPerfil;
            btPlanta.Click          += VistaPlanta;
            btAjustar.Click         += AjustarZoom;
            btContinuar.Location     = new Point(pnZoom.Location.X, pnZoom.Location.Y + pnZoom.Height + 5);
            if (directa)
            {
                btDefecto.Hide();
            }
            tbPunto2X.Location = new Point(tbPunto1X.Location.X, labeli2.Location.Y + labeli2.Height + 5);
            tbPunto2Y.Location = new Point(tbPunto1Y.Location.X, tbPunto2X.Location.Y);
            tbPunto2Z.Location = new Point(tbPunto1Z.Location.X, tbPunto2X.Location.Y);

            lbRecta1.Text = "Plano 1";
            label35.Text  = "x";
            label36.Text  = "y";
            label37.Text  = "z";

            lbRotuloA.Text      = "Punto de paso:";
            lbRotuloA.AutoSize  = true;
            lbRotuloA.BackColor = Color.Transparent;
            lbRotuloA.Location  = new Point(lbRotuloA.Location.X - 50, lbRotuloA.Location.Y);

            labeli2.Location = new Point(label35.Location.X, tbPunto1X.Location.Y + tbPunto1X.Height + 5);
            labelj2.Location = new Point(label36.Location.X, labeli2.Location.Y);
            labelk2.Location = new Point(label37.Location.X, labeli2.Location.Y);

            tbPunto2X.Location = new Point(tbPunto1X.Location.X, labeli2.Location.Y + labeli2.Height + 5);
            tbPunto2Y.Location = new Point(tbPunto1Y.Location.X, tbPunto2X.Location.Y);
            tbPunto2Z.Location = new Point(tbPunto1Z.Location.X, tbPunto2X.Location.Y);

            lbRotuloB.Text      = "Vector normal:";
            lbRotuloB.AutoSize  = true;
            lbRotuloB.Location  = new Point(lbRotuloA.Location.X, tbPunto2X.Location.Y);
            lbRotuloB.BackColor = Color.Transparent;

            lbRecta2.Text      = "Plano 2:";
            lbRecta2.BackColor = Color.SlateBlue;
            lbRecta2.Location  = new Point(lbRecta1.Location.X, tbPunto2X.Location.Y + tbPunto2X.Height + 5);

            label20.Show();
            label20.BackColor = Color.Transparent;
            pnDatos.Controls.Add(label20);
            label20.Font     = label35.Font;
            label20.Text     = "x";
            label20.Location = new Point(label35.Location.X, lbRecta2.Location.Y + 5);
            label21.Show();
            label21.BackColor = Color.Transparent;
            pnDatos.Controls.Add(label21);
            label21.Font     = label20.Font;
            label21.Location = new Point(label36.Location.X, label20.Location.Y);
            label21.Text     = "y";
            label22.Show();
            label22.BackColor = Color.Transparent;
            pnDatos.Controls.Add(label22);
            label22.Font     = label21.Font;
            label22.Location = new Point(label37.Location.X, label21.Location.Y);
            label22.Text     = "z";

            tbPunto3X.Location = new Point(tbPunto3X.Location.X, label22.Location.Y + label22.Height + 5);
            tbPunto3Y.Location = new Point(tbPunto3Y.Location.X, tbPunto3X.Location.Y);
            tbPunto3Z.Location = new Point(tbPunto3Z.Location.X, tbPunto3X.Location.Y);

            lbPuntoDePaso.Text     = "Punto de paso:";
            lbPuntoDePaso.Location = new Point(lbRotuloA.Location.X, tbPunto3X.Location.Y);

            label23.Show();
            label23.BackColor = Color.Transparent;
            pnDatos.Controls.Add(label23);
            label23.Font     = label35.Font;
            label23.Text     = "i";
            label23.Location = new Point(label35.Location.X, tbPunto3X.Location.Y + tbPunto3X.Height + 5);
            label24.Show();
            label24.BackColor = Color.Transparent;
            pnDatos.Controls.Add(label24);
            label24.Font     = label20.Font;
            label24.Location = new Point(label36.Location.X, label23.Location.Y);
            label24.Text     = "j";
            label25.Show();
            label25.BackColor = Color.Transparent;
            pnDatos.Controls.Add(label25);
            label25.Font     = label21.Font;
            label25.Location = new Point(label37.Location.X, label24.Location.Y);
            label25.Text     = "k";

            tbPunto4X.Location = new Point(tbPunto4X.Location.X, label25.Location.Y + label25.Height + 5);
            tbPunto4Y.Location = new Point(tbPunto4Y.Location.X, tbPunto4X.Location.Y);
            tbPunto4Z.Location = new Point(tbPunto4Z.Location.X, tbPunto4X.Location.Y);

            lbVectorNormal.Text     = "Vector normal:";
            lbVectorNormal.Location = new Point(lbPuntoDePaso.Location.X, tbPunto4X.Location.Y);

            pnDatos.Height = tbPunto4X.Location.Y + tbPunto2X.Height + 15;
        }
示例#2
0
 public override void Cargar(object sender, EventArgs e)
 {
     this.Text = "Distancia entre un punto y una recta.";
     if (directa)
     {
         btDefecto.Hide();
     }
     ventanagrafica = new EspacioIsometrico(830, 640, new Point(5, 80));
     Controls.Add(ventanagrafica.Ventana);
     lbExplicacion.Show();
     lbExplicacion.Text  = " Introducir las coordenadas de dos puntos de la recta y el punto del que se quiere conocer su distancia a la recta.( enteros o racionales ).\n\n( O pulse el botón [E] para ejemplo con valores por omisión. )";
     lbExplicacion.Width = btSalir.Location.X;
     tbPunto1X.Focus();
     pnDatos.Show();
     pnDatos.Location  = new Point(ventanagrafica.Ventana.Location.X + ventanagrafica.Ventana.Width, ventanagrafica.Ventana.Location.Y);
     lbRecta2.Text     = "Punto:";
     lbRecta2.Location = new Point(lbRecta2.Location.X, tbPunto2X.Location.Y + tbPunto2X.Height + 5);
     // lbPuntoDePaso.Location = new Point(lbRotuloB.Location.X, lbRotuloB.Location.Y + lbRotuloB.Height + 5);
     //lbPuntoDePaso.Text = "Punto c:";
     //lbPuntoDePaso.Location = new Point(lbPuntoDePaso.Location.X, tbPunto2X.Location.Y + tbPunto2X.Height + 5);
     lbPuntoDePaso.Hide();
     tbPunto3X.Location  = new Point(tbPunto3X.Location.X, lbRecta2.Location.Y + lbRecta2.Height + 5);
     tbPunto3Y.Location  = new Point(tbPunto3Y.Location.X, tbPunto3X.Location.Y);
     tbPunto3Z.Location  = new Point(tbPunto3Z.Location.X, tbPunto3X.Location.Y);
     tbPunto3X.BackColor = tbPunto2X.BackColor;
     tbPunto3Y.BackColor = tbPunto2X.BackColor;
     tbPunto3Z.BackColor = tbPunto2X.BackColor;
     lbVectorNormal.Hide();
     tbPunto4X.Hide();
     tbPunto4Y.Hide();
     tbPunto4Z.Hide();
     btDefecto.Location = new Point(pnDatos.Location.X + pnDatos.Width, pnDatos.Location.Y);
     labeli2.Hide();
     labelj2.Hide();
     labelk2.Hide();
     pnDatos.Height = tbPunto3X.Location.Y + tbPunto3X.Height + 15;
     tbPunto1X.Focus();
     tbPunto1X.KeyPress      += Cajas_KeyPress;
     tbPunto1Y.KeyPress      += Cajas_KeyPress;
     tbPunto1Z.KeyPress      += Cajas_KeyPress;
     tbPunto2X.KeyPress      += Cajas_KeyPress;
     tbPunto2Y.KeyPress      += Cajas_KeyPress;
     tbPunto2Z.KeyPress      += Cajas_KeyPress;
     tbPunto3X.KeyPress      += Cajas_KeyPress;
     tbPunto3Y.KeyPress      += Cajas_KeyPress;
     tbPunto3Z.KeyPress      += Cajas_KeyPress;
     lbTituloAnguloX.Location = new Point(ventanagrafica.Ventana.Width + 10, pnDatos.Location.Y + pnDatos.Height + 5);
     lbAnguloX.Location       = new Point(lbTituloAnguloX.Location.X + lbTituloAnguloX.Width + 10, lbTituloAnguloX.Location.Y);
     sbAngulox.Location       = new Point(lbTituloAnguloX.Location.X, lbAnguloX.Location.Y + lbAnguloX.Height + 5);
     lbTituloAnguloY.Location = new Point(ventanagrafica.Ventana.Width + 10, sbAngulox.Location.Y + sbAngulox.Height + 5);
     lbAnguloY.Location       = new Point(lbTituloAnguloY.Location.X + lbTituloAnguloY.Width + 10, lbTituloAnguloY.Location.Y);
     sbAnguloY.Location       = new Point(lbTituloAnguloY.Location.X, lbAnguloY.Location.Y + lbAnguloY.Height + 5);
     lbTituloAnguloZ.Location = new Point(ventanagrafica.Ventana.Width + 10, sbAnguloY.Location.Y + sbAnguloY.Height + 5);
     lbAnguloZ.Location       = new Point(lbTituloAnguloZ.Location.X + lbTituloAnguloZ.Width + 5, lbTituloAnguloZ.Location.Y);
     sbAnguloZ.Location       = new Point(lbTituloAnguloZ.Location.X, lbAnguloZ.Location.Y + lbAnguloZ.Height + 5);
     btContinuar.Click       += btContinuar_Click;
     pnZoom.Location          = new Point(sbAnguloZ.Location.X, sbAnguloZ.Location.Y + sbAnguloZ.Height + 5);
     btIsometrica.Location    = new Point(lbTituloAnguloX.Location.X + sbAngulox.Width + 10, lbTituloAnguloX.Location.Y);
     btAlzado.Location        = new Point(btIsometrica.Location.X, btIsometrica.Location.Y + btIsometrica.Height + 3);
     btPerfil.Location        = new Point(btAlzado.Location.X, btAlzado.Location.Y + btAlzado.Height + 3);
     btPlanta.Location        = new Point(btPerfil.Location.X, btPerfil.Location.Y + btPerfil.Height + 3);
     sbAngulox.ValueChanged  += RotarX;
     sbAnguloY.ValueChanged  += RotarY;
     sbAnguloZ.ValueChanged  += RotarZ;
     btZoomMas.Click         += ZoomMas;
     btZoomMenos.Click       += ZoomMenos;
     btArriba.Click          += arriba;
     btAbajo.Click           += abajo;
     btDerecha.Click         += derecha;
     btIzquierda.Click       += Izquierda;
     btCentrar.Click         += centrar;
     btIsometrica.Click      += VistaIsometrica;
     btAlzado.Click          += VistaAlzado;
     btPerfil.Click          += VistaPerfil;
     btPlanta.Click          += VistaPlanta;
     btAjustar.Click         += AjustarZoom;
     btContinuar.Location     = new Point(pnZoom.Location.X, pnZoom.Location.Y + pnZoom.Height + 5);
 }
示例#3
0
 public override void Cargar(object sender, EventArgs e)
 {
     this.Text = "Distancia entre un punto y un plano.";
     if (directa)
     {
         btDefecto.Hide();
     }
     ventanagrafica = new EspacioIsometrico(830, 640, new Point(5, 80));
     Controls.Add(ventanagrafica.Ventana);
     lbExplicacion.Show();
     if (!directa)
     {
         lbExplicacion.Text = " Introducir el vector perpendicular y el punto de paso del plano, y el punto del que se quiere conocer su distancia al plano ( enteros o racionales ).\n\n( O pulse el botón [E] para ejemplo con valores por omisión. )";
     }
     else
     {
         lbExplicacion.Text = " Introducir el vector perpendicular y el punto de paso del plano, y el punto del que se quiere conocer su distancia al plano ( enteros o racionales ).";
     }
     lbExplicacion.Width = btSalir.Location.X;
     tbPunto1X.Focus();
     pnDatos.Show();
     pnDatos.Location   = new Point(ventanagrafica.Ventana.Location.X + ventanagrafica.Ventana.Width, ventanagrafica.Ventana.Location.Y);
     lbRecta1.Text      = "Plano:";
     lbRotuloA.Text     = "Vector perpendicular:";
     lbRotuloA.Location = new Point(lbRotuloA.Location.X - 45, lbRotuloA.Location.Y);
     lbRotuloA.Font     = new Font(lbRotuloA.Font.FontFamily, 9);
     lbRotuloA.AutoSize = true;
     label35.Text       = "i";
     label36.Text       = "j";
     label37.Text       = "k";
     lbRotuloB.Text     = "Punto de paso:";
     lbRotuloB.Location = new Point(lbRotuloB.Location.X - 15, lbRotuloB.Location.Y + 20);
     lbRotuloB.Font     = lbRotuloA.Font;
     lbRotuloB.AutoSize = true;
     pnDatos.Controls.Add(label20);
     pnDatos.Controls.Add(label21);
     pnDatos.Controls.Add(label22);
     label20.Show();
     label21.Show();
     label22.Show();
     label20.Location   = new Point(label35.Location.X, tbPunto1X.Location.Y + tbPunto1X.Height + 5);
     label21.Location   = new Point(label36.Location.X, label20.Location.Y);
     label22.Location   = new Point(label37.Location.X, label20.Location.Y);
     label20.Font       = label35.Font;
     label21.Font       = label20.Font;
     label22.Font       = label20.Font;
     label20.BackColor  = Color.Transparent;
     label21.BackColor  = Color.Transparent;
     label22.BackColor  = Color.Transparent;
     label20.Text       = "X";
     label21.Text       = "Y";
     label22.Text       = "Z";
     tbPunto2X.Location = new Point(tbPunto2X.Location.X, label20.Location.Y + label20.Height + 5);
     tbPunto2Y.Location = new Point(tbPunto2Y.Location.X, tbPunto2X.Location.Y);
     tbPunto2Z.Location = new Point(tbPunto2Z.Location.X, tbPunto2X.Location.Y);
     lbRecta2.Text      = "Punto:";
     lbRecta2.Location  = new Point(lbRecta2.Location.X, tbPunto2X.Location.Y + tbPunto2X.Height + 5);
     lbPuntoDePaso.Hide();
     tbPunto3X.Location  = new Point(tbPunto3X.Location.X, lbRecta2.Location.Y + lbRecta2.Height + 5);
     tbPunto3Y.Location  = new Point(tbPunto3Y.Location.X, tbPunto3X.Location.Y);
     tbPunto3Z.Location  = new Point(tbPunto3Z.Location.X, tbPunto3X.Location.Y);
     tbPunto3X.BackColor = tbPunto2X.BackColor;
     tbPunto3Y.BackColor = tbPunto2X.BackColor;
     tbPunto3Z.BackColor = tbPunto2X.BackColor;
     pnDatos.Controls.Add(label10);
     pnDatos.Controls.Add(label11);
     pnDatos.Controls.Add(label12);
     label10.Show();
     label11.Show();
     label12.Show();
     label10.Font      = label20.Font;
     label11.Font      = label10.Font;
     label12.Font      = label11.Font;
     label10.BackColor = Color.Transparent;
     label11.BackColor = Color.Transparent;
     label12.BackColor = Color.Transparent;
     label10.Location  = new Point(label20.Location.X, tbPunto3X.Location.Y - 20);
     label11.Location  = new Point(label21.Location.X, label10.Location.Y);
     label12.Location  = new Point(label22.Location.X, label10.Location.Y);
     label10.Text      = "X";
     label11.Text      = "Y";
     label12.Text      = "Z";
     lbVectorNormal.Hide();
     tbPunto4X.Hide();
     tbPunto4Y.Hide();
     tbPunto4Z.Hide();
     btDefecto.Location = new Point(pnDatos.Location.X + pnDatos.Width, pnDatos.Location.Y);
     labeli2.Hide();
     labelj2.Hide();
     labelk2.Hide();
     pnDatos.Height = tbPunto3X.Location.Y + tbPunto3X.Height + 15;
     tbPunto1X.Focus();
     tbPunto1X.KeyPress      += Cajas_KeyPress;
     tbPunto1Y.KeyPress      += Cajas_KeyPress;
     tbPunto1Z.KeyPress      += Cajas_KeyPress;
     tbPunto2X.KeyPress      += Cajas_KeyPress;
     tbPunto2Y.KeyPress      += Cajas_KeyPress;
     tbPunto2Z.KeyPress      += Cajas_KeyPress;
     tbPunto3X.KeyPress      += Cajas_KeyPress;
     tbPunto3Y.KeyPress      += Cajas_KeyPress;
     tbPunto3Z.KeyPress      += Cajas_KeyPress;
     lbTituloAnguloX.Location = new Point(ventanagrafica.Ventana.Width + 10, pnDatos.Location.Y + pnDatos.Height + 5);
     lbAnguloX.Location       = new Point(lbTituloAnguloX.Location.X + lbTituloAnguloX.Width + 10, lbTituloAnguloX.Location.Y);
     sbAngulox.Location       = new Point(lbTituloAnguloX.Location.X, lbAnguloX.Location.Y + lbAnguloX.Height + 5);
     lbTituloAnguloY.Location = new Point(ventanagrafica.Ventana.Width + 10, sbAngulox.Location.Y + sbAngulox.Height + 5);
     lbAnguloY.Location       = new Point(lbTituloAnguloY.Location.X + lbTituloAnguloY.Width + 10, lbTituloAnguloY.Location.Y);
     sbAnguloY.Location       = new Point(lbTituloAnguloY.Location.X, lbAnguloY.Location.Y + lbAnguloY.Height + 5);
     lbTituloAnguloZ.Location = new Point(ventanagrafica.Ventana.Width + 10, sbAnguloY.Location.Y + sbAnguloY.Height + 5);
     lbAnguloZ.Location       = new Point(lbTituloAnguloZ.Location.X + lbTituloAnguloZ.Width + 5, lbTituloAnguloZ.Location.Y);
     sbAnguloZ.Location       = new Point(lbTituloAnguloZ.Location.X, lbAnguloZ.Location.Y + lbAnguloZ.Height + 5);
     btContinuar.Click       += btContinuar_Click;
     pnZoom.Location          = new Point(sbAnguloZ.Location.X, sbAnguloZ.Location.Y + sbAnguloZ.Height + 5);
     btIsometrica.Location    = new Point(lbTituloAnguloX.Location.X + sbAngulox.Width + 10, lbTituloAnguloX.Location.Y);
     btAlzado.Location        = new Point(btIsometrica.Location.X, btIsometrica.Location.Y + btIsometrica.Height + 3);
     btPerfil.Location        = new Point(btAlzado.Location.X, btAlzado.Location.Y + btAlzado.Height + 3);
     btPlanta.Location        = new Point(btPerfil.Location.X, btPerfil.Location.Y + btPerfil.Height + 3);
     sbAngulox.ValueChanged  += RotarX;
     sbAnguloY.ValueChanged  += RotarY;
     sbAnguloZ.ValueChanged  += RotarZ;
     btZoomMas.Click         += ZoomMas;
     btZoomMenos.Click       += ZoomMenos;
     btArriba.Click          += arriba;
     btAbajo.Click           += abajo;
     btDerecha.Click         += derecha;
     btIzquierda.Click       += Izquierda;
     btCentrar.Click         += centrar;
     btIsometrica.Click      += VistaIsometrica;
     btAlzado.Click          += VistaAlzado;
     btPerfil.Click          += VistaPerfil;
     btPlanta.Click          += VistaPlanta;
     btAjustar.Click         += AjustarZoom;
     btContinuar.Location     = new Point(pnZoom.Location.X, pnZoom.Location.Y + pnZoom.Height + 5);
 }
示例#4
0
 public override void Cargar(object sender, EventArgs e)
 {
     this.Text = "Ecuación de un plano.";
     if (directa)
     {
         btDefecto.Hide();
     }
     ventanagrafica = new EspacioIsometrico(830, 640, new Point(5, 80));
     Controls.Add(ventanagrafica.Ventana);
     lbExplicacion.Show();
     lbExplicacion.Text    = " Introducir las coordenadas del punto de paso del plano, y el vector perpendicular al mismo ( enteros o racionales ).\n\n( O pulse el botón [E] para ejemplo con valores por omisión. )";
     lbRotuloA.Text        = "Punto de Paso:";
     lbRotuloA.BackColor   = Color.DarkOrange;
     lbRotuloA.MaximumSize = new Size(130, 150);
     lbRotuloA.AutoSize    = true;
     lbRotuloA.Location    = new Point(lbRotuloA.Location.X - 45, lbRotuloA.Location.Y);
     lbRotuloB.Location    = new Point(lbRotuloA.Location.X, lbRotuloA.Location.Y + lbRotuloA.Height + 15);
     lbRotuloB.BackColor   = Color.SlateBlue;
     lbRotuloB.MaximumSize = new Size(130, 150);
     lbRotuloB.AutoSize    = true;
     lbRotuloB.Text        = "Vector perpendicular:";
     tbPunto2X.Location    = new Point(tbPunto2X.Location.X, lbRotuloB.Location.Y);
     tbPunto2Y.Location    = new Point(tbPunto2Y.Location.X, tbPunto2X.Location.Y);
     tbPunto2Z.Location    = new Point(tbPunto2Z.Location.X, tbPunto2X.Location.Y);
     labeli2.Location      = new Point(labeli2.Location.X, tbPunto2X.Location.Y - 20);
     labelj2.Location      = new Point(labelj2.Location.X, tbPunto2Y.Location.Y - 20);
     labelk2.Location      = new Point(labelk2.Location.X, tbPunto2Z.Location.Y - 20);
     lbExplicacion.Width   = btSalir.Location.X;
     tbPunto1X.Focus();
     pnDatos.Show();
     pnDatos.Location = new Point(ventanagrafica.Ventana.Location.X + ventanagrafica.Ventana.Width, ventanagrafica.Ventana.Location.Y);
     lbRecta1.Hide();
     lbRecta2.Hide();
     lbPuntoDePaso.Hide();
     lbVectorNormal.Hide();
     tbPunto3X.Hide();
     tbPunto3Y.Hide();
     tbPunto3Z.Hide();
     tbPunto4X.Hide();
     tbPunto4Y.Hide();
     tbPunto4Z.Hide();
     btDefecto.Location = new Point(pnDatos.Location.X + pnDatos.Width, pnDatos.Location.Y);
     pnDatos.Height     = tbPunto2X.Location.Y + tbPunto2X.Height + 30;
     tbPunto1X.Focus();
     tbPunto1X.KeyPress      += Cajas_KeyPress;
     tbPunto1Y.KeyPress      += Cajas_KeyPress;
     tbPunto1Z.KeyPress      += Cajas_KeyPress;
     tbPunto2X.KeyPress      += Cajas_KeyPress;
     tbPunto2Y.KeyPress      += Cajas_KeyPress;
     tbPunto2Z.KeyPress      += Cajas_KeyPress;
     lbTituloAnguloX.Location = new Point(ventanagrafica.Ventana.Width + 10, pnDatos.Location.Y + pnDatos.Height + 5);
     lbAnguloX.Location       = new Point(lbTituloAnguloX.Location.X + lbTituloAnguloX.Width + 10, lbTituloAnguloX.Location.Y);
     sbAngulox.Location       = new Point(lbTituloAnguloX.Location.X, lbAnguloX.Location.Y + lbAnguloX.Height + 5);
     lbTituloAnguloY.Location = new Point(ventanagrafica.Ventana.Width + 10, sbAngulox.Location.Y + sbAngulox.Height + 5);
     lbAnguloY.Location       = new Point(lbTituloAnguloY.Location.X + lbTituloAnguloY.Width + 10, lbTituloAnguloY.Location.Y);
     sbAnguloY.Location       = new Point(lbTituloAnguloY.Location.X, lbAnguloY.Location.Y + lbAnguloY.Height + 5);
     lbTituloAnguloZ.Location = new Point(ventanagrafica.Ventana.Width + 10, sbAnguloY.Location.Y + sbAnguloY.Height + 5);
     lbAnguloZ.Location       = new Point(lbTituloAnguloZ.Location.X + lbTituloAnguloZ.Width + 5, lbTituloAnguloZ.Location.Y);
     sbAnguloZ.Location       = new Point(lbTituloAnguloZ.Location.X, lbAnguloZ.Location.Y + lbAnguloZ.Height + 5);
     btContinuar.Click       += btContinuar_Click;
     pnZoom.Location          = new Point(sbAnguloZ.Location.X, sbAnguloZ.Location.Y + sbAnguloZ.Height + 5);
     btIsometrica.Location    = new Point(lbTituloAnguloX.Location.X + sbAngulox.Width + 10, lbTituloAnguloX.Location.Y);
     btAlzado.Location        = new Point(btIsometrica.Location.X, btIsometrica.Location.Y + btIsometrica.Height + 3);
     btPerfil.Location        = new Point(btAlzado.Location.X, btAlzado.Location.Y + btAlzado.Height + 3);
     btPlanta.Location        = new Point(btPerfil.Location.X, btPerfil.Location.Y + btPerfil.Height + 3);
     sbAngulox.ValueChanged  += RotarX;
     sbAnguloY.ValueChanged  += RotarY;
     sbAnguloZ.ValueChanged  += RotarZ;
     btZoomMas.Click         += ZoomMas;
     btZoomMenos.Click       += ZoomMenos;
     btArriba.Click          += arriba;
     btAbajo.Click           += abajo;
     btDerecha.Click         += derecha;
     btIzquierda.Click       += Izquierda;
     btCentrar.Click         += centrar;
     btIsometrica.Click      += VistaIsometrica;
     btAlzado.Click          += VistaAlzado;
     btPerfil.Click          += VistaPerfil;
     btPlanta.Click          += VistaPlanta;
     btAjustar.Click         += AjustarZoom;
     btContinuar.Location     = new Point(pnZoom.Location.X, pnZoom.Location.Y + pnZoom.Height + 5);
 }
示例#5
0
        public override void Cargar(object sender, EventArgs e)
        {
            this.Text      = "Ángulo entre vectores.";
            ventanagrafica = new EspacioIsometrico(830, 640, new Point(5, 80));
            Controls.Add(ventanagrafica.Ventana);
            lbExplicacion.Show();
            lbExplicacion.Text  = " Introducir las componentes de los vectores ( enteros o racionales ) .\n\n( O pulse el botón [E] para ejemplo con valores por omisión.";
            lbExplicacion.Width = btSalir.Location.X;
            tbPunto1X.Focus();
            pnDatos.Show();
            pnDatos.Location = new Point(ventanagrafica.Ventana.Location.X + ventanagrafica.Ventana.Width, ventanagrafica.Ventana.Location.Y);
            lbRecta1.Hide();
            lbRecta2.Hide();
            lbPuntoDePaso.Hide();
            lbVectorNormal.Hide();
            tbPunto3X.Hide();
            tbPunto3Y.Hide();
            tbPunto3Z.Hide();
            tbPunto4X.Hide();
            tbPunto4Y.Hide();
            tbPunto4Z.Hide();
            label35.Text        = "i";
            label36.Text        = "j";
            label37.Text        = "k";
            lbRotuloA.Text      = "Vector 1:";
            lbRotuloA.AutoSize  = true;
            lbRotuloA.BackColor = Color.DarkOrange;
            lbRotuloA.Location  = new Point(lbRotuloA.Location.X - 5, lbRotuloA.Location.Y);
            lbRotuloB.Text      = "Vector 2:";
            lbRotuloB.AutoSize  = true;
            lbRotuloB.Location  = new Point(lbRotuloB.Location.X - 5, lbRotuloB.Location.Y);
            lbRotuloB.BackColor = Color.SlateBlue;
            btDefecto.Location  = new Point(pnDatos.Location.X + pnDatos.Width, pnDatos.Location.Y);
            labeli2.Hide();
            labelj2.Hide();
            labelk2.Hide();
            pnDatos.Height = tbPunto2X.Location.Y + tbPunto2X.Height + 15;
            tbPunto1X.Focus();
            tbPunto1X.KeyPress      += Cajas_KeyPress;
            tbPunto1Y.KeyPress      += Cajas_KeyPress;
            tbPunto1Z.KeyPress      += Cajas_KeyPress;
            tbPunto2X.KeyPress      += Cajas_KeyPress;
            tbPunto2Y.KeyPress      += Cajas_KeyPress;
            tbPunto2Z.KeyPress      += Cajas_KeyPress;
            lbTituloAnguloX.Location = new Point(ventanagrafica.Ventana.Width + 10, pnDatos.Location.Y + pnDatos.Height + 5);
            lbAnguloX.Location       = new Point(lbTituloAnguloX.Location.X + lbTituloAnguloX.Width + 10, lbTituloAnguloX.Location.Y);
            sbAngulox.Location       = new Point(lbTituloAnguloX.Location.X, lbAnguloX.Location.Y + lbAnguloX.Height + 5);
            lbTituloAnguloY.Location = new Point(ventanagrafica.Ventana.Width + 10, sbAngulox.Location.Y + sbAngulox.Height + 5);
            lbAnguloY.Location       = new Point(lbTituloAnguloY.Location.X + lbTituloAnguloY.Width + 10, lbTituloAnguloY.Location.Y);
            sbAnguloY.Location       = new Point(lbTituloAnguloY.Location.X, lbAnguloY.Location.Y + lbAnguloY.Height + 5);
            lbTituloAnguloZ.Location = new Point(ventanagrafica.Ventana.Width + 10, sbAnguloY.Location.Y + sbAnguloY.Height + 5);
            lbAnguloZ.Location       = new Point(lbTituloAnguloZ.Location.X + lbTituloAnguloZ.Width + 5, lbTituloAnguloZ.Location.Y);
            sbAnguloZ.Location       = new Point(lbTituloAnguloZ.Location.X, lbAnguloZ.Location.Y + lbAnguloZ.Height + 5);
            btContinuar.Click       += btContinuar_Click;
            pnZoom.Location          = new Point(sbAnguloZ.Location.X, sbAnguloZ.Location.Y + sbAnguloZ.Height + 5);
            btIsometrica.Location    = new Point(lbTituloAnguloX.Location.X + sbAngulox.Width + 10, lbTituloAnguloX.Location.Y);
            btAlzado.Location        = new Point(btIsometrica.Location.X, btIsometrica.Location.Y + btIsometrica.Height + 3);
            btPerfil.Location        = new Point(btAlzado.Location.X, btAlzado.Location.Y + btAlzado.Height + 3);
            btPlanta.Location        = new Point(btPerfil.Location.X, btPerfil.Location.Y + btPerfil.Height + 3);
            sbAngulox.ValueChanged  += RotarX;
            sbAnguloY.ValueChanged  += RotarY;
            sbAnguloZ.ValueChanged  += RotarZ;
            btZoomMas.Click         += ZoomMas;
            btZoomMenos.Click       += ZoomMenos;
            btArriba.Click          += arriba;
            btAbajo.Click           += abajo;
            btDerecha.Click         += derecha;
            btIzquierda.Click       += Izquierda;
            btCentrar.Click         += centrar;
            btIsometrica.Click      += VistaIsometrica;
            btAlzado.Click          += VistaAlzado;
            btPerfil.Click          += VistaPerfil;
            btPlanta.Click          += VistaPlanta;
            btAjustar.Click         += AjustarZoom;
            btContinuar.Location     = new Point(pnZoom.Location.X, pnZoom.Location.Y + pnZoom.Height + 5);

            // Controles exclusivos de esta clase
            btDemostracion = new Button();
            Controls.Add(btDemostracion);
            btDemostracion.BackColor = Color.Gray;
            btDemostracion.Text      = "Demostración";
            btDemostracion.Font      = btContinuar.Font;
            btDemostracion.AutoSize  = true;
            btDemostracion.Visible   = false;
            //   btDemostracion.Location = new Point(btContinuar.Location.X + btContinuar.Width + 50, btContinuar.Location.Y);
            btDemostracion.Location = new Point(695, 55);
            btDemostracion.Click   += btDemostracion_Click;
        }