Exemple #1
0
        internal void ReadXml(XElement node)
        {
            string str = node.GetAttributeValueOrDefaultOfStringType("prst", "pct5");
            ChartFormatPatternFillStyle style = ChartFormatPatternFillStyle.Percent05;

            _hatchStyles.TryGetValue(str, out style);
            this.FillPattern = style;
            foreach (XElement element in node.Elements())
            {
                if (element.Name.LocalName == "bgClr")
                {
                    foreach (XElement element2 in element.Elements())
                    {
                        this.BackgroudDrawingColorSettings = new ExcelDrawingColorSettings();
                        this.BackgroundColor = ChartColorHelper.ReadColor(element2, this.BackgroudDrawingColorSettings);
                    }
                }
                else if (element.Name.LocalName == "fgClr")
                {
                    foreach (XElement element3 in element.Elements())
                    {
                        this.ForegroudDrawingColorSettings = new ExcelDrawingColorSettings();
                        this.ForegroundColor = ChartColorHelper.ReadColor(element3, this.ForegroudDrawingColorSettings);
                    }
                }
            }
        }
Exemple #2
0
 internal void WriteXml(XmlWriter writer, MemoryFolder mFolder, XFile chartFile)
 {
     using (writer.WriteElement("pattFill", null, "a"))
     {
         string str = "pct5";
         foreach (KeyValuePair <string, ChartFormatPatternFillStyle> pair in _hatchStyles)
         {
             if (((ChartFormatPatternFillStyle)pair.Value) == this.FillPattern)
             {
                 str = pair.Key;
                 break;
             }
         }
         writer.WriteAttributeString("prst", null, str);
         if (this.ForegroundColor != null)
         {
             using (writer.WriteElement("fgClr", null, "a"))
             {
                 ChartColorHelper.WriteColor(writer, this.ForegroundColor, this.ForegroudDrawingColorSettings);
             }
         }
         if (this.BackgroundColor != null)
         {
             using (writer.WriteElement("bgClr", null, "a"))
             {
                 ChartColorHelper.WriteColor(writer, this.BackgroundColor, this.BackgroudDrawingColorSettings);
             }
         }
     }
 }
Exemple #3
0
 internal void WriteXml(XmlWriter writer, MemoryFolder mFolder, XFile chartFile)
 {
     using (writer.WriteElement("solidFill", null, "a"))
     {
         ChartColorHelper.WriteColor(writer, this.Color, this.DrawingColorSettings);
     }
 }
Exemple #4
0
 internal void ReadXml(XElement node)
 {
     foreach (XElement element in node.Elements())
     {
         this.DrawingColorSettings = new ExcelDrawingColorSettings();
         this.Color = ChartColorHelper.ReadColor(element, this.DrawingColorSettings);
     }
 }
Exemple #5
0
        internal void ReadXml(XElement node)
        {
            double num = node.GetAttributeValueOrDefaultOfDoubleType("pos", 100000.0);

            this.Position = num / 100000.0;
            foreach (XElement element in node.Elements())
            {
                this.DrawingColorSettings = new ExcelDrawingColorSettings();
                this.Color = ChartColorHelper.ReadColor(element, this.DrawingColorSettings);
            }
        }
Exemple #6
0
 internal void WriteXml(XmlWriter writer, MemoryFolder mFolder, XFile chartFile)
 {
     using (writer.WriteElement("gs", null, "a"))
     {
         double num = Math.Round(this.Position, 5) * 100000.0;
         writer.WriteAttributeString("pos", ((double)num).ToString((IFormatProvider)CultureInfo.InvariantCulture));
         if (this.Color != null)
         {
             ChartColorHelper.WriteColor(writer, this.Color, this.DrawingColorSettings);
         }
     }
 }