internal void FromColorScale(X14.ColorScale cs) { this.SetAllNull(); SLConditionalFormattingValueObject2010 cfvo; SLColor clr; using (OpenXmlReader oxr = OpenXmlReader.Create(cs)) { while (oxr.Read()) { if (oxr.ElementType == typeof(X14.ConditionalFormattingValueObject)) { cfvo = new SLConditionalFormattingValueObject2010(); cfvo.FromConditionalFormattingValueObject((X14.ConditionalFormattingValueObject)oxr.LoadCurrentElement()); this.Cfvos.Add(cfvo); } else if (oxr.ElementType == typeof(X14.Color)) { clr = new SLColor(new List<System.Drawing.Color>(), new List<System.Drawing.Color>()); clr.FromExcel2010Color((X14.Color)oxr.LoadCurrentElement()); this.Colors.Add(clr); } } } }
internal void FromColorScale(X14.ColorScale cs) { this.SetAllNull(); SLConditionalFormattingValueObject2010 cfvo; SLColor clr; using (OpenXmlReader oxr = OpenXmlReader.Create(cs)) { while (oxr.Read()) { if (oxr.ElementType == typeof(X14.ConditionalFormattingValueObject)) { cfvo = new SLConditionalFormattingValueObject2010(); cfvo.FromConditionalFormattingValueObject((X14.ConditionalFormattingValueObject)oxr.LoadCurrentElement()); this.Cfvos.Add(cfvo); } else if (oxr.ElementType == typeof(X14.Color)) { clr = new SLColor(new List <System.Drawing.Color>(), new List <System.Drawing.Color>()); clr.FromExcel2010Color((X14.Color)oxr.LoadCurrentElement()); this.Colors.Add(clr); } } } }
internal void FromIconSet(X14.IconSet ics) { this.SetAllNull(); if (ics.IconSetTypes != null) { this.IconSetType = ics.IconSetTypes.Value; } if (ics.ShowValue != null) { this.ShowValue = ics.ShowValue.Value; } if (ics.Percent != null) { this.Percent = ics.Percent.Value; } if (ics.Reverse != null) { this.Reverse = ics.Reverse.Value; } using (OpenXmlReader oxr = OpenXmlReader.Create(ics)) { SLConditionalFormattingValueObject2010 cfvo; SLConditionalFormattingIcon2010 cfi; while (oxr.Read()) { if (oxr.ElementType == typeof(X14.ConditionalFormattingValueObject)) { cfvo = new SLConditionalFormattingValueObject2010(); cfvo.FromConditionalFormattingValueObject((X14.ConditionalFormattingValueObject)oxr.LoadCurrentElement()); this.Cfvos.Add(cfvo); } else if (oxr.ElementType == typeof(X14.ConditionalFormattingIcon)) { cfi = new SLConditionalFormattingIcon2010(); cfi.FromConditionalFormattingIcon((X14.ConditionalFormattingIcon)oxr.LoadCurrentElement()); this.CustomIcons.Add(cfi); } } } }
internal void FromIconSet(X14.IconSet ics) { this.SetAllNull(); if (ics.IconSetTypes != null) this.IconSetType = ics.IconSetTypes.Value; if (ics.ShowValue != null) this.ShowValue = ics.ShowValue.Value; if (ics.Percent != null) this.Percent = ics.Percent.Value; if (ics.Reverse != null) this.Reverse = ics.Reverse.Value; using (OpenXmlReader oxr = OpenXmlReader.Create(ics)) { SLConditionalFormattingValueObject2010 cfvo; SLConditionalFormattingIcon2010 cfi; while (oxr.Read()) { if (oxr.ElementType == typeof(X14.ConditionalFormattingValueObject)) { cfvo = new SLConditionalFormattingValueObject2010(); cfvo.FromConditionalFormattingValueObject((X14.ConditionalFormattingValueObject)oxr.LoadCurrentElement()); this.Cfvos.Add(cfvo); } else if (oxr.ElementType == typeof(X14.ConditionalFormattingIcon)) { cfi = new SLConditionalFormattingIcon2010(); cfi.FromConditionalFormattingIcon((X14.ConditionalFormattingIcon)oxr.LoadCurrentElement()); this.CustomIcons.Add(cfi); } } } }