Browse Source

Cleanup

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@5411 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Peter Forstmeier 16 years ago
parent
commit
5309c15627
  1. 1
      src/AddIns/Misc/SharpReport/ICSharpCode.Reports.Addin/Project/Commands/ExplorerCommands.cs
  2. 10
      src/AddIns/Misc/SharpReport/ICSharpCode.Reports.Addin/Project/Commands/ViewCommands.cs
  3. 3
      src/AddIns/Misc/SharpReport/ICSharpCode.Reports.Core/Project/BaseClasses/CurrentItem.cs
  4. 6
      src/AddIns/Misc/SharpReport/ICSharpCode.Reports.Core/Project/BaseClasses/Printing/Layouter.cs
  5. 1
      src/AddIns/Misc/SharpReport/ICSharpCode.Reports.Core/Project/DataManager/DataManager.cs
  6. 12
      src/AddIns/Misc/SharpReport/ICSharpCode.Reports.Core/Project/Globals/GlobalValues.cs
  7. 16
      src/AddIns/Misc/SharpReport/ICSharpCode.Reports.Core/Project/ReportSettings.cs
  8. 2
      src/AddIns/Misc/SharpReport/ICSharpCode.Reports.Core/Test/ICSharpCode.Reports.Core.Test/ReportSettings/ReportSettingsFixture.cs

1
src/AddIns/Misc/SharpReport/ICSharpCode.Reports.Addin/Project/Commands/ExplorerCommands.cs

@ -69,7 +69,6 @@ namespace ICSharpCode.Reports.Addin.Commands
foreach (BasicParameter bp in e.Collection as ParameterCollection){ foreach (BasicParameter bp in e.Collection as ParameterCollection){
r.ReportModel.ReportSettings.ParameterCollection.Add (bp); r.ReportModel.ReportSettings.ParameterCollection.Add (bp);
} }
r.RefreshParameters(); r.RefreshParameters();
} }
} }

10
src/AddIns/Misc/SharpReport/ICSharpCode.Reports.Addin/Project/Commands/ViewCommands.cs

@ -82,7 +82,7 @@ namespace ICSharpCode.Reports.Addin.Commands
public class DataSetFromXsdCommand:AbstractCommand{ public class DataSetFromXsdCommand:AbstractCommand{
System.Data.DataSet ds; System.Data.DataSet dataSet;
public override void Run() public override void Run()
{ {
using (OpenFileDialog openFileDialog = new OpenFileDialog()){ using (OpenFileDialog openFileDialog = new OpenFileDialog()){
@ -91,16 +91,16 @@ namespace ICSharpCode.Reports.Addin.Commands
openFileDialog.AddExtension = true; openFileDialog.AddExtension = true;
if(openFileDialog.ShowDialog() == DialogResult.OK){ if(openFileDialog.ShowDialog() == DialogResult.OK){
if (openFileDialog.FileName.Length > 0) { if (openFileDialog.FileName.Length > 0) {
this.ds = new System.Data.DataSet(); this.dataSet = new System.Data.DataSet();
this.ds.ReadXml (openFileDialog.FileName); this.dataSet.ReadXml (openFileDialog.FileName);
this.ds.Locale = CultureInfo.InvariantCulture; this.dataSet.Locale = CultureInfo.InvariantCulture;
} }
} }
} }
} }
public System.Data.DataSet DataSet { public System.Data.DataSet DataSet {
get { return ds; } get { return dataSet; }
} }
} }

3
src/AddIns/Misc/SharpReport/ICSharpCode.Reports.Core/Project/BaseClasses/CurrentItem.cs

@ -14,6 +14,7 @@ namespace ICSharpCode.Reports.Core
{ {
public class CurrentItem : AbstractColumn public class CurrentItem : AbstractColumn
{ {
public object Value;
public object Value{get;set;}
} }
} }

6
src/AddIns/Misc/SharpReport/ICSharpCode.Reports.Core/Project/BaseClasses/Printing/Layouter.cs

@ -42,7 +42,7 @@ namespace ICSharpCode.Reports.Core
FindLowestElement (container.Items); FindLowestElement (container.Items);
int extend = containerItem.Size.Height - canGrowShrinkCollection.First().Size.Height; int extend = containerItem.Size.Height - canGrowShrinkCollection.First().Size.Height;
// Rectangle surroundingRec = this.FindSurroundingRectangle_2(graphics,container.Items); // Rectangle surroundingRec = this.FindSurroundingRectangle_2(graphics,container.Items);
Rectangle surroundingRec = this.FindSurroundingRectangle(graphics,canGrowShrinkCollection); Rectangle surroundingRec = FindSurroundingRectangle(graphics,canGrowShrinkCollection);
if (surroundingRec.Height > desiredContainerRectangle.Height) { if (surroundingRec.Height > desiredContainerRectangle.Height) {
desiredContainerRectangle = new Rectangle(containerItem.Location.X, desiredContainerRectangle = new Rectangle(containerItem.Location.X,
@ -74,7 +74,7 @@ namespace ICSharpCode.Reports.Core
if (canGrowShrinkCollection.Count() > 0) { if (canGrowShrinkCollection.Count() > 0) {
int extend = section.Size.Height - canGrowShrinkCollection.First().Size.Height; int extend = section.Size.Height - canGrowShrinkCollection.First().Size.Height;
Rectangle surroundingRec = this.FindSurroundingRectangle(graphics,canGrowShrinkCollection); Rectangle surroundingRec = FindSurroundingRectangle(graphics,canGrowShrinkCollection);
if (surroundingRec.Height > desiredSectionRectangle .Height) { if (surroundingRec.Height > desiredSectionRectangle .Height) {
desiredSectionRectangle = new Rectangle(section.Location.X, desiredSectionRectangle = new Rectangle(section.Location.X,
section .Location.Y, section .Location.Y,
@ -109,7 +109,7 @@ namespace ICSharpCode.Reports.Core
} }
private Rectangle FindSurroundingRectangle (Graphics graphics,IEnumerable<BaseReportItem> canGrowShrinkCollection) private static Rectangle FindSurroundingRectangle (Graphics graphics,IEnumerable<BaseReportItem> canGrowShrinkCollection)
{ {
int top = int.MaxValue; int top = int.MaxValue;
Rectangle rec = new Rectangle(canGrowShrinkCollection.First().Location.X, Rectangle rec = new Rectangle(canGrowShrinkCollection.First().Location.X,

1
src/AddIns/Misc/SharpReport/ICSharpCode.Reports.Core/Project/DataManager/DataManager.cs

@ -217,7 +217,6 @@ namespace ICSharpCode.Reports.Core {
private void DataBind() { private void DataBind() {
// CheckReportColumns();
this.dataViewStrategy.Bind(); this.dataViewStrategy.Bind();
this.dataNavigator = new DataNavigator(this.dataViewStrategy); this.dataNavigator = new DataNavigator(this.dataViewStrategy);
} }

12
src/AddIns/Misc/SharpReport/ICSharpCode.Reports.Core/Project/Globals/GlobalValues.cs

@ -142,18 +142,6 @@ namespace ICSharpCode.Reports.Core {
} }
/// <summary>
/// Size of Grids in Sections, used by the Designer
/// <see cref="System.Windows.Forms.ControlPaint.DrawGrid >
/// </see>
/// /// </summary>
public static Size GridSize
{
get {
return new Size (8,8);
}
}
#endregion #endregion

16
src/AddIns/Misc/SharpReport/ICSharpCode.Reports.Core/Project/ReportSettings.cs

@ -52,7 +52,6 @@ namespace ICSharpCode.Reports.Core{
private bool landSacpe; private bool landSacpe;
private GraphicsUnit graphicsUnit; private GraphicsUnit graphicsUnit;
private Size gridSize;
private Padding padding; private Padding padding;
private string connectionString; private string connectionString;
private string commandText; private string commandText;
@ -111,7 +110,6 @@ namespace ICSharpCode.Reports.Core{
{ {
this.useStandardPrinter = true; this.useStandardPrinter = true;
this.graphicsUnit = GraphicsUnit.Pixel; this.graphicsUnit = GraphicsUnit.Pixel;
this.gridSize = GlobalValues.GridSize;
this.padding = new Padding(5); this.padding = new Padding(5);
this.defaultFont = GlobalValues.DefaultFont; this.defaultFont = GlobalValues.DefaultFont;
this.availableFields = new AvailableFieldsCollection(); this.availableFields = new AvailableFieldsCollection();
@ -301,20 +299,6 @@ namespace ICSharpCode.Reports.Core{
} }
[Category("Designer Settings")]
public Size GridSize
{
get {
return gridSize;
}
set {
if (this.gridSize != value) {
this.gridSize = value;
}
}
}
[Category("Designer Settings")] [Category("Designer Settings")]
public Padding Padding public Padding Padding
{ {

2
src/AddIns/Misc/SharpReport/ICSharpCode.Reports.Core/Test/ICSharpCode.Reports.Core.Test/ReportSettings/ReportSettingsFixture.cs

@ -90,7 +90,7 @@ namespace ICSharpCode.Reports.Core.Test
ReportSettings rs = new ReportSettings(); ReportSettings rs = new ReportSettings();
Assert.AreEqual(true,rs.UseStandardPrinter,"StandartPrinter should be 'true'"); Assert.AreEqual(true,rs.UseStandardPrinter,"StandartPrinter should be 'true'");
Assert.AreEqual (rs.GraphicsUnit,System.Drawing.GraphicsUnit.Pixel,"GraphicsUnit should be 'millimeter'"); Assert.AreEqual (rs.GraphicsUnit,System.Drawing.GraphicsUnit.Pixel,"GraphicsUnit should be 'millimeter'");
Assert.AreEqual (rs.GridSize,GlobalValues.GridSize);
Assert.AreEqual (new System.Windows.Forms.Padding(5),rs.Padding); Assert.AreEqual (new System.Windows.Forms.Padding(5),rs.Padding);
Assert.AreEqual (GlobalEnums.ReportType.FormSheet,rs.ReportType); Assert.AreEqual (GlobalEnums.ReportType.FormSheet,rs.ReportType);

Loading…
Cancel
Save