Exemple #1
0
        private void button5_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                p.Clear();
                p             = new Polynom(textBox3.Text);
                textBox3.Text = p.GetRepresentation();
            }

            if (radioButton2.Checked)
            {
                f.Clear();
                f             = new Polynom(textBox4.Text);
                textBox4.Text = f.GetRepresentation();
            }

            if (radioButton3.Checked)
            {
                p.Clear();
                f.Clear();
                p             = new Polynom(textBox3.Text);
                f             = new Polynom(textBox4.Text);
                textBox3.Text = p.GetRepresentation();
                textBox4.Text = f.GetRepresentation();
            }

            prepareLetters();
        }
Exemple #2
0
 private void button3_Click(object sender, EventArgs e)
 {
     result.Clear();
     if (radioButton1.Checked)
     {
         isUnary       = true;
         unaryPolynom  = 1;
         result        = new Polynom(new Node(1, 0, "")) * p;
         textBox6.Text = "+ (унарный)";
     }
     if (radioButton2.Checked)
     {
         isUnary       = true;
         unaryPolynom  = 2;
         result        = new Polynom(new Node(1, 0, "")) * f;
         textBox6.Text = "+ (унарный)";
     }
     if (radioButton3.Checked)
     {
         isUnary       = false;
         unaryPolynom  = 0;
         result        = p + f;
         textBox6.Text = "+ (бинарный)";
     }
     lastOperation = "+";
     prepareLetters();
     textBox5.Text = result.GetRepresentation();
 }