Browse Source

Change delegates to EventHandler<T>

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1042 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Peter Forstmeier 20 years ago
parent
commit
210d65be08
  1. 6
      src/AddIns/Misc/SharpReport/SharpReport/Designer/Report.cs
  2. 1
      src/AddIns/Misc/SharpReport/SharpReportAddin/SharpReportView.cs
  3. 2
      src/AddIns/Misc/SharpReport/SharpReportCore/BaseSettings.cs
  4. 3
      src/AddIns/Misc/SharpReport/SharpReportCore/Factories/BaseItemFactory.cs
  5. 7
      src/AddIns/Misc/SharpReport/SharpReportCore/Factories/GenericFactory.cs
  6. 5
      src/AddIns/Misc/SharpReport/SharpReportCore/Printing/RenderDataReport.cs
  7. 21
      src/AddIns/Misc/SharpReport/SharpReportCore/Printing/RenderFormSheetReport.cs

6
src/AddIns/Misc/SharpReport/SharpReport/Designer/Report.cs

@ -53,6 +53,7 @@ namespace SharpReport.Designer{ @@ -53,6 +53,7 @@ namespace SharpReport.Designer{
[EditorBrowsable(EditorBrowsableState.Always), Browsable(true)]
public event SelectedEventHandler ObjectSelected;
public event EventHandler <SectionChangedEventArgs> SectionChanged;
public event ItemDragDropEventHandler DesignViewChanged;
@ -281,11 +282,8 @@ namespace SharpReport.Designer{ @@ -281,11 +282,8 @@ namespace SharpReport.Designer{
/// </summary>
/// <param name="sender">this</param>
/// <param name="e">SharpReport.Designer.SectionChangedEventArgs</param>
void SectionSizeChanged(object sender, SharpReport.Designer.SectionChangedEventArgs e)
{
void SectionSizeChanged(object sender, SharpReport.Designer.SectionChangedEventArgs e){
if (SectionChanged != null) {
//ToDo Better Idea???????
//Fill Array of Section rectangles
Rectangle [] rects = new Rectangle[5];
rects[0] = SectionClientArea (this.visualReportHeader);
rects[1] = SectionClientArea (this.visualPageHeader);

1
src/AddIns/Misc/SharpReport/SharpReportAddin/SharpReportView.cs

@ -192,6 +192,7 @@ namespace SharpReportAddin{ @@ -192,6 +192,7 @@ namespace SharpReportAddin{
ctrl.Dock = DockStyle.Fill;
ctrl.ReportControl.ObjectSelected += new SelectedEventHandler (OnObjectSelected);
ctrl.ReportControl.DesignViewChanged += new ItemDragDropEventHandler (OnItemDragDrop);
ctrl.DesignerDirty += new System.ComponentModel.PropertyChangedEventHandler (OnPropertyChanged);
return ctrl;

2
src/AddIns/Misc/SharpReport/SharpReportCore/BaseSettings.cs

@ -60,7 +60,7 @@ namespace SharpReportCore { @@ -60,7 +60,7 @@ namespace SharpReportCore {
public BaseSettings(PageSettings pageSettings , string reportName,string fileName){
if (pageSettings == null) {
throw new ArgumentException("BaseSettings:PageSettings");
throw new ArgumentNullException("pageSettings");
}
if (String.IsNullOrEmpty(reportName)) {

3
src/AddIns/Misc/SharpReport/SharpReportCore/Factories/BaseItemFactory.cs

@ -32,6 +32,9 @@ namespace SharpReportCore { @@ -32,6 +32,9 @@ namespace SharpReportCore {
typeof(BaseReportItem)){
}
public new BaseReportItem Create (string name){
if (String.IsNullOrEmpty(name)) {
throw new ArgumentNullException("name");
}
if (name.LastIndexOf('.') > 0) {
StringBuilder b = new StringBuilder (name);
b.Remove (0,name.LastIndexOf('.') +1);

7
src/AddIns/Misc/SharpReport/SharpReportCore/Factories/GenericFactory.cs

@ -41,7 +41,12 @@ namespace SharpReportCore { @@ -41,7 +41,12 @@ namespace SharpReportCore {
}
public GenericFactory(Assembly ass, Type assignableType, string nameSpace){
Type at = typeof(object);
if (ass == null) {
throw new ArgumentNullException("ass");
}
if (assignableType == null) {
throw new ArgumentNullException("assignableType");
}
foreach (Type t in ass.GetTypes())
{
if (t.IsAbstract)

5
src/AddIns/Misc/SharpReport/SharpReportCore/Printing/RenderDataReport.cs

@ -47,7 +47,7 @@ namespace SharpReportCore { @@ -47,7 +47,7 @@ namespace SharpReportCore {
}
public RenderDataReport(ReportModel model,DataManager dataManager):base (model){
System.Console.WriteLine("RenderDataReport".ToUpper());
// System.Console.WriteLine("RenderDataReport".ToUpper());
this.dataManager = dataManager;
}
@ -171,7 +171,8 @@ namespace SharpReportCore { @@ -171,7 +171,8 @@ namespace SharpReportCore {
protected override void PrintPageEnd(object sender, ReportPageEventArgs e) {
base.SectionInUse = Convert.ToInt16(GlobalEnums.enmSection.ReportPageFooter);
base.SectionInUse = Convert.ToInt16(GlobalEnums.enmSection.ReportPageFooter,
CultureInfo.InvariantCulture);
base.PrintPageEnd (sender,e);
base.DetailEnds = new Point (0,base.CurrentSection.SectionOffset);
}

21
src/AddIns/Misc/SharpReport/SharpReportCore/Printing/RenderFormSheetReport.cs

@ -22,13 +22,13 @@ @@ -22,13 +22,13 @@
using System;
using System.Data;
using System.Drawing;
using System.Globalization;
using System.Drawing.Printing;
using System.Windows.Forms;
using System.Xml;
using SharpReportCore;
// using SharpReport.Printing;
//using SharpReport.ReportItems;
/// <summary>
/// Runs the Report
/// </summary>
@ -41,17 +41,15 @@ namespace SharpReportCore { @@ -41,17 +41,15 @@ namespace SharpReportCore {
public class RenderFormSheetReport : AbstractRenderer {
private PointF currentPoint = new PointF (0,0);
private PointF pageFooterStart = new PointF (0,0);
public RenderFormSheetReport (ReportModel model):base( model){
}
#region event's
protected override void ReportQueryPage (object sender,QueryPageSettingsEventArgs qpe) {
base.ReportQueryPage (sender,qpe);
protected override void ReportQueryPage (object sender,QueryPageSettingsEventArgs e) {
base.ReportQueryPage (sender,e);
}
@ -90,7 +88,8 @@ namespace SharpReportCore { @@ -90,7 +88,8 @@ namespace SharpReportCore {
protected override void PrintBodyStart (object sender,ReportPageEventArgs e) {
base.PrintBodyStart (sender,e);
base.SectionInUse = Convert.ToInt16(GlobalEnums.enmSection.ReportDetail);
base.SectionInUse = Convert.ToInt16(GlobalEnums.enmSection.ReportDetail,
CultureInfo.InvariantCulture);
BaseSection section = base.CurrentSection;
section.SectionOffset = (int)this.currentPoint.Y + base.Gap;
@ -114,7 +113,8 @@ namespace SharpReportCore { @@ -114,7 +113,8 @@ namespace SharpReportCore {
protected override void PrintPageEnd (object sender,ReportPageEventArgs e) {
//PageFooter
base.SectionInUse = Convert.ToInt16(GlobalEnums.enmSection.ReportPageFooter);
base.SectionInUse = Convert.ToInt16(GlobalEnums.enmSection.ReportPageFooter,
CultureInfo.InvariantCulture);
base.PrintPageEnd (sender,e);
@ -126,7 +126,8 @@ namespace SharpReportCore { @@ -126,7 +126,8 @@ namespace SharpReportCore {
int off = base.CurrentSection.SectionOffset + base.CurrentSection.Size.Height + base.Gap;
//ReportFooter
base.SectionInUse = Convert.ToInt16(GlobalEnums.enmSection.ReportFooter);
base.SectionInUse = Convert.ToInt16(GlobalEnums.enmSection.ReportFooter,
CultureInfo.InvariantCulture);
BaseSection section = base.CurrentSection;
section.SectionOffset = off;

Loading…
Cancel
Save