2using System.Collections.Generic;
15 private readonly
string tableId;
16 private readonly
string name;
17 private readonly
Column[] columns;
41 List<Column>
Columns =
new List<Column>();
43 foreach (XmlNode N
in Xml.ChildNodes)
45 if (N is XmlElement E && E.LocalName ==
"Column")
49 string DataSourceId = E.HasAttribute(
"dataSourceId") ?
XML.
Attribute(E,
"dataSourceId") :
null;
50 string Partition = E.HasAttribute(
"partition") ?
XML.
Attribute(E,
"partition") :
null;
54 byte? NrDecimals = E.HasAttribute(
"nrDecimals") ? (byte)
XML.
Attribute(E,
"nrDecimals", 0) : (
byte?)
null;
56 Columns.Add(
new Column(ColumnId, Header, DataSourceId, Partition, FgColor, BgColor, Alignment, NrDecimals));
60 this.columns =
Columns.ToArray();
71 public string Name => this.name;
84 Output.WriteStartElement(
"TableStart");
85 Output.WriteAttributeString(
"tableId", this.tableId);
86 Output.WriteAttributeString(
"name", this.name);
88 if (!(this.columns is
null))
92 Output.WriteStartElement(
"Column");
103 Output.WriteAttributeString(
"fgColor",
Column.
FgColor.ToString());
106 Output.WriteAttributeString(
"bgColor",
Column.
BgColor.ToString());
114 Output.WriteEndElement();
118 Output.WriteEndElement();
Abstract base class for report elements.
override void ExportXml(XmlWriter Output)
Exports element to XML
ReportTableCreated(XmlElement Xml)
Creation of a table.
ReportTableCreated(string TableId, string Name, Column[] Columns)
Creation of a table.
Helps with common XML-related tasks.
static string Attribute(XmlElement E, string Name)
Gets the value of an XML attribute.
static SKColor ToColor(object Object)
Converts an object to a color.
Defines a column in a table.
SKColor? FgColor
Optional Foreground Color.
string Partition
Optional partition reference.
SKColor? BgColor
Optional Background Color.
string Header
Optional localized header.
string DataSourceId
Optional Data Suorce ID reference.
byte? NrDecimals
Optional Number of Decimals.
ColumnAlignment? Alignment
Optional Column Alignment.
ColumnAlignment
Column alignment.