private void EqualsOperation(object sender, EventArgs e) { if (operation == "+") { _uppertablelayout.OutputTextBox.Text = (ArithmaticOperations.Add(value, double.Parse(_uppertablelayout.OutputTextBox.Text))).ToString(); } else if (operation == "-") { _uppertablelayout.OutputTextBox.Text = (ArithmaticOperations.Subtract(value, double.Parse(_uppertablelayout.OutputTextBox.Text))).ToString(); } else if (operation == "*") { _uppertablelayout.OutputTextBox.Text = (ArithmaticOperations.Multiply(value, double.Parse(_uppertablelayout.OutputTextBox.Text))).ToString(); } else if (operation == "/") { _uppertablelayout.OutputTextBox.Text = (ArithmaticOperations.Divide(value, double.Parse(_uppertablelayout.OutputTextBox.Text))).ToString(); } operator_pressed = false; value = double.Parse(_uppertablelayout.OutputTextBox.Text); operation = ""; }
public double Calculate() { return(ArithmaticOperations.Multiply(_num1, _num2)); }