コード例 #1
0
ファイル: PadTemplate.cs プロジェクト: zhuzhenping/FreeOQ
 internal PadTemplate(PadTemplate template)
 {
     foreach (IndicatorTemplateItem template1 in template.indicatorTemplateList)
     {
         this.indicatorTemplateList.Add(new IndicatorTemplateItem(template1));
     }
 }
コード例 #2
0
ファイル: ChartTemplateList.cs プロジェクト: smther/FreeOQ
 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);
 }
コード例 #3
0
        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);
        }
コード例 #4
0
ファイル: PadTemplate.cs プロジェクト: smther/FreeOQ
		internal PadTemplate(PadTemplate template)
		{
			foreach (IndicatorTemplateItem template1 in template.indicatorTemplateList)
				this.indicatorTemplateList.Add(new IndicatorTemplateItem(template1));
		}