Browse Source

Move Wpf/Visitor and helpers to \Wpf

reports
Peter Forstmeier 12 years ago
parent
commit
8cbbaa6d98
  1. 10
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting/ICSharpCode.Reporting.csproj
  2. 3
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Wpf/PreviewViewModel.cs
  3. 2
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Wpf/Visitor/FixedDocumentCreator.cs
  4. 47
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Wpf/Visitor/Graphics/ExtendedLine.cs
  5. 3
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Wpf/Visitor/WpfExporter.cs
  6. 34
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Wpf/Visitor/WpfVisitor.cs

10
src/AddIns/Misc/Reporting/ICSharpCode.Reporting/ICSharpCode.Reporting.csproj

@ -108,13 +108,10 @@ @@ -108,13 +108,10 @@
<Compile Include="Src\Exporter\Visitors\CanvasHelper.cs" />
<Compile Include="Src\Exporter\Visitors\ExpressionVisitor.cs" />
<Compile Include="Src\Exporter\Visitors\FormatVisitor.cs" />
<Compile Include="Src\Exporter\WpfExporter.cs" />
<Compile Include="Src\Exporter\Visitors\AbstractVisitor.cs" />
<Compile Include="Src\Exporter\Visitors\IAcceptor.cs" />
<Compile Include="Src\Exporter\Visitors\IVisitor.cs" />
<Compile Include="Src\Exporter\Visitors\DebugVisitor.cs" />
<Compile Include="Src\Exporter\Visitors\WpfVisitor.cs" />
<Compile Include="Src\ExportRenderer\FixedDocumentCreator.cs" />
<Compile Include="Src\Expressions\ExpressionHelper.cs" />
<Compile Include="Src\Expressions\ExpressionRunner.cs" />
<Compile Include="Src\Expressions\Irony\Ast\AstExtensions.cs" />
@ -173,6 +170,10 @@ @@ -173,6 +170,10 @@
<Compile Include="Src\Pdf\PdfVisitor.cs" />
<Compile Include="Src\ReportingFactory.cs" />
<Compile Include="Src\Wpf\PreviewViewModel.cs" />
<Compile Include="Src\Wpf\Visitor\FixedDocumentCreator.cs" />
<Compile Include="Src\Wpf\Visitor\Graphics\ExtendedLine.cs" />
<Compile Include="Src\Wpf\Visitor\WpfExporter.cs" />
<Compile Include="Src\Wpf\Visitor\WpfVisitor.cs" />
<Compile Include="Src\Wpf\WpfReportViewer\WpfReportViewer.xaml.cs">
<DependentUpon>WpfReportViewer.xaml</DependentUpon>
<SubType>Code</SubType>
@ -197,7 +198,6 @@ @@ -197,7 +198,6 @@
<Folder Include="Src\Factories" />
<Folder Include="Src\Exporter" />
<Folder Include="Src\Arrange" />
<Folder Include="Src\ExportRenderer" />
<Folder Include="Src\DataSource" />
<Folder Include="Src\DataManager" />
<Folder Include="Src\DataManager\Listhandling" />
@ -208,6 +208,8 @@ @@ -208,6 +208,8 @@
<Folder Include="Src\PageBuilder" />
<Folder Include="Src\PageBuilder\Converter" />
<Folder Include="Src\PageBuilder\ExportColumns" />
<Folder Include="Src\Wpf\Visitor" />
<Folder Include="Src\Wpf\Visitor\Graphics" />
<Folder Include="Src\Wpf\WpfReportViewer" />
<Folder Include="Src\Xml" />
</ItemGroup>

3
src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Wpf/PreviewViewModel.cs

@ -10,11 +10,10 @@ using System; @@ -10,11 +10,10 @@ using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Windows.Documents;
using System.Windows.Markup;
using ICSharpCode.Reporting.Exporter;
using ICSharpCode.Reporting.Items;
using ICSharpCode.Reporting.PageBuilder.ExportColumns;
using ICSharpCode.Reporting.WpfReportViewer.Visitor;
namespace ICSharpCode.Reporting.WpfReportViewer
{

2
src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/ExportRenderer/FixedDocumentCreator.cs → src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Wpf/Visitor/FixedDocumentCreator.cs

@ -22,7 +22,7 @@ using FontFamily = System.Windows.Media.FontFamily; @@ -22,7 +22,7 @@ using FontFamily = System.Windows.Media.FontFamily;
using Pen = System.Windows.Media.Pen;
using Size = System.Windows.Size;
namespace ICSharpCode.Reporting.ExportRenderer
namespace ICSharpCode.Reporting.WpfReportViewer.Visitor
{
/// <summary>
/// Description of FixedDocumentCreator.

47
src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Wpf/Visitor/Graphics/ExtendedLine.cs

@ -0,0 +1,47 @@ @@ -0,0 +1,47 @@
/*
* Created by SharpDevelop.
* User: Peter Forstmeier
* Date: 06.05.2013
* Time: 20:10
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Windows;
using System.Windows.Media;
using ICSharpCode.Reporting.PageBuilder.ExportColumns;
namespace ICSharpCode.Reporting.WpfReportViewer.Visitor.Graphics
{
class ExtendedLine : FrameworkElement{
private VisualCollection children;
public ExtendedLine(ExportLine exportGraphics,Pen pen){
children = new VisualCollection(this);
var visual = new DrawingVisual();
children.Add(visual);
using (var dc = visual.RenderOpen())
{
dc.DrawLine(pen,
new Point(exportGraphics.Location.X, exportGraphics.Location.Y),
new Point(exportGraphics.Location.X + exportGraphics.Size.Width,exportGraphics.Location.Y));
}
}
protected override int VisualChildrenCount{
get { return children.Count; }
}
protected override Visual GetVisualChild(int index){
if (index < 0 || index >= children.Count)
{
throw new ArgumentOutOfRangeException();
}
return children[index];
}
}
}

3
src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Exporter/WpfExporter.cs → src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Wpf/Visitor/WpfExporter.cs

@ -11,10 +11,11 @@ using System.Collections.ObjectModel; @@ -11,10 +11,11 @@ using System.Collections.ObjectModel;
using System.Windows.Documents;
using System.Windows.Markup;
using ICSharpCode.Reporting.Exporter;
using ICSharpCode.Reporting.Exporter.Visitors;
using ICSharpCode.Reporting.PageBuilder.ExportColumns;
namespace ICSharpCode.Reporting.Exporter{
namespace ICSharpCode.Reporting.WpfReportViewer.Visitor {
/// <summary>
/// Description of PrintExporter.
/// </summary>

34
src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Exporter/Visitors/WpfVisitor.cs → src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Wpf/Visitor/WpfVisitor.cs

@ -11,13 +11,13 @@ using System.Windows; @@ -11,13 +11,13 @@ using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using ICSharpCode.Reporting.ExportRenderer;
using ICSharpCode.Reporting.Exporter.Visitors;
using ICSharpCode.Reporting.Interfaces.Export;
using ICSharpCode.Reporting.PageBuilder.ExportColumns;
using ICSharpCode.Reporting.WpfReportViewer.Visitor.Graphics;
namespace ICSharpCode.Reporting.Exporter.Visitors
namespace ICSharpCode.Reporting.WpfReportViewer.Visitor
{
/// <summary>
/// Description of WpfVisitor.
@ -97,33 +97,5 @@ namespace ICSharpCode.Reporting.Exporter.Visitors @@ -97,33 +97,5 @@ namespace ICSharpCode.Reporting.Exporter.Visitors
}
class ExtendedLine : FrameworkElement{
private VisualCollection children;
public ExtendedLine(ExportLine exportGraphics,Pen pen){
children = new VisualCollection(this);
var visual = new DrawingVisual();
children.Add(visual);
using (var dc = visual.RenderOpen())
{
dc.DrawLine(pen,
new Point(exportGraphics.Location.X, exportGraphics.Location.Y),
new Point(exportGraphics.Location.X + exportGraphics.Size.Width,exportGraphics.Location.Y));
}
}
protected override int VisualChildrenCount{
get { return children.Count; }
}
protected override Visual GetVisualChild(int index){
if (index < 0 || index >= children.Count)
{
throw new ArgumentOutOfRangeException();
}
return children[index];
}
}
}
Loading…
Cancel
Save