public static ExportContainer ConvertToContainer(ISimpleContainer container, Point offset) { if (container == null) { throw new ArgumentNullException("item"); } PrintHelper.AdjustParent(container, container.Items); IExportColumnBuilder lineBuilder = container as IExportColumnBuilder; if (lineBuilder != null) { ExportContainer lineItem = (ExportContainer)lineBuilder.CreateExportColumn(); lineItem.StyleDecorator.Location = new Point(offset.X + lineItem.StyleDecorator.Location.X, offset.Y); lineItem.StyleDecorator.DisplayRectangle = new Rectangle(lineItem.StyleDecorator.Location, lineItem.StyleDecorator.Size); StandardPrinter.AdjustBackColor(container); return(lineItem); } return(null); }
public ExportContainer ConvertToContainer(Point offset, ISimpleContainer item) { if (item == null) { throw new ArgumentNullException("item"); } IExportColumnBuilder lineBuilder = item as IExportColumnBuilder; if (lineBuilder != null) { ExportContainer lineItem = (ExportContainer)lineBuilder.CreateExportColumn(); lineItem.StyleDecorator.Location = new Point(lineItem.StyleDecorator.Location.X, offset.Y); return(lineItem); } return(null); }
/// <summary> /// Convert a single item, Location is calculated as follows /// (X = ParentRectangle.X + Item.X Y = offset.Y + Item.Y) /// </summary> /// <param name="offset"> only Y value is used, gives the offset to Items location.Y </param> /// <param name="item">Item to convert</param> /// <returns></returns> private BaseExportColumn ConvertToLineItem(Point offset, BaseReportItem item) { if (item == null) { throw new ArgumentNullException("item"); } IExportColumnBuilder columnBuilder = item as IExportColumnBuilder; BaseExportColumn lineItem = null; if (columnBuilder != null) { lineItem = columnBuilder.CreateExportColumn(); lineItem.StyleDecorator.Location = new Point(this.ParentRectangle.Location.X + lineItem.StyleDecorator.Location.X, lineItem.StyleDecorator.Location.Y + offset.Y); } return(lineItem); }
public static ExportContainer ConvertToContainer(ISimpleContainer item, Point offset) { if (item == null) { throw new ArgumentNullException("item"); } IExportColumnBuilder lineBuilder = item as IExportColumnBuilder; if (lineBuilder != null) { ExportContainer lineItem = (ExportContainer)lineBuilder.CreateExportColumn(); lineItem.StyleDecorator.Location = new Point(offset.X + lineItem.StyleDecorator.Location.X, offset.Y); lineItem.StyleDecorator.DisplayRectangle = new Rectangle(lineItem.StyleDecorator.Location, lineItem.StyleDecorator.Size); return(lineItem); } return(null); }
/// <summary> /// Convert a single item, Location is calculated as follows /// </summary> /// <param name="offset"> only Y value is used, gives the offset to Items location.Y </param> /// <param name="item">Item to convert</param> /// <returns></returns> public static BaseExportColumn ConvertLineItem(BaseReportItem item, Point offset) { if (item == null) { throw new ArgumentNullException("item"); } IExportColumnBuilder columnBuilder = item as IExportColumnBuilder; BaseExportColumn lineItem = null; if (columnBuilder != null) { lineItem = columnBuilder.CreateExportColumn(); lineItem.StyleDecorator.Location = new Point(offset.X + lineItem.StyleDecorator.Location.X, lineItem.StyleDecorator.Location.Y + offset.Y); lineItem.StyleDecorator.DisplayRectangle = new Rectangle(lineItem.StyleDecorator.Location, lineItem.StyleDecorator.Size); } return(lineItem); }