Пример #1
0
        private string GetCheckResult(string text)
        {
            try
            {
                var isCorrect = CheckExpression.IsCorrect(text);
                BracketsDataService.SaveResultToDatabase(isCorrect);

                return($"Result of checking: { isCorrect }");
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
Пример #2
0
        private void GetCheckResult(string text)
        {
            try
            {
                var isCorrect = CheckExpression.IsCorrect(text);
                BracketsDataService.SaveResultToDatabase(isCorrect);

                StatusLabel.Text = $"Result of checking: {isCorrect}";
            }
            catch (Exception ex)
            {
                StatusLabel.Text = "The following error occured: " + ex.Message;
            }
        }