protected void SetValueColor(XmlHelper helper, string path, ExcelDxfColor color) { if (color != null && color.HasValue) { if (color.Color != null) { SetValue(helper, path + "/@rgb", color.Color.Value.ToArgb().ToString("x")); } else if (color.Auto != null) { SetValueBool(helper, path + "/@auto", color.Auto); } else if (color.Theme != null) { SetValue(helper, path + "/@theme", color.Theme); } else if (color.Index != null) { SetValue(helper, path + "/@indexed", color.Index); } if (color.Tint != null) { SetValue(helper, path + "/@tint", color.Tint); } } }
private ExcelDxfColor GetColor(XmlHelperInstance helper, string path) { ExcelDxfColor ret = new ExcelDxfColor(_styles); ret.Theme = (eThemeSchemeColor?)helper.GetXmlNodeIntNull(path + "/@theme"); ret.Index = helper.GetXmlNodeIntNull(path + "/@indexed"); string rgb = helper.GetXmlNodeString(path + "/@rgb"); if (rgb != "") { ret.Color = Color.FromArgb(int.Parse(rgb.Replace("#", ""), NumberStyles.HexNumber)); } ret.Auto = helper.GetXmlNodeBoolNullable(path + "/@auto"); ret.Tint = helper.GetXmlNodeDoubleNull(path + "/@tint"); return(ret); }
private ExcelDxfColor GetColor(XmlHelperInstance helper, string path) { ExcelDxfColor ret = new ExcelDxfColor(_styles); ret.Theme = helper.GetXmlNodeIntNull(path + "/@theme"); ret.Index = helper.GetXmlNodeIntNull(path + "/@index"); string rgb = helper.GetXmlNodeString(path + "/@rgb"); if (rgb != "") { ret.Color = Color.FromArgb(int.Parse(rgb.Substring(0, 2), System.Globalization.NumberStyles.AllowHexSpecifier), int.Parse(rgb.Substring(2, 2), System.Globalization.NumberStyles.AllowHexSpecifier), int.Parse(rgb.Substring(4, 2), System.Globalization.NumberStyles.AllowHexSpecifier), int.Parse(rgb.Substring(6, 2), System.Globalization.NumberStyles.AllowHexSpecifier)); } ret.Auto = helper.GetXmlNodeBoolNullable(path + "/@auto"); ret.Tint = helper.GetXmlNodeDoubleNull(path + "/@tint"); return(ret); }
public ExcelDxfFontBase(ExcelStyles styles) : base(styles) { Color = new ExcelDxfColor(styles); }
internal ExcelDxfBorderItem(ExcelStyles styles) : base(styles) { Color = new ExcelDxfColor(styles); }
public ExcelDxfFill(ExcelStyles styles) : base(styles) { PatternColor = new ExcelDxfColor(styles); BackgroundColor = new ExcelDxfColor(styles); }
internal ExcelDxfFontBase(ExcelStyles styles) : base(styles) { Color = new ExcelDxfColor(styles); }