Exemplo n.º 1
0
 public override void EnterProperty([NotNull] DfmGrammarParser.PropertyContext context)
 {
     if (context.qualifiedIdent().GetText() == "BeforeSearch.Strings")
     {
         if (this.searchDescription != null)
         {
             this.searchDescription.BeforeSearchEventText = DfmParseUtils.GetTextPropValue(context);
         }
     }
 }
Exemplo n.º 2
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);
                            }
                        }
                    }
                }
            }