private void LoadImage(XmlNode imageNode)
        {
            component = ComponentsFactory.CreatePictureObject(imageNode.Attributes["Name"].Value, parent);
            XmlNodeList nodeList = imageNode.ChildNodes;

            LoadReportItem(nodeList);
            string name = String.Empty;

            foreach (XmlNode node in nodeList)
            {
                //if (node.Name == "Source")
                //{
                //}
                /*else */ if (node.Name == "Value")
                {
                    if (File.Exists(node.InnerText))
                    {
                        (component as PictureObject).ImageLocation = node.InnerText;
                    }
                }
                else if (node.Name == "Sizing")
                {
                    (component as PictureObject).SizeMode = UnitsConverter.ConvertSizing(node.InnerText);
                }
            }
        }
        private void LoadPicture(string name, Base parent)
        {
            string        description = GetObjectDescription(name);
            PictureObject picture     = ComponentsFactory.CreatePictureObject(name, parent);

            LoadComponent(description, picture);
            LoadSize(description, picture);
            picture.SizeMode = UnitsConverter.ConvertImageSizeMode(GetPropertyValue("Sizing", description));
            picture.Style    = GetPropertyValue("StyleName", description).Replace("\"", "");
        }
Beispiel #3
0
        private void LoadPicture(XmlNode node, Base parent)
        {
            PictureObject picture = ComponentsFactory.CreatePictureObject(node.Name, parent);

            AddLocalizationItemsAttributes(node);
            LoadComponent(node, picture);
            LoadSize(node, picture);
            picture.SizeMode   = UnitsConverter.ConvertImageSizeMode(GetAttribute(node, "Sizing"));
            picture.ImageAlign = UnitsConverter.ConvertImageAlignment(GetAttribute(node, "ImageAlignment"));
            ApplyStyle(node, picture);
        }
Beispiel #4
0
        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;
                }
            }
        }