private void PostCalculateButton_Click(object sender, EventArgs e) { InfixNotationExpression infExp = new InfixNotationExpression(); string[] constrain = { "\r\n" }; string[] inputs = this.PostToInfTextBox.Text.Split(constrain, StringSplitOptions.RemoveEmptyEntries); try { string calc = infExp.CalculateExpression(inputs); this.CalculateTextBox.Clear(); this.CalculateTextBox.Text = calc; } catch (CalculationOfVariableException ex) { this.ThrowMessageException(ex.ToString()); } catch (NotValidTokenException ex) { this.ThrowMessageException(ex.ToString()); } catch (UnaryOperatorException ex) { this.ThrowMessageException(ex.ToString()); } catch { this.ThrowMessageException("Да какого?!!"); } }