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; } }
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() + "+"; } }
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; } }
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; } }
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(); } }
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; } }
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(); ; } }