Esempio n. 1
0
        private void AddExecute(object parameter)
        {
            ICalculable operationClass = calculationClass.GetOperationClass("add");

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

            catch (Exception)
            {
            }
        }