diff --git a/src/AddIns/Misc/SharpReport/SharpReportCore/BaseItems/BaseReportObject.cs b/src/AddIns/Misc/SharpReport/SharpReportCore/BaseItems/BaseReportObject.cs index db0b9d59cd..b4b2cb237e 100644 --- a/src/AddIns/Misc/SharpReport/SharpReportCore/BaseItems/BaseReportObject.cs +++ b/src/AddIns/Misc/SharpReport/SharpReportCore/BaseItems/BaseReportObject.cs @@ -42,7 +42,7 @@ namespace SharpReportCore { private Color backColor; private int sectionOffset; - public event EventHandler BeforePrinting; + public event EventHandler BeforePrinting; public event EventHandler AfterPrinting; @@ -206,7 +206,8 @@ namespace SharpReportCore { public void NotifyBeforePrint () { if (this.BeforePrinting != null) { - BeforePrinting (this,EventArgs.Empty); + BeforePrintEventArgs ea = new BeforePrintEventArgs (); + BeforePrinting (this,ea); } } diff --git a/src/AddIns/Misc/SharpReport/SharpReportCore/Events/AfterPrintEventArgs.cs b/src/AddIns/Misc/SharpReport/SharpReportCore/Events/PrintEventArgs.cs similarity index 56% rename from src/AddIns/Misc/SharpReport/SharpReportCore/Events/AfterPrintEventArgs.cs rename to src/AddIns/Misc/SharpReport/SharpReportCore/Events/PrintEventArgs.cs index a2f5356eb1..b043149c3e 100644 --- a/src/AddIns/Misc/SharpReport/SharpReportCore/Events/AfterPrintEventArgs.cs +++ b/src/AddIns/Misc/SharpReport/SharpReportCore/Events/PrintEventArgs.cs @@ -22,13 +22,35 @@ using System.Drawing; /// namespace SharpReportCore { - + + /// + /// This event is fired just bevore an Item is printed + /// Use this event for formatting etc. + /// + + public class BeforePrintEventArgs : System.EventArgs { + public BeforePrintEventArgs (){ + + } + } + + /// + /// This Event is fiered after an Item is printed + /// public class AfterPrintEventArgs : System.EventArgs { - PointF toPoint; - - public AfterPrintEventArgs(PointF toPoint){ + PointF locationAfterPrint; - this.toPoint = toPoint; + + public AfterPrintEventArgs(PointF locationAfterPrint){ + + this.locationAfterPrint = locationAfterPrint; } + + public PointF LocationAfterPrint { + get { + return locationAfterPrint; + } + } + } } diff --git a/src/AddIns/Misc/SharpReport/SharpReportCore/Interfaces/IBaseRenderer.cs b/src/AddIns/Misc/SharpReport/SharpReportCore/Interfaces/IBaseRenderer.cs deleted file mode 100644 index 326c907243..0000000000 --- a/src/AddIns/Misc/SharpReport/SharpReportCore/Interfaces/IBaseRenderer.cs +++ /dev/null @@ -1,21 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version: 1.1.4322.2032 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace SharpReportCore { - using System; - /// - /// Section Interface - /// - public interface IBaseRenderer{ - void Render (ReportPageEventArgs rpea); - } - - -} diff --git a/src/AddIns/Misc/SharpReport/SharpReportCore/Interfaces/IItemRenderer.cs b/src/AddIns/Misc/SharpReport/SharpReportCore/Interfaces/IItemRenderer.cs index 63c6194392..776dff1020 100644 --- a/src/AddIns/Misc/SharpReport/SharpReportCore/Interfaces/IItemRenderer.cs +++ b/src/AddIns/Misc/SharpReport/SharpReportCore/Interfaces/IItemRenderer.cs @@ -8,12 +8,21 @@ // //------------------------------------------------------------------------------ +using System; +using System.Drawing; + + namespace SharpReportCore { - using System; - using System.Drawing; + /// This interface is used in + /// and is the base for + /// + + public interface IBaseRenderer{ + void Render (ReportPageEventArgs rpea); + } /// - /// Section Interface + /// All ReportItems must implement this Interface /// public interface IItemRenderer :IBaseRenderer { diff --git a/src/AddIns/Misc/SharpReport/SharpReportCore/Interfaces/IRender.cs b/src/AddIns/Misc/SharpReport/SharpReportCore/Interfaces/IRender.cs deleted file mode 100644 index 4024f01cc9..0000000000 --- a/src/AddIns/Misc/SharpReport/SharpReportCore/Interfaces/IRender.cs +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Created by SharpDevelop. - * User: Forstmeier Helmut - * Date: 29.11.2004 - * Time: 16:53 - * - * To change this template use Tools | Options | Coding | Edit Standard Headers. - */ - -using System; -//using SharpReport.Printing; - -namespace SharpReportCore -{ - /// - /// Description of IRender. - /// - public interface IRender{ - void Render (ReportPageEventArgs rpea, float startDrawAt); - - float DrawAreaHeight (ReportPageEventArgs rpea); - } -} diff --git a/src/AddIns/Misc/SharpReport/SharpReportCore/Printing/RenderDataReport.cs b/src/AddIns/Misc/SharpReport/SharpReportCore/Printing/RenderDataReport.cs index 52df7c8ad6..77e39512a6 100644 --- a/src/AddIns/Misc/SharpReport/SharpReportCore/Printing/RenderDataReport.cs +++ b/src/AddIns/Misc/SharpReport/SharpReportCore/Printing/RenderDataReport.cs @@ -125,7 +125,7 @@ namespace SharpReportCore { // DebugRectangle (e,detailRect); // no loop if there is no data - System.Console.WriteLine("Navi hasMore {0}",this.dataNavigator.HasMoreData); + if (! this.dataNavigator.HasMoreData ) { e.PrintPageEventArgs.HasMorePages = false; return; diff --git a/src/AddIns/Misc/SharpReport/SharpReportCore/SharpReportCore.csproj b/src/AddIns/Misc/SharpReport/SharpReportCore/SharpReportCore.csproj index 02921400a3..187b90fb8d 100644 --- a/src/AddIns/Misc/SharpReport/SharpReportCore/SharpReportCore.csproj +++ b/src/AddIns/Misc/SharpReport/SharpReportCore/SharpReportCore.csproj @@ -61,7 +61,6 @@ - @@ -79,11 +78,9 @@ - - @@ -131,6 +128,7 @@ +