protected void DrawFrame(Graphics graphics, Border border) { if (this.DrawBorder == true) { border.DrawBorder(graphics, this.DisplayRectangle); } }
public override void Render(ReportPageEventArgs rpea) { if (rpea == null) { throw new ArgumentNullException("rpea"); } // Point saveLocation = this.Location; Point currentPosition = new Point(this.startSection.Location.X, this.startSection.Location.Y); Point tableStart = currentPosition; base.Render(rpea); int defaultLeftPos = PrintHelper.DrawingAreaRelativeToParent(this.Parent, this).Left; this.Items.SortByLocation(); rpea.SinglePage.StartRow = this.dataNavigator.CurrentRow; foreach (BaseRowItem row in this.items) { if (row != null) { row.Parent = this; if (PrintHelper.IsTextOnlyRow(row)) { currentPosition = this.PrintTextRow(rpea, row, defaultLeftPos, currentPosition); this.Location = saveLocation; } else { do { if (PrintHelper.IsPageFull(new Rectangle(currentPosition, row.Size), sectionBounds)) { this.Location = saveLocation; rpea.SinglePage.EndRow = this.dataNavigator.CurrentRow; AbstractRenderer.PageBreak(rpea); return; } currentPosition = this.PrintDataRow(rpea, row, defaultLeftPos, currentPosition); }while (this.dataNavigator.MoveNext()); } } } if (this.DrawBorder) { Border border = new Border(new BaseLine(this.ForeColor, System.Drawing.Drawing2D.DashStyle.Solid, 1)); border.DrawBorder(rpea.PrintPageEventArgs.Graphics, new Rectangle(this.Parent.Location.X, tableStart.Y, this.Parent.Size.Width, currentPosition.Y + 5)); } rpea.LocationAfterDraw = new Point(rpea.LocationAfterDraw.X, rpea.LocationAfterDraw.Y + 20); base.NotifyAfterPrint(rpea.LocationAfterDraw); }
public override void Render(ReportPageEventArgs rpea) { this.NotifyPrinting(); base.Render(rpea); if (this.DrawBorder == true) { Border b = new Border(new BaseLine (this.FrameColor,System.Drawing.Drawing2D.DashStyle.Solid,1)); Rectangle r = new Rectangle (this.Location,this.Size); b.DrawBorder(rpea.PrintPageEventArgs.Graphics,r); } this.NotifyPrinted(); }
public override void Render(ReportPageEventArgs rpea) { this.NotifyPrinting(); base.Render(rpea); if (this.DrawBorder == true) { Border b = new Border(new BaseLine(this.FrameColor, System.Drawing.Drawing2D.DashStyle.Solid, 1)); Rectangle r = new Rectangle(this.Location, this.Size); b.DrawBorder(rpea.PrintPageEventArgs.Graphics, r); } this.NotifyPrinted(); }
public override void Render(ReportPageEventArgs rpea) { if (rpea == null) { throw new ArgumentNullException("rpea"); } // Point saveLocation = this.Location; Point currentPosition = new Point(this.startSection.Location.X,this.startSection.Location.Y); Point tableStart = currentPosition; base.Render(rpea); int defaultLeftPos = PrintHelper.DrawingAreaRelativeToParent(this.Parent,this).Left; this.Items.SortByLocation(); rpea.SinglePage.StartRow = this.dataNavigator.CurrentRow; foreach (BaseRowItem row in this.items) { if (row != null) { row.Parent = this; if (PrintHelper.IsTextOnlyRow(row) ) { currentPosition = this.PrintTextRow (rpea,row,defaultLeftPos,currentPosition); this.Location = saveLocation; } else { do { if (PrintHelper.IsPageFull(new Rectangle(currentPosition,row.Size),sectionBounds)) { this.Location = saveLocation; rpea.SinglePage.EndRow = this.dataNavigator.CurrentRow; AbstractRenderer.PageBreak(rpea); return; } currentPosition = this.PrintDataRow (rpea,row,defaultLeftPos,currentPosition); } while (this.dataNavigator.MoveNext()); } } } if (this.DrawBorder) { Border border = new Border(new BaseLine (this.ForeColor,System.Drawing.Drawing2D.DashStyle.Solid,1)); border.DrawBorder(rpea.PrintPageEventArgs.Graphics, new Rectangle(this.Parent.Location.X,tableStart.Y, this.Parent.Size.Width,currentPosition.Y + 5)); } rpea.LocationAfterDraw = new Point(rpea.LocationAfterDraw.X,rpea.LocationAfterDraw.Y + 20); base.NotifyAfterPrint (rpea.LocationAfterDraw); }
protected void DrawFrame (Graphics graphics,Border border) { if (this.DrawBorder == true) { border.DrawBorder(graphics,this.DisplayRectangle); } }