private void AddExecute(object parameter) { ICalculable operationClass = calculationClass.GetOperationClass("add"); Calculation3 = operationClass.Calculate(Calculation1, Calculation2); SendMessage(); }
private void CalculatorForm_EquallyClick(object sender, EventArgs e) { try { calculatorForm.Display = calculable.Calculate(calculatorForm.Display).ToString(); } catch { calculatorForm.Display = "Проверьте введённые данные"; } }
private void DivideExecute(object parameter) { try { ICalculable operationClass = calculationClass.GetOperationClass("divide"); Calculation3 = operationClass.Calculate(Calculation1, Calculation2); SendMessage(); } catch (Exception) { } }