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("\"", "");
        }
예제 #2
0
        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);
        }