private void OnResultClick(object sender, EventArgs e)
 {
     _isDigitPressed    = false;
     _isOperatorPressed = false;
     _equation          = "";
     try
     {
         Func <decimal, string> converter = Convert.ToString;
         _textToBeShown = converter(_calculatorEngine.SubmitOperation(_operation, Convert.ToDecimal(_shownText)));
     }
     catch (Exception ex)
     {
         if (ex is FormatException || ex is ArgumentException)
         {
             _messageBoxDisplayService.Show(ex.Message);
             _textToBeShown = "Invalid operation";
         }
     }
     if (Regex.Matches(_textToBeShown, @"[a-zA-Z]").Count > 0)//
     {
         _messageBoxDisplayService.Show("Invalid operation");
     }
     else
     {
         try
         {
             _textToBeShown = GetFormattedNumberForDisplay(_textToBeShown);
         }
         catch (FormatException formatEx)
         {
             _messageBoxDisplayService.Show(formatEx.Message);
             _textToBeShown = "Invalid operation";
         }
     }
     _isResultObtained = true;
     _calculatorView.SetResultBoxText(_textToBeShown);
     _history += (_textToBeShown + ", ");
     _calculatorView.SetHistoryBoxText(_history);
     if (_isDigitPressed)
     {
         _calculatorEngine.ClearValue();
     }
 }