예제 #1
0
        private void AddExecute(object parameter)
        {
            ICalculable operationClass = calculationClass.GetOperationClass("add");

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

            catch (Exception)
            {
            }
        }