Пример #1
0
 private void Init(GenieLampConfig owner, string name)
 {
     this.owner              = owner;
     this.name               = name;
     namingConvention        = new NamingConvention(this);
     layerConfigParams       = new LayerConfigParams(this);
     macro                   = new MacroExpander(owner.Macro);
     this.Keywords           = new LayerKeywords();
     this.LocalizationParams = new LayerLocalizationParams(this);
 }
Пример #2
0
        public LayerConfig(GenieLampConfig owner, XmlNode node)
        {
            Init(owner, Utils.Xml.GetAttrValue(node, "name"));
            isDefined    = true;
            this.subname = Utils.Xml.GetAttrValue(node, "subname", Const.EmptyName);

            XmlNodeList namingConvNodes = owner.Lamp.QueryNode(node, "./{0}:NamingConvention");

            if (namingConvNodes.Count == 0)
            {
                namingConvention = new NamingConvention(this);
            }
            else
            {
                namingConvention = new NamingConvention(this, namingConvNodes[0]);
            }
            layerConfigParams       = new LayerConfigParams(this, owner.Lamp.QueryNode(node, "./{0}:Param"));
            this.LocalizationParams = new LayerLocalizationParams(this, owner.Lamp.QueryNode(node, "./{0}:Localization/{0}:Param"));
        }