public AisinoPrintGrid(XmlElement xmlElement_0) : base(xmlElement_0) { this._HeadHeight = 0x10; this._LineHeight = 0x10; this._DataBind = string.Empty; string attribute = xmlElement_0.GetAttribute("LineHeight"); string str2 = xmlElement_0.GetAttribute("IsTitle"); string str3 = xmlElement_0.GetAttribute("DataBind"); string str4 = xmlElement_0.GetAttribute("HeadHeight"); if (string.IsNullOrEmpty(attribute)) { this._LineHeight = 0x10; } else { this._LineHeight = Common.ToInt(attribute); } if (string.IsNullOrEmpty(str4)) { this._HeadHeight = 20; } else { this._HeadHeight = Common.ToInt(str4); } if (!string.IsNullOrEmpty(str2)) { this._IsTitle = Common.ToBool(str2); } XmlNodeList childNodes = xmlElement_0.ChildNodes; if (childNodes.Count > 0) { foreach (XmlNode node in childNodes) { XmlElement element = node as XmlElement; if (node.Name == "GridLabel") { AisinoPrintControl control = new AisinoPrintGridLabel(element, this); base.AddNode(control); } } } this.DataBind = str3; }
public override void Print(PointF pointF_0, Dictionary <string, object> dict, Graphics graphics_0, bool bool_0) { base.Print(pointF_0, dict, graphics_0, bool_0); if (base._isPrint) { PointF absoluteLocation = base.absoluteLocation; if (this.IsTitle) { foreach (AisinoPrintControl control in base.Nodes) { AisinoPrintGridLabel label = control as AisinoPrintGridLabel; if (label != null) { label.PrintHead(absoluteLocation, graphics_0); } } absoluteLocation.Y += this.HeadHeight; } if (this.dataTable_0 != null) { foreach (DataRow row in this.dataTable_0.Rows) { Dictionary <string, object> dictionary = new Dictionary <string, object>(); foreach (DataColumn column in this.dataTable_0.Columns) { dictionary.Add(column.ColumnName, row[column.ColumnName]); } foreach (AisinoPrintControl control2 in base.Nodes) { control2.Print(absoluteLocation, dictionary, graphics_0, bool_0); } absoluteLocation.Y += this.LineHeight; } } } }