Browse Source

Cleanup

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.0@1527 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Peter Forstmeier 19 years ago
parent
commit
b42112e2a6
  1. 21
      src/AddIns/Misc/SharpReport/SharpReportCore/BaseItems/BaseReportItem.cs
  2. 17
      src/AddIns/Misc/SharpReport/SharpReportCore/Printing/AbstractRenderer.cs
  3. 65
      src/AddIns/Misc/SharpReport/SharpReportCore/Printing/FormatOutputEventArgs.cs
  4. 2
      src/AddIns/Misc/SharpReport/SharpReportCore/Printing/Text/StandardFormatter.cs
  5. 1
      src/AddIns/Misc/SharpReport/SharpReportCore/SharpReportCore.csproj

21
src/AddIns/Misc/SharpReport/SharpReportCore/BaseItems/BaseReportItem.cs

@ -31,33 +31,12 @@ namespace SharpReportCore {
public event EventHandler<BeforePrintEventArgs> ItemPrinting; public event EventHandler<BeforePrintEventArgs> ItemPrinting;
public event EventHandler<AfterPrintEventArgs> ItemPrinted; public event EventHandler<AfterPrintEventArgs> ItemPrinted;
// public event EventHandler <FormatOutputEventArgs> FormatOutput;
public event EventHandler Disposed; public event EventHandler Disposed;
public BaseReportItem() :base(){ public BaseReportItem() :base(){
} }
#region Event's handling
/// <summary>
/// Format a string according to his datatype
/// </summary>
/// <param name="toFormat">The String to Format</param>
/// <param name="formatString">the formatString</param>
/// <param name="nullValue">Value to return when there is null in toFormat</param>
/// <returns></returns>
protected string old_FireFormatOutput(string toFormat,string format, string nullValue) {
// if (FormatOutput != null) {
// FormatOutputEventArgs ea = new FormatOutputEventArgs (toFormat,
// format,
// nullValue);
// FormatOutput (this,ea);
// return ea.FormatedValue;
// }
return toFormat;
}
#endregion
#region EventHandling #region EventHandling

17
src/AddIns/Misc/SharpReport/SharpReportCore/Printing/AbstractRenderer.cs

@ -291,23 +291,6 @@ namespace SharpReportCore {
return drawPoint.Y; return drawPoint.Y;
} }
// Called by FormatOutPutEvent of the BaseReportItem
/*
void FormatBaseReportItem (object sender, FormatOutputEventArgs rpea) {
BaseDataItem baseDataItem = sender as BaseDataItem;
if (baseDataItem != null) {
if (!String.IsNullOrEmpty(baseDataItem.FormatString)) {
rpea.FormatedValue = standartFormatter.FormatItem (baseDataItem);
} else {
rpea.FormatedValue = rpea.ValueToFormat;
}
}
}
*/
#region privates #region privates
protected void FitSectionToItems (BaseSection section,ReportPageEventArgs rpea){ protected void FitSectionToItems (BaseSection section,ReportPageEventArgs rpea){
if (section == null) { if (section == null) {

65
src/AddIns/Misc/SharpReport/SharpReportCore/Printing/FormatOutputEventArgs.cs

@ -1,65 +0,0 @@
//
/// <remarks>
/// created by - Forstmeier Peter
/// Peter Forstmeier (Peter.Forstmeier@t-online.de)
/// created on - 12.06.2005 18:17:46
/// </remarks>
using System;
/// <summary>
/// This Delegate is used to format the output from TextBased Items
/// </summary>
namespace SharpReportCore {
public class FormatOutputEventArgs : System.EventArgs {
/// <summary>
/// Default constructor - initializes all fields to default values
/// </summary>
private string format;
private string valueToFormat;
private string nullValue;
private string formatedValue;
public FormatOutputEventArgs() {
}
public FormatOutputEventArgs(string valueToFormat,string format, string nullValue )
{
this.format = format;
this.nullValue = nullValue;
this.valueToFormat = valueToFormat;
}
#region Property's
public string Format {
get {
return format;
}
}
public string NullValue {
get {
return nullValue;
}
}
public string ValueToFormat {
get {
return valueToFormat;
}
}
public string FormatedValue {
get {
return formatedValue;
}
set {
formatedValue = value;
}
}
#endregion
}
}

2
src/AddIns/Misc/SharpReport/SharpReportCore/Printing/Text/StandardFormatter.cs

@ -21,6 +21,8 @@ namespace SharpReportCore {
public StandardFormatter() { public StandardFormatter() {
} }
//TODO why not TypeCode tc = Type.GetTypeCode( Type.GetType(this.dataType));
public string FormatItem (string valueToFormat,string formatString, public string FormatItem (string valueToFormat,string formatString,
TypeCode typeCode,string nullValue) { TypeCode typeCode,string nullValue) {
string retValue = String.Empty; string retValue = String.Empty;

1
src/AddIns/Misc/SharpReport/SharpReportCore/SharpReportCore.csproj

@ -91,7 +91,6 @@
<Compile Include="Printing\Graphics\RectangleShape.cs" /> <Compile Include="Printing\Graphics\RectangleShape.cs" />
<Compile Include="Printing\Text\TextDrawer.cs" /> <Compile Include="Printing\Text\TextDrawer.cs" />
<Compile Include="Printing\AbstractRenderer.cs" /> <Compile Include="Printing\AbstractRenderer.cs" />
<Compile Include="Printing\FormatOutputEventArgs.cs" />
<Compile Include="Printing\RenderDataReport.cs" /> <Compile Include="Printing\RenderDataReport.cs" />
<Compile Include="Printing\RenderFormSheetReport.cs" /> <Compile Include="Printing\RenderFormSheetReport.cs" />
<Compile Include="Printing\ReportDocument.cs" /> <Compile Include="Printing\ReportDocument.cs" />

Loading…
Cancel
Save