コード例 #1
0
        /// <summary>
        /// Checks the syntax. By testing there were no performance issues found, even for great equation systems.
        /// </summary>
        private async void CheckSyntax()
        {
            using (StringReader reader = new StringReader(TextBox_MathModelExpressions.Text))
            {
                try
                {
                    InfoBar_Validation.IsOpen = !await syntaxChecker.CheckAsync(TextBox_MathModelExpressions.Text);

                    ToolTipService.SetToolTip(InfoBar_Validation, syntaxChecker.ErrorMessage);
                }
                catch (Exception e)
                {
                    InfoBar_Validation.IsOpen = true;
                    ToolTipService.SetToolTip(InfoBar_Validation, e.Message);
                }
                finally
                {
                    InfoBar_Validation.Message = "Syntax-Fehler festegestellt";
                }
            }
        }