예제 #1
0
 private void solveButton_Click(object sender, EventArgs e)
 {
     if (Calc != null)
     {
         num2          = Convert.ToDouble(textBox1.Text);
         textBox1.Text = Calc.DoMath(num1, num2) + "";
         Calc          = null;
         isMinus       = false;
     }
 }
예제 #2
0
 private void plus_Click(object sender, EventArgs e)
 {
     if (calc.Text != "")
     {
         if (Calc != null)
         {
             tmp1 = Calc.DoMath(tmp1, Convert.ToDouble(calc.Text));
         }
         else
         {
             tmp1 = Convert.ToDouble(calc.Text);
         }
         calc.Text   = "";
         Calc        = new Plus();
         label1.Text = tmp1.ToString() + "+";
     }
 }
예제 #3
0
 private void buttonAdd_Click(object sender, EventArgs e)
 {
     if (textBoxMain.Text != "")
     {
         if (Calc != null)
         {
             tmp1 = Calc.DoMath(tmp1, float.Parse(textBoxMain.Text));
         }
         else
         {
             tmp1 = float.Parse(textBoxMain.Text);
         }
         textBoxMain.Text = " ";
         textBoxAdd.Text  = textBoxAdd.Text + "+";
         Calc             = new Adder();
         znak             = true;
     }
 }
예제 #4
0
 private void Addition_Click(object sender, EventArgs e)//сложение
 {
     if (textBox1.Text != "")
     {
         if (Calc != null)
         {
             tmp1 = Calc.DoMath(tmp1, Convert.ToDouble(textBox1.Text));
         }
         else
         {
             tmp1 = Convert.ToDouble(textBox1.Text);
         }
         textBox2.Text = tmp1 + "+";
         textBox1.Text = "";
         Calc          = new Adder();
         Comma.Enabled = true;
     }
 }
예제 #5
0
 private void add_Click(object sender, EventArgs e)
 {
     if (TextBox.Text != "")
     {
         if (Calc != null)
         {
             tmp1         = Calc.DoMath(tmp1, Convert.ToDouble(TextBox.Text));
             TextBox.Text = ""; // обнуление
             Calc         = new Adder();
         }
         else
         {
             tmp1 = Convert.ToDouble(TextBox.Text);
         }
         TextBox.Text = "";
         Calc         = new Adder();
     }
 }
예제 #6
0
        private void add_click(object sender, EventArgs e)
        {
            if (Textbox.Text != "")
            {
                if (Calc != null)
                {
                    tmp1 = Calc.DoMath(tmp1, Convert.ToDouble(Textbox.Text));
                }
                else
                {
                    tmp1 = Convert.ToDouble(Textbox.Text);
                }
                Textbox.Text = "";
                Calc         = new Adder();

                zapyataya = false;
            }
        }
예제 #7
0
 private void plus_Click(object sender, EventArgs e)
 {
     if (textBox1.Text != "")
     {
         if (Calc != null)
         {
             tmp1 = Calc.DoMath(tmp1, Convert.ToDouble(textBox1.Text));
         }
         else
         {
             tmp1 = Convert.ToDouble(textBox1.Text);
         }
         textBox1.Text = "";
         textBox2.Text = tmp1 + "+";
         Calc          = new Adder();
         ;
     }
 }