private void button1_Click(object sender, EventArgs e)
        {
            frmEcuacionNL1 frm = new frmEcuacionNL1();

            frm.Visible  = true;
            this.Visible = false;
        }
Exemple #2
0
 private void Klous()
 {
     if (this.Visible != false)
     {
         frmEcuacionNL1 n = new frmEcuacionNL1();
         n.Visible    = true;
         this.Visible = false;
     }
 }
Exemple #3
0
        private void Resolver()
        {
            if (this.Visible != false)
            {
                frmEcuacionNL1 v = new frmEcuacionNL1();
                if (chk3.Checked)
                {
                    if (txt1.TextLength > 0 && txt2.TextLength > 0 && txt3.TextLength > 0)
                    {
                        if (chk1.Checked || chk2.Checked)
                        {
                            if (cb1.Text == "+" || cb1.Text == "-")
                            {
                                if (txt4.Text == "")
                                {
                                    txt4.Text = "0";
                                }

                                a = double.Parse(txt1.Text);
                                b = double.Parse(txt2.Text);
                                c = double.Parse(txt3.Text);
                                d = double.Parse(txt4.Text);

                                result  = (a * b);
                                result1 = (a * c);

                                signo = cb1.Text;

                                if (chk1.Checked)
                                {
                                    y = 1;
                                }
                                else if (chk2.Checked)
                                {
                                    y = 2;
                                }

                                v.Distri(result, result1, d, y, signo);
                                v.Visible    = true;
                                this.Visible = false;

                                txt1.Text = "";
                                txt2.Text = "";
                                txt3.Text = "";
                                txt4.Text = "";
                            }
                            else
                            {
                                MessageBox.Show("Error, Seleccione + o - antes de continuar", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                            }
                        }
                        else
                        {
                            MessageBox.Show("Error, Seleccione una incognita", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        }
                    }
                    else
                    {
                        MessageBox.Show("Error, ingrese valores antes de continuar", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
                else
                {
                    MessageBox.Show("Error, Seleccione los terminos de la distributiva", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }