Free cookie consent management tool by TermsFeed Policy Generator

source: branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.EPPlus/3.1.3/EPPlus-3.1.3/Style/Dxf/ExcelDxfFontBase.cs @ 10187

Last change on this file since 10187 was 9580, checked in by sforsten, 11 years ago

#1730:

  • added SymbolicDataAnalysisExpressionExcelFormatter
  • changed modifiers in SymbolicExpressionTreeChart of methods SaveImageAsBitmap and SaveImageAsEmf to public
  • added menu item ExportSymbolicSolutionToExcelMenuItem to export a symbolic solution to an excel file
  • added EPPlus-3.1.3 to ExtLibs
File size: 2.6 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Drawing;
6using System.Xml;
7
8namespace OfficeOpenXml.Style.Dxf
9{
10    public class ExcelDxfFontBase : DxfStyleBase<ExcelDxfFontBase>
11    {
12        public ExcelDxfFontBase(ExcelStyles styles)
13            : base(styles)
14        {
15            Color = new ExcelDxfColor(styles);
16        }
17        /// <summary>
18        /// Font bold
19        /// </summary>
20        public bool? Bold
21        {
22            get;
23            set;
24        }
25        /// <summary>
26        /// Font Italic
27        /// </summary>
28        public bool? Italic
29        {
30            get;
31            set;
32        }
33        /// <summary>
34        /// Font-Strikeout
35        /// </summary>
36        public bool? Strike { get; set; }
37        //public float? Size { get; set; }
38        public ExcelDxfColor Color { get; set; }
39        //public string Name { get; set; }
40        //public int? Family { get; set; }
41        ///// <summary>
42        ///// Font-Vertical Align
43        ///// </summary>
44        //public ExcelVerticalAlignmentFont? VerticalAlign
45        //{
46        //    get;
47        //    set;
48        //}
49
50        public ExcelUnderLineType? Underline { get; set; }
51
52        protected internal override string Id
53        {
54            get
55            {
56                return GetAsString(Bold) + "|" + GetAsString(Italic) + "|" + GetAsString(Strike) + "|" + (Color ==null ? "" : Color.Id) + "|" /*+ GetAsString(VerticalAlign) + "|"*/ + GetAsString(Underline);
57            }
58        }
59
60        protected internal override void CreateNodes(XmlHelper helper, string path)
61        {
62            helper.CreateNode(path);
63            SetValueBool(helper, path + "/d:b/@val", Bold);
64            SetValueBool(helper, path + "/d:i/@val", Italic);
65            SetValueBool(helper, path + "/d:strike", Strike);
66            SetValue(helper, path + "/d:u/@val", Underline);
67            SetValueColor(helper, path + "/d:color", Color);
68        }
69        protected internal override bool HasValue
70        {
71            get
72            {
73                return Bold != null ||
74                       Italic != null ||
75                       Strike != null ||
76                       Underline != null ||
77                       Color.HasValue;
78            }
79        }
80        protected internal override ExcelDxfFontBase Clone()
81        {
82            return new ExcelDxfFontBase(_styles) { Bold = Bold, Color = Color.Clone(), Italic = Italic, Strike = Strike, Underline = Underline };
83        }
84    }
85}
Note: See TracBrowser for help on using the repository browser.