コード例 #1
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;
            }
        }
コード例 #2
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);
            }
        }
コード例 #3
0
 public void WriteResult(bool result)
 {
     BracketsDataService.SaveResultToDatabase(result);
 }