public override void EnterProperty([NotNull] DfmGrammarParser.PropertyContext context)
 {
     if (context.qualifiedIdent().GetText() == "BeforeSearch.Strings")
     {
         if (this.searchDescription != null)
         {
             this.searchDescription.BeforeSearchEventText = DfmParseUtils.GetTextPropValue(context);
         }
     }
 }
Exemple #2
0
 public static string GetTextPropValue(DfmGrammarParser.PropertyContext context)
 {
     if (context.propertyValue().@string() != null)
     {
         return(GetString(context.propertyValue().@string()));
     }
     if (context.propertyValue().stringList() != null)
     {
         return(string.Join(Environment.NewLine, context.propertyValue().stringList().@string().Select(GetString)));
     }
     return(null);
 }
Exemple #3
0
            public override void EnterProperty([NotNull] DfmGrammarParser.PropertyContext context)
            {
                if (context.qualifiedIdent().GetText() == "Events")
                {
                    foreach (var item in context.propertyValue().itemList().item())
                    {
                        var textProp = GetPropertyByName(item, "ISBLText");
                        if (textProp == null)
                        {
                            continue;
                        }

                        var text = DfmParseUtils.GetTextPropValue(textProp);

                        if (this.action != null)
                        {
                            this.action.CalculationText = text;
                        }
                        else
                        {
                            var typeProp = GetPropertyByName(item, "EventType");
                            var name     = typeProp?.propertyValue().GetText() ?? string.Empty;

                            if (!EventTitles.TryGetValue(name, out string title))
                            {
                                title = name;
                            }

                            var wizardEvent = new WizardEvent
                            {
                                Name            = name,
                                Title           = title,
                                CalculationText = text
                            };

                            if (this.step != null)
                            {
                                this.step.Events.Add(wizardEvent);
                            }
                            else if (this.wizard != null)
                            {
                                this.wizard.Events.Add(wizardEvent);
                            }
                        }
                    }
                }
            }
 public override void EnterProperty([NotNull] DfmGrammarParser.PropertyContext context)
 {
     this.stringListValue = DfmParseUtils.GetTextPropValue(context);
 }