Exemplo n.º 1
0
        private void btngene_Click(object sender, EventArgs e)
        {
            GeneradorMetodoCongru metodocong = new GeneradorMetodoCongru(int.Parse(txtSemillaCong.Text), int.Parse(txtConstante.Text), int.Parse(txtModulo.Text), int.Parse(txtMultiplicador.Text), int.Parse(txtNumGene.Text));

            ProcesaAleatorios procesador = new ProcesaAleatorios();

            textBox1.Text = (procesador.CreaTexto(metodocong.Aleatorios) + Environment.NewLine);
            MessageBox.Show("Proceso terminado con éxito", "Generador de Aleatorios", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
Exemplo n.º 2
0
        private void btnGenerarProductosMediosModificados_Click(object sender, EventArgs e)
        {
            GeneradorProductoMedioModificado gen3 = new GeneradorProductoMedioModificado(float.Parse(txtValorSemilla.Text), int.Parse(txtNumerosGenerar3.Text), float.Parse(txtValork.Text));

            if (gen3.GeneradosConExito)
            {
                ProcesaAleatorios procesador = new ProcesaAleatorios();
                txtMostrarNumerosMedio.Text = (procesador.CreaTexto(gen3.Aleatorios));
                MessageBox.Show("Proceso terminado con éxito", "Generador de Aleatorios", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }

            else
            {
                MessageBox.Show(gen3.Error, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 3
0
        private void BtnGenerarCuadradosMedios_Click(object sender, EventArgs e)
        {
            Generador gen = new Generador(float.Parse(txtIngreseSemilla.Text), int.Parse(txtNumerosGenerar.Text));

            if (gen.GeneradosConExito)
            {
                double valor;
                valor = int.Parse(txtNumerosGenerar.Text);

                ProcesaAleatorios procesador = new ProcesaAleatorios();

                textBoxmostrar.Text = (procesador.CreaTexto(gen.Aleatorios) + Environment.NewLine);
                MessageBox.Show("PROCESO TERMINADO CON EXITO", "FELICIDADES", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }

            else
            {
                MessageBox.Show(gen.Error, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }