Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using System.Xml;
|
---|
6 |
|
---|
7 | namespace 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.