public ActionElement(Container parent, Rdl.Engine.ReportElement reportItem, BoxStyle style ) : base(parent, reportItem, style) { }
internal int AddStyle(BoxStyle style) { for (int i = 0; i < _styleList.Count; i++) { if (_styleList[i].GetType() == style.GetType() && _styleList[i].Equals(style)) { return(i); } } _styleList.Add(style); return(_styleList.Count - 1); }
internal Element(Container parent, Rdl.Engine.ReportElement reportElement, BoxStyle style) { _parentElement = parent; if (_parentElement != null) { _genericRender = _parentElement._genericRender; } _reportElement = reportElement; if (style != null && reportElement != null) { _styleIndex = Render.AddStyle(style); } _toggles = new Toggles(this); }
private decimal ElementHeight(Rdl.Render.GenericRender rpt, Element elmt) { decimal height = elmt.TotalHeight(false); BoxStyle bs = rpt.StyleList[elmt.StyleIndex]; if (bs.BorderStyle.Top != Rdl.Engine.BorderStyle.BorderStyleEnum.None) { height -= bs.BorderWidth.Top.points; } if (bs.BorderStyle.Bottom != Rdl.Engine.BorderStyle.BorderStyleEnum.None) { height -= bs.BorderWidth.Bottom.points; } height -= bs.PaddingTop.points; height -= bs.PaddingBottom.points; return(height); }
private decimal ElementWidth(Rdl.Render.GenericRender rpt, Element elmt) { decimal width = elmt.TotalWidth(false); BoxStyle bs = rpt.StyleList[elmt.StyleIndex]; if (bs.BorderStyle.Left != Rdl.Engine.BorderStyle.BorderStyleEnum.None) { width -= bs.BorderWidth.Left.points; } if (bs.BorderStyle.Right != Rdl.Engine.BorderStyle.BorderStyleEnum.None) { width -= bs.BorderWidth.Right.points; } width -= bs.PaddingLeft.points; width -= bs.PaddingRight.points; return(width); }
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 && Color.Equals(bs.Color) && PaddingLeft.Equals(bs.PaddingLeft) && PaddingRight.Equals(bs.PaddingRight) && PaddingTop.Equals(bs.PaddingTop) && PaddingBottom.Equals(bs.PaddingBottom)); }
internal ChartElement(Container parent, Rdl.Engine.ReportElement reportElement, BoxStyle style, Rdl.Runtime.Context context) : base(parent, reportElement, style) { _context = context; }
internal Container(Container parent, Rdl.Engine.ReportElement reportElement, BoxStyle style) : base(parent, reportElement, style) { }
internal TextElement(Container parent, Rdl.Engine.ReportElement reportElement, string name, string text, BoxStyle style, Rdl.Runtime.Context context) : base(parent, reportElement, style) { _name = name; _text = text; Rdl.Engine.TextBox tb = reportElement as Rdl.Engine.TextBox; if (tb != null) { if (((Rdl.Engine.TextBox)reportElement).ToggleImage != null) { _toggleState = (((Rdl.Engine.TextBox)reportElement).ToggleImage.InitialState(context)) ? ToggleStateEnum.open : ToggleStateEnum.closed; } } }
//protected void RecurseAddStyles(Element elmt, int styleBase, ref int styleTop) //{ // elmt.RenderedStyleIndex = elmt.StyleIndex + styleBase; // if (elmt.ReportElement is Rdl.Engine.SubReport) // { // styleBase = styleTop; // Rdl.Engine.Report rpt = ((Rdl.Engine.SubReport)elmt.ReportElement).GetSubReport(); // styleTop += AddStyles(rpt, styleBase); // } // if (elmt is Container) // foreach (Element child in ((Container)elmt).Children) // { // RecurseAddStyles(child, styleBase, ref styleTop); // } //} 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(" Padding: " + style.PaddingTop.points.ToString() + "pt " + style.PaddingRight.points.ToString() + "pt " + style.PaddingBottom.points.ToString() + "pt " + style.PaddingLeft.points.ToString() + "pt;"); _styles.AppendLine(" background-color: " + style.BackgroundColor + ";"); if (style.BackgroundImage != null) { //_styles.AppendLine(" background-image: URL(" + GetImageUrl("Image", style.BackgroundImage.Name) + ");"); _styles.AppendLine(" background-repeat: " + style.BackgroundImage.ImageRepeat.ToString() + ";"); } _styles.AppendLine(" color: " + style.Color + ";"); 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() + ";"); if (ts.TextAlign.ToString().ToLower() != "general") { _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("}"); }
public TableContainer(Container parent, Rdl.Engine.ReportElement reportElement, BoxStyle style) : base(parent, reportElement, style) { Rows = new TableRows(this); Columns = new TableColumns(this); }