Ejemplo n.º 1
0
 internal Element(Container parent, RdlEngine.ReportElement reportElement, BoxStyle style)
 {
     _parentElement = parent;
     _reportElement = reportElement;
     if (style != null)
     {
         _styleIndex = AddStyle(style);
     }
 }
Ejemplo n.º 2
0
        public override bool Equals(object obj)
        {
            BoxStyle bs = obj as BoxStyle;

            return(
                BorderColor.Equals(bs.BorderColor) &&
                BorderStyle.Equals(bs.BorderStyle) &&
                BorderWidth.Equals(bs.BorderWidth) &&
                BackgroundColor.Equals(bs.BackgroundColor) &&
                BackgroundGradientType.Equals(bs.BackgroundGradientType) &&
                BackgroundGradientEndColor.Equals(bs.BackgroundGradientEndColor) &&
                BackgroundImage == bs.BackgroundImage &&
                BackgroundImageType.Equals(bs.BackgroundImageType) &&
                Color.Equals(bs.Color) &&
                PaddingLeft.Equals(bs.PaddingLeft) &&
                PaddingRight.Equals(bs.PaddingRight) &&
                PaddingTop.Equals(bs.PaddingTop) &&
                PaddingBottom.Equals(bs.PaddingBottom));
        }
Ejemplo n.º 3
0
        protected int AddStyle(BoxStyle style)
        {
            if (_parentElement != null)
            {
                return(_parentElement.AddStyle(style));
            }
            else
            {
                if (_baseStyleList == null)
                {
                    _baseStyleList = new List <BoxStyle>();
                }
                for (int i = 0; i < _baseStyleList.Count; i++)
                {
                    if (_baseStyleList[i].GetType() == style.GetType() && _baseStyleList[i].Equals(style))
                    {
                        return(i);
                    }
                }

                _baseStyleList.Add(style);
                return(_baseStyleList.Count - 1);
            }
        }
Ejemplo n.º 4
0
 internal BoxElement(BoxElement parent, RdlEngine.ReportElement reportElement, BoxStyle style)
     : base(parent, reportElement, style)
 {
 }
Ejemplo n.º 5
0
 internal Container(Container parent, RdlEngine.ReportElement reportElement, BoxStyle style)
     : base(parent, reportElement, style)
 {
 }
Ejemplo n.º 6
0
        protected void AddStyle(BoxStyle style, int index)
        {
            _styles.AppendLine(".Report_style" + index.ToString() + " {");
            _styles.AppendLine("    border-left: " +
                               style.BorderWidth.Left.points.ToString() + "pt " +
                               style.BorderStyle.Left.ToString() + " " +
                               style.BorderColor.Left + ";");
            _styles.AppendLine("    border-right: " +
                               style.BorderWidth.Right.points.ToString() + "pt " +
                               style.BorderStyle.Right.ToString() + " " +
                               style.BorderColor.Right + ";");
            _styles.AppendLine("    border-top: " +
                               style.BorderWidth.Top.points.ToString() + "pt " +
                               style.BorderStyle.Top.ToString() + " " +
                               style.BorderColor.Top + ";");
            _styles.AppendLine("    border-bottom: " +
                               style.BorderWidth.Bottom.points.ToString() + "pt " +
                               style.BorderStyle.Bottom.ToString() + " " +
                               style.BorderColor.Bottom + ";");
            _styles.AppendLine("    background-color: " +
                               style.BackgroundColor + ";");
            if (style.BackgroundImage != null)
            {
                _styles.AppendLine("    background-image: URL(Data:" +
                                   style.BackgroundImageType + ";base64," +
                                   Convert.ToBase64String(style.BackgroundImage) + ");");
                _styles.AppendLine("    background-repeat: " +
                                   style.BackgroundImageType + ";");
            }
            _styles.AppendLine("    color: " +
                               style.Color + ";");
            _styles.AppendLine("    Padding: " +
                               style.PaddingTop.points.ToString() + "pt, " +
                               style.PaddingRight.points.ToString() + "pt, " +
                               style.PaddingBottom.points.ToString() + "pt, " +
                               style.PaddingLeft.points.ToString() + "pt;");
            if (style is TextStyle)
            {
                TextStyle ts = style as TextStyle;

                _styles.AppendLine("    font-style: " +
                                   ts.FontStyle.ToString() + ";");
                _styles.AppendLine("    font-family: " +
                                   ts.FontFamily + ";");
                _styles.AppendLine("    font-size: " +
                                   ts.FontSize.points.ToString() + "pt;");
                _styles.AppendLine("    font-weight: " +
                                   ts.FontWeight.ToString().Replace("_", "") + ";");
                _styles.AppendLine("    text-decoration: " +
                                   ts.TextDecoration.ToString() + ";");
                _styles.AppendLine("    text-align: " +
                                   ts.TextAlign.ToString() + ";");
                _styles.AppendLine("    vertical-align: " +
                                   ts.VerticalAlign.ToString() + ";");
                _styles.AppendLine("    line-height: " +
                                   ts.LineHeight.points.ToString() + "pt;");
                _styles.AppendLine("    direction: " +
                                   ts.Direction.ToString() + ";");
                _styles.AppendLine("    unicode-bidi: " +
                                   ts.UnicodeBiDi.ToString() + ";");
            }

            _styles.AppendLine("}");
        }
Ejemplo n.º 7
0
 internal TextElement(Container parent, RdlEngine.ReportElement reportElement, string name, string text, BoxStyle style)
     : base(parent, reportElement, style)
 {
     _name = name;
     _text = text;
     if (reportElement is RdlEngine.TextBox)
     {
         if (((RdlEngine.TextBox)reportElement).ToggleImage != null)
         {
             _toggleState = (((RdlEngine.TextBox)reportElement).ToggleImage.InitialState) ? ToggleStateEnum.open : ToggleStateEnum.closed;
         }
     }
 }
Ejemplo n.º 8
0
 public ImageElement(Container parent, RdlEngine.ReportItem reportItem, BoxStyle style)
     : base(parent, reportItem, style)
 {
 }