Free cookie consent management tool by TermsFeed Policy Generator

source: branches/2915-AbsoluteSymbol/HeuristicLab.ExtLibs/HeuristicLab.EPPlus/4.0.3/EPPlus-4.0.3/Style/Dxf/ExcelDxfBorderItem.cs @ 16300

Last change on this file since 16300 was 12074, checked in by sraggl, 10 years ago

#2341: Added EPPlus-4.0.3 to ExtLibs

File size: 1.3 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Xml;
6
7namespace OfficeOpenXml.Style.Dxf
8{
9    public class ExcelDxfBorderItem : DxfStyleBase<ExcelDxfBorderItem>
10    {
11        internal ExcelDxfBorderItem(ExcelStyles styles) :
12            base(styles)
13        {
14            Color=new ExcelDxfColor(styles);
15        }
16        public ExcelBorderStyle? Style { get; set;}
17        public ExcelDxfColor Color { get; internal set; }
18
19        protected internal override string Id
20        {
21            get
22            {
23                return GetAsString(Style) + "|" + (Color == null ? "" : Color.Id);
24            }
25        }
26
27        protected internal override void CreateNodes(XmlHelper helper, string path)
28        {           
29            SetValueEnum(helper, path + "/@style", Style);
30            SetValueColor(helper, path + "/d:color", Color);
31        }
32        protected internal override bool HasValue
33        {
34            get
35            {
36                return Style != null || Color.HasValue;
37            }
38        }
39        protected internal override ExcelDxfBorderItem Clone()
40        {
41            return new ExcelDxfBorderItem(_styles) { Style = Style, Color = Color };
42        }
43    }
44}
Note: See TracBrowser for help on using the repository browser.