Beispiel #1
0
        // Sirve para pulsar botónes con teclado
        private void Raiz_Cuadrada_KeyUp(object sender, KeyEventArgs e)
        {
            // Seleccionar 1
            if (e.KeyCode == Keys.NumPad1)
            {
                probar1.Checked = true;
                probar2.Checked = false;
            }

            // Seleccionar 2
            if (e.KeyCode == Keys.NumPad2)
            {
                probar1.Checked = false;
                probar2.Checked = true;
            }

            // Calcular presionando 3
            if (e.KeyCode == Keys.NumPad3)
            {
                Checar_Calcular();
            }

            // Elegir variables con Retroceso ( <- )
            if (e.KeyCode == Keys.Back)
            {
                Ingresar i = new Ingresar();
                i.Show();
                Hide();
            }
        }
Beispiel #2
0
        private void b_ingresar_Click(object sender, EventArgs e)
        {
            // Regresa para elegir otras variables
            Ingresar i = new Ingresar();

            i.Show();
            Hide();
        }
Beispiel #3
0
        // Sirve para pulsar botónes con teclado
        private void Menu_KeyUp(object sender, KeyEventArgs e)
        {
            // Presionar 1
            if (e.KeyCode == Keys.NumPad1)
            {
                operacion.Text = "Resultados:\n" + mt.Suma();
            }

            // Presionar 2
            if (e.KeyCode == Keys.NumPad2)
            {
                operacion.Text = "Resultados:\n" + mt.Resta();
            }

            // Presionar 3
            if (e.KeyCode == Keys.NumPad3)
            {
                operacion.Text = "Resultados:\n" + mt.Multiplicacion();
            }

            // Presionar 4
            if (e.KeyCode == Keys.NumPad4)
            {
                operacion.Text = "Resultados:\n" + mt.Division();
            }

            // Presionar 5
            if (e.KeyCode == Keys.NumPad5)
            {
                Raiz_Cuadrada rc = new Raiz_Cuadrada();
                rc.Show();
                Hide();
            }

            // Presionar 6
            if (e.KeyCode == Keys.NumPad6)
            {
                Close();
            }

            // Elegir variables con Retroceso ( <- )
            if (e.KeyCode == Keys.Back)
            {
                Ingresar i = new Ingresar();
                i.Show();
                Hide();
            }
        }