internal PadTemplate(PadTemplate template) { foreach (IndicatorTemplateItem template1 in template.indicatorTemplateList) { this.indicatorTemplateList.Add(new IndicatorTemplateItem(template1)); } }
private void LoadTemplate(FileInfo file) { ChartTemplateXmlDocument templateXmlDocument = new ChartTemplateXmlDocument(); ((XmlDocument) templateXmlDocument).Load(file.FullName); ChartTemplate chartTemplate = new ChartTemplate(); foreach (PadTemplateXmlNode padTemplateXmlNode in templateXmlDocument.PadTemplates) { PadTemplate padTemplate = new PadTemplate(); chartTemplate.PadTemplates.Add(padTemplateXmlNode.Number, padTemplate); foreach (IndicatorTemplateXmlNode indicatorNode in padTemplateXmlNode.IndicatorTemplates) { IndicatorTemplateItem indicatorTemplate = new IndicatorTemplateItem(indicatorNode.Type); padTemplate.IndicatorTemplates.Add(indicatorTemplate); this.LoadIndicatorTemplate(indicatorTemplate, indicatorNode); } } string withoutExtension = Path.GetFileNameWithoutExtension(file.Name); this.templates.Add(withoutExtension.ToLower(), chartTemplate); this.templateNames.Add(withoutExtension); }
private void LoadTemplate(FileInfo file) { ChartTemplateXmlDocument templateXmlDocument = new ChartTemplateXmlDocument(); ((XmlDocument)templateXmlDocument).Load(file.FullName); ChartTemplate chartTemplate = new ChartTemplate(); foreach (PadTemplateXmlNode padTemplateXmlNode in templateXmlDocument.PadTemplates) { PadTemplate padTemplate = new PadTemplate(); chartTemplate.PadTemplates.Add(padTemplateXmlNode.Number, padTemplate); foreach (IndicatorTemplateXmlNode indicatorNode in padTemplateXmlNode.IndicatorTemplates) { IndicatorTemplateItem indicatorTemplate = new IndicatorTemplateItem(indicatorNode.Type); padTemplate.IndicatorTemplates.Add(indicatorTemplate); this.LoadIndicatorTemplate(indicatorTemplate, indicatorNode); } } string withoutExtension = Path.GetFileNameWithoutExtension(file.Name); this.templates.Add(withoutExtension.ToLower(), chartTemplate); this.templateNames.Add(withoutExtension); }
internal PadTemplate(PadTemplate template) { foreach (IndicatorTemplateItem template1 in template.indicatorTemplateList) this.indicatorTemplateList.Add(new IndicatorTemplateItem(template1)); }