コード例 #1
0
        private void LoadTableCell(string name, TableCell cell)
        {
            string description = GetObjectDescription(name);

            cell.Name      = name;
            cell.FillColor = UnitsConverter.ConvertBackColor(GetPropertyValue("BackColor", description));
            cell.TextColor = UnitsConverter.ConvertColor(GetPropertyValue("ForeColor", description));
            cell.Text      = GetPropertyValue("Text", description).Replace("\"", "");
            cell.HorzAlign = UnitsConverter.ConvertTextAlignmentToHorzAlign(GetPropertyValue("TextAlignment", description));
            cell.VertAlign = UnitsConverter.ConvertTextAlignmentToVertAlign(GetPropertyValue("TextAlignment", description));
            cell.Font      = LoadFont(description);
            ApplyStyleByName(cell, GetPropertyValue("StyleName", description).Replace("\"", ""));
        }
コード例 #2
0
 private void LoadTableCell(XmlNode node, TableCell cell)
 {
     AddLocalizationItemsAttributes(node);
     cell.Name      = GetAttribute(node, "Name");
     cell.Text      = GetAttribute(node, "Text");
     cell.FillColor = UnitsConverter.ConvertBackColor(GetAttribute(node, "BackColor"));
     cell.TextColor = UnitsConverter.ConvertColor(GetAttribute(node, "ForeColor"));
     cell.HorzAlign = UnitsConverter.ConvertTextAlignmentToHorzAlign(GetAttribute(node, "TextAlignment"));
     cell.VertAlign = UnitsConverter.ConvertTextAlignmentToVertAlign(GetAttribute(node, "TextAlignment"));
     cell.Font      = LoadFontXml(GetAttribute(node, "Font"));
     ApplyStyle(node, cell);
     LoadObjects(node, cell);
 }
コード例 #3
0
        private void LoadLabel(XmlNode node, Base parent)
        {
            TextObject text = ComponentsFactory.CreateTextObject(node.Name, parent);

            AddLocalizationItemsAttributes(node);
            LoadComponent(node, text);
            LoadSize(node, text);
            LoadBorder(node, text.Border);
            text.Font      = LoadFontXml(GetAttribute(node, "Font"));
            text.Text      = GetAttribute(node, "Text");
            text.FillColor = UnitsConverter.ConvertBackColor(GetAttribute(node, "BackColor"));
            text.TextColor = UnitsConverter.ConvertColor(GetAttribute(node, "ForeColor"));
            text.HorzAlign = UnitsConverter.ConvertTextAlignmentToHorzAlign(GetAttribute(node, "TextAlignment"));
            text.VertAlign = UnitsConverter.ConvertTextAlignmentToVertAlign(GetAttribute(node, "TextAlignment"));
            ApplyStyle(node, text);
        }
コード例 #4
0
        private void LoadLabel(string name, Base parent)
        {
            string     description = GetObjectDescription(name);
            TextObject text        = ComponentsFactory.CreateTextObject(name, parent);

            LoadComponent(description, text);
            LoadSize(description, text);
            LoadBorder(description, text.Border);
            text.Name      = name;
            text.FillColor = UnitsConverter.ConvertBackColor(GetPropertyValue("BackColor", description));
            text.TextColor = UnitsConverter.ConvertColor(GetPropertyValue("ForeColor", description));
            text.Text      = GetPropertyValue("Text", description).Replace("\"", "");
            text.HorzAlign = UnitsConverter.ConvertTextAlignmentToHorzAlign(GetPropertyValue("TextAlignment", description));
            text.VertAlign = UnitsConverter.ConvertTextAlignmentToVertAlign(GetPropertyValue("TextAlignment", description));
            text.Font      = LoadFont(description);
            ApplyStyleByName(text, GetPropertyValue("StyleName", description).Replace("\"", ""));
        }
コード例 #5
0
        private void ApplyStyle(XmlNode node, ReportComponentBase component)
        {
            string  stylename     = GetAttribute(node, "StyleName");
            XmlNode stylePriority = FindChildNoteByName(node, "StylePriority");
            //if (stylePriority == null)
            //    return;
            XmlNode styleNode = GetStyleNode(stylename);

            foreach (Style style in Report.Styles)
            {
                if (style.Name == stylename)
                {
                    if (stylePriority == null || !AttributeExist(stylePriority, "UseFont"))
                    {
                        if (component as TextObject != null)
                        {
                            (component as TextObject).Font = style.Font;
                        }
                    }

                    if (stylePriority == null || !AttributeExist(stylePriority, "UseTextAlignment"))
                    {
                        if (component as TextObject != null)
                        {
                            (component as TextObject).HorzAlign = UnitsConverter.ConvertTextAlignmentToHorzAlign(GetAttribute(styleNode, "TextAlignment"));
                            (component as TextObject).VertAlign = UnitsConverter.ConvertTextAlignmentToVertAlign(GetAttribute(styleNode, "TextAlignment"));
                        }
                    }

                    if (stylePriority == null || !AttributeExist(stylePriority, "UseBorder"))
                    {
                        component.Border = style.Border;
                    }

                    if (stylePriority == null || !AttributeExist(stylePriority, "UseForeColor"))
                    {
                        if (component as TextObject != null)
                        {
                            (component as TextObject).TextColor = (style.TextFill as SolidFill).Color;
                        }
                    }
                }
            }
        }