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; } }
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); } }
public void WriteResult(bool result) { BracketsDataService.SaveResultToDatabase(result); }