Exemple #1
0
 internal void ReadXml(XElement node, MemoryFolder mFolder, XFile xFile)
 {
     foreach (XElement element in node.Elements())
     {
         if (element.Name.LocalName == "cat")
         {
             ExcelCategoryAxisData data = new ExcelCategoryAxisData();
             data.ReadXml(element);
             this.CategoryAxisData = data;
         }
         else if (element.Name.LocalName == "dLbls")
         {
             ExcelDataLabels labels = new ExcelDataLabels();
             labels.ReadXml(element, mFolder, xFile);
             this.DataLabels = labels;
         }
         else if (element.Name.LocalName == "dPt")
         {
             ExcelDataPoint point = new ExcelDataPoint();
             point.ReadXml(element, mFolder, xFile);
             this.DataPoints.Add(point);
         }
         else if (element.Name.LocalName == "idx")
         {
             this.Index = element.GetAttributeValueOrDefaultOfInt32Type("val", 0);
         }
         else if (element.Name.LocalName == "order")
         {
             this.Order = element.GetAttributeValueOrDefaultOfInt32Type("val", 0);
         }
         else if (element.Name.LocalName == "spPr")
         {
             ExcelChartFormat format = new ExcelChartFormat();
             format.ReadXml(element, mFolder, xFile);
             this.Format = format;
         }
         else if (element.Name.LocalName == "tx")
         {
             ExcelSeriesName name = new ExcelSeriesName();
             name.ReadXml(element);
             this.SeriesName = name;
         }
         else if (element.Name.LocalName == "val")
         {
             ExcelSeriesValue value2 = new ExcelSeriesValue();
             value2.ReadXml(element);
             this.SeriesValue = value2;
         }
         else if (element.Name.LocalName == "marker")
         {
             ExcelDataMarker marker = new ExcelDataMarker();
             marker.ReadXml(element, mFolder, xFile);
             this.Marker = marker;
         }
     }
 }
Exemple #2
0
 internal void ReadXml(XElement node, MemoryFolder mFolder, XFile xFile)
 {
     foreach (XElement element in node.Elements())
     {
         if (element.Name.LocalName == "cat")
         {
             ExcelCategoryAxisData data = new ExcelCategoryAxisData();
             data.ReadXml(element);
             this.CategoryAxisData = data;
         }
         else if (element.Name.LocalName == "dLbls")
         {
             ExcelDataLabels labels = new ExcelDataLabels();
             labels.ReadXml(element, mFolder, xFile);
             this.DataLabels = labels;
         }
         else if (element.Name.LocalName == "dPt")
         {
             ExcelDataPoint point = new ExcelDataPoint();
             point.ReadXml(element, mFolder, xFile);
             this.DataPoints.Add(point);
         }
         else if (element.Name.LocalName == "errBars")
         {
             ExcelErrorBars bars = new ExcelErrorBars();
             bars.ReadXml(element, mFolder, xFile);
             if (this.FirstErrorBars == null)
             {
                 this.FirstErrorBars = bars;
             }
             else
             {
                 this.SecondErrorBars = bars;
             }
         }
         else if (element.Name.LocalName == "idx")
         {
             this.Index = element.GetAttributeValueOrDefaultOfInt32Type("val", 0);
         }
         else if (element.Name.LocalName == "order")
         {
             this.Order = element.GetAttributeValueOrDefaultOfInt32Type("val", 0);
         }
         else if (element.Name.LocalName == "spPr")
         {
             ExcelChartFormat format = new ExcelChartFormat();
             format.ReadXml(element, mFolder, xFile);
             this.Format = format;
         }
         else if (element.Name.LocalName == "trendline")
         {
             ExcelTrendLine line = new ExcelTrendLine();
             line.ReadXml(element, mFolder, xFile);
             this.Trendlines.Add(line);
         }
         else if (element.Name.LocalName == "tx")
         {
             ExcelSeriesName name = new ExcelSeriesName();
             name.ReadXml(element);
             this.SeriesName = name;
         }
         else if (element.Name.LocalName == "val")
         {
             ExcelSeriesValue value2 = new ExcelSeriesValue();
             value2.ReadXml(element);
             this.SeriesValue = value2;
         }
         else if (element.Name.LocalName == "pictureOptions")
         {
             Dt.Xls.Chart.PictureOptions options = new Dt.Xls.Chart.PictureOptions();
             options.ReadXml(element, mFolder, xFile);
             this.PictureOptions = options;
         }
     }
 }
Exemple #3
0
 internal void ReadXml(XElement node, MemoryFolder mFolder, XFile xFile)
 {
     foreach (XElement element in node.Elements())
     {
         if (element.Name.LocalName == "xVal")
         {
             ExcelCategoryAxisData data = new ExcelCategoryAxisData();
             data.ReadXml(element);
             this.CategoryAxisData = data;
         }
         else if (element.Name.LocalName == "dLbls")
         {
             ExcelDataLabels labels = new ExcelDataLabels();
             labels.ReadXml(element, mFolder, xFile);
             this.DataLabels = labels;
         }
         else if (element.Name.LocalName == "dPt")
         {
             ExcelDataPoint point = new ExcelDataPoint();
             point.ReadXml(element, mFolder, xFile);
             this.DataPoints.Add(point);
         }
         else if (element.Name.LocalName == "errBars")
         {
             ExcelErrorBars bars = new ExcelErrorBars();
             bars.ReadXml(element, mFolder, xFile);
             if (this.FirstErrorBars == null)
             {
                 this.FirstErrorBars = bars;
             }
             else
             {
                 this.SecondErrorBars = bars;
             }
         }
         else if (element.Name.LocalName == "idx")
         {
             this.Index = element.GetAttributeValueOrDefaultOfInt32Type("val", 0);
         }
         else if (element.Name.LocalName == "order")
         {
             this.Order = element.GetAttributeValueOrDefaultOfInt32Type("val", 0);
         }
         else if (element.Name.LocalName == "spPr")
         {
             ExcelChartFormat format = new ExcelChartFormat();
             format.ReadXml(element, mFolder, xFile);
             this.Format = format;
         }
         else if (element.Name.LocalName == "trendline")
         {
             ExcelTrendLine line = new ExcelTrendLine();
             line.ReadXml(element, mFolder, xFile);
             this.Trendlines.Add(line);
         }
         else if (element.Name.LocalName == "tx")
         {
             ExcelSeriesName name = new ExcelSeriesName();
             name.ReadXml(element);
             this.SeriesName = name;
         }
         else if (element.Name.LocalName == "yVal")
         {
             ExcelSeriesValue value2 = new ExcelSeriesValue();
             value2.ReadXml(element);
             this.SeriesValue = value2;
         }
         else if (element.Name.LocalName == "invertIfNegative")
         {
             this.InvertIfNegative = element.GetAttributeValueOrDefaultOfBooleanType("val", true);
         }
         else if (element.Name.LocalName == "bubble3D")
         {
             this.Bubble3D = element.GetAttributeValueOrDefaultOfBooleanType("val", true);
         }
         else if (element.Name.LocalName == "bubbleSize")
         {
             ExcelSeriesValue value3 = new ExcelSeriesValue();
             value3.ReadXml(element);
             this.BubbleSize = value3;
         }
     }
 }
Exemple #4
0
 internal void ReadXml(XElement node, MemoryFolder mFolder, XFile xFile)
 {
     foreach (XElement element in node.Elements())
     {
         if (element.Name.LocalName == "invertIfNegative")
         {
             this.InvertIfNegative = element.GetAttributeValueOrDefaultOfBooleanType("val", true);
         }
         else if (element.Name.LocalName == "cat")
         {
             ExcelCategoryAxisData data = new ExcelCategoryAxisData();
             data.ReadXml(element);
             this.CategoryAxisData = data;
         }
         else if (element.Name.LocalName == "dLbls")
         {
             ExcelDataLabels labels = new ExcelDataLabels();
             labels.ReadXml(element, mFolder, xFile);
             this.DataLabels = labels;
         }
         else if (element.Name.LocalName == "dPt")
         {
             ExcelDataPoint point = new ExcelDataPoint();
             point.ReadXml(element, mFolder, xFile);
             this.DataPoints.Add(point);
         }
         else if (element.Name.LocalName == "errBars")
         {
             ExcelErrorBars bars = new ExcelErrorBars();
             bars.ReadXml(element, mFolder, xFile);
             this.ErrorBars = bars;
         }
         else if (element.Name.LocalName == "idx")
         {
             this.Index = element.GetAttributeValueOrDefaultOfInt32Type("val", 0);
         }
         else if (element.Name.LocalName == "order")
         {
             this.Order = element.GetAttributeValueOrDefaultOfInt32Type("val", 0);
         }
         else if (element.Name.LocalName == "spPr")
         {
             ExcelChartFormat format = new ExcelChartFormat();
             format.ReadXml(element, mFolder, xFile);
             this.Format = format;
         }
         else if (element.Name.LocalName == "trendline")
         {
             ExcelTrendLine line = new ExcelTrendLine();
             line.ReadXml(element, mFolder, xFile);
             this.Trendlines.Add(line);
         }
         else if (element.Name.LocalName == "tx")
         {
             ExcelSeriesName name = new ExcelSeriesName();
             name.ReadXml(element);
             this.SeriesName = name;
         }
         else if (element.Name.LocalName == "val")
         {
             ExcelSeriesValue value2 = new ExcelSeriesValue();
             value2.ReadXml(element);
             this.SeriesValue = value2;
         }
         else if (element.Name.LocalName == "pictureOptions")
         {
             Dt.Xls.Chart.PictureOptions options = new Dt.Xls.Chart.PictureOptions();
             options.ReadXml(element, mFolder, xFile);
             this.PictureOptions = options;
         }
         else if (element.Name.LocalName == "extLst")
         {
             foreach (XElement element2 in element.Elements())
             {
                 if (element2.Name.LocalName == "ext")
                 {
                     foreach (XElement element3 in element2.Elements())
                     {
                         if (element3.Name.LocalName == "invertSolidFillFmt")
                         {
                             foreach (XElement element4 in element3.Elements())
                             {
                                 if (element4.Name.LocalName == "spPr")
                                 {
                                     foreach (XElement element5 in element4.Elements())
                                     {
                                         if (element5.Name.LocalName == "solidFill")
                                         {
                                             SolidFillFormat format2 = new SolidFillFormat();
                                             format2.ReadXml(element5);
                                             this.NegativeSolidFillFormat = format2;
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }