Пример #1
0
        private void LoadVisibility(XmlNode visibilityNode)
        {
            XmlNodeList nodeList = visibilityNode.ChildNodes;

            foreach (XmlNode node in nodeList)
            {
                if (node.Name == "Hidden")
                {
                    component.Visible = !UnitsConverter.BooleanToBool(node.InnerText);
                }
            }
        }
Пример #2
0
        private void LoadTextbox(XmlNode textboxNode)
        {
            if (parent is TableCell)
            {
                component = (TableCell)parent;
            }
            else
            {
                component = ComponentsFactory.CreateTextObject(textboxNode.Attributes["Name"].Value, parent);
            }
            XmlNodeList nodeList = textboxNode.ChildNodes;

            LoadReportItem(nodeList);
            foreach (XmlNode node in nodeList)
            {
                if (node.Name == "CanGrow")
                {
                    (component as TextObject).CanGrow = UnitsConverter.BooleanToBool(node.InnerText);
                }
                else if (node.Name == "CanShrink")
                {
                    (component as TextObject).CanShrink = UnitsConverter.BooleanToBool(node.InnerText);
                }
                else if (node.Name == "HideDuplicates")
                {
                    (component as TextObject).Duplicates = Duplicates.Hide;
                }
                else if (node.Name == "Value")
                {
                    (component as TextObject).Text = node.InnerText;
                }
                else if (node.Name == "Paragraphs")
                {
                    LoadParagraphs(node);
                }
            }
        }