Exemplo n.º 1
0
        internal IGeneratorConfiguration CreateConfiguration(string configName, GeneratorType type)
        {
            if (_configs.Contains(configName))
            {
                throw new ArgumentException(configName + " already exists!");
            }

            switch (type)
            {
            case GeneratorType.Html:
            {
                HtmlGeneratorConfiguration config = new HtmlGeneratorConfiguration(this, configName);
                _configs.Add(config.Name, config);
                return(config);
            }

            case GeneratorType.Word:
            {
                return(null);
            }

            case GeneratorType.Csv:
            {
                return(null);
            }

            default:
                return(null);
            }
        }
Exemplo n.º 2
0
 private void InitializeDefaultGeneratorConfiguration()
 {
     if (!_configs.Contains(DEFAULT_HTML_CONFIGURATION_NAME))
     {
         HtmlGeneratorConfiguration defaultHtml = new HtmlGeneratorConfiguration(this, DEFAULT_HTML_CONFIGURATION_NAME);
         _configs.Add(defaultHtml.Name, defaultHtml);
     }
 }
Exemplo n.º 3
0
        internal override void LoadDataFromXml(XmlElement element)
        {
            Clear();

            CheckTagName(element);

            XmlNodeList childList = element.ChildNodes;

            if (childList == null || childList.Count <= 0)
            {
                return;
            }

            foreach (XmlElement childElement in childList)
            {
                if (childElement.Name == "HtmlGeneratorConfiguration")
                {
                    HtmlGeneratorConfiguration config = new HtmlGeneratorConfiguration(_set, "");
                    config.LoadDataFromXml(childElement);
                    Add(config.Name, config);
                }
            }
        }