private void CbBtName_Unchecked(object sender, RoutedEventArgs e) { ElementsName = 0; var exceptionParse = LayoutController.Parse(TeFile.Text, ProjectController.SurfacesPath); if (exceptionParse == null) { LayoutController.RefreshLayout(DialogCanvas); } else { DialogCanvas.Children.Clear(); DialogCanvas.Children.Add( new TextBlock { Text = exceptionParse.Message, MaxWidth = DialogCanvas.ActualWidth, Margin = new Thickness(0), TextWrapping = TextWrapping.Wrap, Foreground = new SolidColorBrush { Color = Colors.Red }, }); } }
private void TeFileOnTextChanged(object sender, EventArgs e) { LockEditor(TeFile.IsModified); TextSearchController.Reset(); var exceptionParse = LayoutController.Parse(TeFile.Text, ProjectController.SurfacesPath); if (exceptionParse == null) { LayoutController.RefreshLayout(DialogCanvas); } else { DialogCanvas.Children.Clear(); DialogCanvas.Children.Add( new TextBlock { Text = exceptionParse.Message, MaxWidth = DialogCanvas.ActualWidth, Margin = new Thickness(0), TextWrapping = TextWrapping.Wrap, Foreground = new SolidColorBrush { Color = Colors.Red }, }); } }