private void LoadShape(string name, Base parent) { string description = GetObjectDescription(name); ShapeObject shape = ComponentsFactory.CreateShapeObject(name, parent); LoadComponent(description, shape); LoadSize(description, shape); shape.Border.Color = UnitsConverter.ConvertColor(GetPropertyValue("ForeColor", description)); shape.FillColor = UnitsConverter.ConvertBackColor(GetPropertyValue("FillColor", description)); shape.Shape = UnitsConverter.ConvertShape(GetPropertyValue("Shape", description)); string width = GetPropertyValue("LineWidth", description); if (!String.IsNullOrEmpty(width)) { shape.Border.Width = Convert.ToSingle(width); } shape.Style = GetPropertyValue("StyleName", description).Replace("\"", ""); }
private void LoadShape(XmlNode node, Base parent) { ShapeObject shape = ComponentsFactory.CreateShapeObject(node.Name, parent); AddLocalizationItemsAttributes(node); LoadComponent(node, shape); LoadSize(node, shape); shape.Border.Color = UnitsConverter.ConvertColor(GetAttribute(node, "ForeColor")); shape.FillColor = UnitsConverter.ConvertBackColor(GetAttribute(node, "BackColor")); shape.Shape = UnitsConverter.ConvertShape(GetAttribute(node, "Shape")); string width = GetAttribute(node, "Width"); if (!String.IsNullOrEmpty(width)) { shape.Border.Width = Convert.ToSingle(width); } ApplyStyle(node, shape); }
private void LoadRectangle(XmlNode rectangleNode) { XmlNodeList nodeList = rectangleNode.ChildNodes; if (RectangleExistReportItem(nodeList)) { LoadContainerRectangle(rectangleNode); return; } component = ComponentsFactory.CreateShapeObject(rectangleNode.Attributes["Name"].Value, parent); (component as ShapeObject).Shape = ShapeKind.Rectangle; LoadReportItem(nodeList); foreach (XmlNode node in nodeList) { if (node.Name == "ReportItems") { LoadReportItems(node); } } }
private void LoadObjects() { DataBand band = ComponentsFactory.CreateDataBand(page); band.Height = page.PaperHeight * Units.Millimeters; List <int> objects = GetAllObjectsLL(); foreach (int index in objects) { string objectName = GetValueLL("ObjectName", index); switch (objectName) { case "Text": TextObject textObj = ComponentsFactory.CreateTextObject("", band); LoadTextObject(index, textObj); break; case "Line": LineObject lineObj = ComponentsFactory.CreateLineObject("", band); LoadLineObject(index, lineObj); break; case "Rectangle": ShapeObject rectangle = ComponentsFactory.CreateShapeObject("", band); LoadRectangle(index, rectangle); break; case "Ellipse": ShapeObject ellipse = ComponentsFactory.CreateShapeObject("", band); LoadEllipse(index, ellipse); break; case "Picture": PictureObject pictureObj = ComponentsFactory.CreatePictureObject("", band); LoadPictureObject(index, pictureObj); break; } } }