Browse Source

Merge branch 'master' of github.com:icsharpcode/SharpDevelop

pull/470/head
Peter Forstmeier 11 years ago
parent
commit
d9c293a324
  1. 4
      README.md
  2. 292
      samples/SharpDevelopReports/SampleReports/Customized/EventLog.srd
  3. BIN
      samples/SharpDevelopReports/SampleReports/EventLogger/Error.png
  4. BIN
      samples/SharpDevelopReports/SampleReports/EventLogger/Info.png
  5. BIN
      samples/SharpDevelopReports/SampleReports/EventLogger/Warning.png
  6. 247
      samples/SharpDevelopReports/SampleReports/FormSheet/JCA.srd
  7. 280
      samples/SharpDevelopReports/SampleReports/Ilist/ContributorsList.srd
  8. 310
      samples/SharpDevelopReports/SampleReports/Ilist/ContributorsListWithParameters.srd
  9. BIN
      samples/SharpDevelopReports/SampleReports/Logos/Bannerbeige2.gif
  10. BIN
      samples/SharpDevelopReports/SampleReports/Logos/SDLogo_JPG.jpg
  11. 331
      samples/SharpDevelopReports/SampleReports/ProviderIndependent/NoConnectionReport.srd
  12. 332
      samples/SharpDevelopReports/SampleReports/PullModel/Parameter_Aggregate.srd
  13. 3
      samples/SharpDevelopReports/Samples.txt
  14. 20
      samples/SharpDevelopReports/Web/BasicReport/Default.aspx
  15. 38
      samples/SharpDevelopReports/Web/BasicReport/Default.aspx.cs
  16. 247
      samples/SharpDevelopReports/Web/BasicReport/SalesByYear.srd
  17. 43
      samples/SharpDevelopReports/Web/BasicReport/Web.Config
  18. 166
      samples/SharpDevelopReports/Web/IListReport/ContributorList.srd
  19. 17
      samples/SharpDevelopReports/Web/IListReport/Default.aspx
  20. 113
      samples/SharpDevelopReports/Web/IListReport/Default.aspx.cs
  21. 44
      samples/SharpDevelopReports/Web/IListReport/Web.Config
  22. 3
      samples/SharpDevelopReports/doc/ReadMe.txt
  23. 31
      samples/SharpDevelopReports/src/AssemblyInfo.cs
  24. 37
      samples/SharpDevelopReports/src/ReportSamples.sln
  25. 86
      samples/SharpDevelopReports/src/SharpReportSamples/ContributorsList.cs
  26. 94
      samples/SharpDevelopReports/src/SharpReportSamples/EventLogger.cs
  27. 163
      samples/SharpDevelopReports/src/SharpReportSamples/MainForm.Designer.cs
  28. 446
      samples/SharpDevelopReports/src/SharpReportSamples/MainForm.cs
  29. 126
      samples/SharpDevelopReports/src/SharpReportSamples/MainForm.resx
  30. 31
      samples/SharpDevelopReports/src/SharpReportSamples/Program.cs
  31. 31
      samples/SharpDevelopReports/src/SharpReportSamples/Properties/AssemblyInfo.cs
  32. 77
      samples/SharpDevelopReports/src/SharpReportSamples/ReportViewerMessagesProvider.cs
  33. BIN
      samples/SharpDevelopReports/src/SharpReportSamples/Resources/Info.png
  34. BIN
      samples/SharpDevelopReports/src/SharpReportSamples/Resources/error.ico
  35. BIN
      samples/SharpDevelopReports/src/SharpReportSamples/Resources/warning.ico
  36. 80
      samples/SharpDevelopReports/src/SharpReportSamples/SharpReportSamples.csproj
  37. 85
      samples/XamlDesigner/App.xaml.cs
  38. 45
      samples/XamlDesigner/Configuration/Settings.Designer.cs
  39. 45
      samples/XamlDesigner/Configuration/Settings.settings
  40. 12
      samples/XamlDesigner/MainWindow.xaml
  41. 79
      samples/XamlDesigner/MainWindow_Commands.cs
  42. 13
      src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/src/MSpecApplication.cs
  43. 18
      src/AddIns/Analysis/Profiler/Frontend/AddIn/Src/Dialogs/ProfileExecutableForm.xaml.cs
  44. 16
      src/AddIns/Analysis/UnitTesting/NUnit/NUnitConsoleApplication.cs
  45. 4
      src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.csproj
  46. 47
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/CaretReferenceHighlightRenderer.cs
  47. 4
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/Completion/CSharpCompletionDataFactory.cs
  48. 14
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/Completion/CompletionData.cs
  49. 53
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/Completion/FormatItemCompletionData.cs
  50. 93
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/Completion/PartialCompletionData.cs
  51. 2
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormattingStrategy/CSharpFormattingOptionsPersistence.cs
  52. 28
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormattingStrategy/CSharpFormattingStrategy.cs
  53. 37
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/CSharpSyntaxIssue.cs
  54. 2
      src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlCompletionItemList.cs
  55. 52
      src/AddIns/Debugger/Debugger.AddIn/NRefactory/ExpressionEvaluationVisitor.cs
  56. 102
      src/AddIns/Debugger/Debugger.AddIn/Pads/DebuggerDotCompletion.cs
  57. 4
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/BasicMetadata.cs
  58. 68
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/DesignPanel.cs
  59. 6
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/InPlaceEditorExtension.cs
  60. 1
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/BoolEditor.xaml
  61. 7
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/ColorEditor.xaml
  62. 29
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/ColorEditor.xaml.cs
  63. 20
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/FlatCollectionEditor.xaml.cs
  64. 17
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/OpenCollectionEditor.xaml
  65. 38
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/OpenCollectionEditor.xaml.cs
  66. 6
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/TimeSpanEditor.xaml
  67. 30
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/TimeSpanEditor.xaml.cs
  68. 4
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/CreateComponentTool.cs
  69. 2
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/MoveLogic.cs
  70. 2
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/PointerTool.cs
  71. 15
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/WpfDesign.Designer.csproj
  72. 41
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/HitTestType.cs
  73. 7
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/PropertyGrid/EditorManager.cs
  74. 5
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/PropertyGrid/TypeHelper.cs
  75. 8
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/Tools.cs
  76. 1
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/WpfDesign.csproj
  77. 2
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/OutputVisitor/TextWriterOutputFormatter.cs
  78. BIN
      src/Libraries/WPFExtendedToolkit/Xceed.Wpf.Toolkit.dll
  79. 2
      src/Main/Base/Project/Editor/DocumentationUIBuilder.cs
  80. 8
      src/Main/Base/Project/Src/Services/Tasks/ErrorPainter.cs
  81. 11
      src/Main/Base/Project/Util/DotnetDetection.cs
  82. 16
      src/Main/Base/Project/Util/SharpDevelopExtensions.cs
  83. 8
      src/Main/SharpDevelop/Project/Build/MSBuildEngine/MSBuildEngineWorker.cs

4
README.md

@ -26,9 +26,9 @@ If you want to contribute see ["Joining the team"](https://github.com/icsharpcod @@ -26,9 +26,9 @@ If you want to contribute see ["Joining the team"](https://github.com/icsharpcod
##Extended Requirements (building #Develop)
- [Microsoft Build Tools 2013](www.microsoft.com/en-us/download/details.aspx?id=40760)
- [Microsoft Build Tools 2013](http://www.microsoft.com/en-us/download/details.aspx?id=40760)
- [.NET 3.5 SP1](http://www.microsoft.com/en-au/download/details.aspx?id=22)
- [.NET 4.5 SDK] (part of [Windows SDK 8.0](http://msdn.microsoft.com/en-us/windows/desktop/hh852363.aspx))
- [.NET 4.5 SDK](http://msdn.microsoft.com/en-us/windows/desktop/hh852363.aspx) (part of Windows SDK 8.0)
- [Windows SDK 7.1](http://www.microsoft.com/downloads/details.aspx?familyid=6B6C21D2-2006-4AFA-9702-529FA782D63B) (?? not sure if this still is necessary...)
- [Windows SDK 7.0](http://www.microsoft.com/en-us/download/details.aspx?id=3138) (optional; C++ compiler needed for profiler)
- [Windows PowerShell](http://www.microsoft.com/en-us/download/details.aspx?id=34595)

292
samples/SharpDevelopReports/SampleReports/Customized/EventLog.srd

@ -1,292 +0,0 @@ @@ -1,292 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ReportModel>
<ReportSettings>
<ReportSettings>
<DefaultFont>Microsoft Sans Serif, 10pt</DefaultFont>
<DataModel>PushData</DataModel>
<RightMargin>50</RightMargin>
<UseStandardPrinter>True</UseStandardPrinter>
<SortColumnCollection />
<AvailableFieldsCollection />
<NoDataMessage>No Data for this Report</NoDataMessage>
<LeftMargin>50</LeftMargin>
<PageSize>827, 1169</PageSize>
<Padding>5, 5, 5, 5</Padding>
<BottomMargin>50</BottomMargin>
<CommandType>Text</CommandType>
<ParameterCollection />
<Landscape>False</Landscape>
<ReportName>Customized</ReportName>
<TopMargin>50</TopMargin>
<GroupColumnsCollection />
<GraphicsUnit>Pixel</GraphicsUnit>
<CommandText />
<ReportType>DataReport</ReportType>
<ConnectionString />
</ReportSettings>
</ReportSettings>
<SectionCollection>
<BaseSection>
<Size>727, 91</Size>
<Name>ReportHeader</Name>
<PageBreakAfter>False</PageBreakAfter>
<SectionMargin>0</SectionMargin>
<SectionOffset>0</SectionOffset>
<BackColor>White</BackColor>
<Items>
<BaseImageItem>
<ImageSource>File</ImageSource>
<Location>83, 13</Location>
<Name>BaseImageItem2</Name>
<Size>568, 36</Size>
<ScaleImageToSize>False</ScaleImageToSize>
<BackColor>White</BackColor>
<RelativeFileName>..\Logos\Bannerbeige2.gif</RelativeFileName>
<ImageFileName>D:\SharpDevelop3.0_WorkingCopy\SharpDevelop\samples\SharpDevelopReports\SampleReports\Logos\Bannerbeige2.gif</ImageFileName>
</BaseImageItem>
<BaseTextItem>
<BackColor>Silver</BackColor>
<CanShrink>False</CanShrink>
<StringTrimming>None</StringTrimming>
<Text>System - Eventlog</Text>
<Location>83, 55</Location>
<ContentAlignment>TopCenter</ContentAlignment>
<Visible>True</Visible>
<DrawBorder>False</DrawBorder>
<Font>Microsoft Sans Serif, 15pt</Font>
<CanGrow>False</CanGrow>
<FormatString />
<Name>BaseTextItem2147483643</Name>
<FrameColor>White</FrameColor>
<Size>568, 33</Size>
<ForeColor>ControlText</ForeColor>
</BaseTextItem>
</Items>
<Location>50, 50</Location>
<DrawBorder>False</DrawBorder>
</BaseSection>
<BaseSection>
<Size>727, 60</Size>
<Name>ReportPageHeader</Name>
<PageBreakAfter>False</PageBreakAfter>
<SectionMargin>0</SectionMargin>
<SectionOffset>0</SectionOffset>
<BackColor>White</BackColor>
<Items>
<BaseRowItem>
<Location>12, 3</Location>
<AlternateBackColor />
<Name>BaseRowItem2</Name>
<Items>
<BaseTextItem>
<BackColor>White</BackColor>
<CanShrink>False</CanShrink>
<StringTrimming>None</StringTrimming>
<Text>Image</Text>
<Location>20, 7</Location>
<ContentAlignment>TopCenter</ContentAlignment>
<Visible>True</Visible>
<DrawBorder>False</DrawBorder>
<Font>Microsoft Sans Serif, 12pt</Font>
<CanGrow>False</CanGrow>
<FormatString />
<Name>BaseTextItem2147483642</Name>
<FrameColor>White</FrameColor>
<Size>100, 20</Size>
<ForeColor>ControlText</ForeColor>
</BaseTextItem>
<BaseTextItem>
<BackColor>White</BackColor>
<CanShrink>False</CanShrink>
<StringTrimming>None</StringTrimming>
<Text>EntryType</Text>
<Location>135, 7</Location>
<ContentAlignment>TopCenter</ContentAlignment>
<Visible>True</Visible>
<DrawBorder>False</DrawBorder>
<Font>Microsoft Sans Serif, 12pt</Font>
<CanGrow>False</CanGrow>
<FormatString />
<Name>BaseTextItem2147483644</Name>
<FrameColor>White</FrameColor>
<Size>100, 20</Size>
<ForeColor>ControlText</ForeColor>
</BaseTextItem>
<BaseTextItem>
<BackColor>White</BackColor>
<CanShrink>False</CanShrink>
<StringTrimming>None</StringTrimming>
<Text>DateWritten</Text>
<Location>261, 7</Location>
<ContentAlignment>TopCenter</ContentAlignment>
<Visible>True</Visible>
<DrawBorder>False</DrawBorder>
<Font>Microsoft Sans Serif, 12pt</Font>
<CanGrow>False</CanGrow>
<FormatString />
<Name>BaseTextItem2147483645</Name>
<FrameColor>White</FrameColor>
<Size>100, 20</Size>
<ForeColor>ControlText</ForeColor>
</BaseTextItem>
<BaseTextItem>
<BackColor>White</BackColor>
<CanShrink>False</CanShrink>
<StringTrimming>None</StringTrimming>
<Text>Message</Text>
<Location>391, 7</Location>
<ContentAlignment>TopLeft</ContentAlignment>
<Visible>True</Visible>
<DrawBorder>False</DrawBorder>
<Font>Microsoft Sans Serif, 12pt</Font>
<CanGrow>False</CanGrow>
<FormatString />
<Name>BaseTextItem2147483646</Name>
<FrameColor>White</FrameColor>
<Size>248, 20</Size>
<ForeColor>ControlText</ForeColor>
</BaseTextItem>
</Items>
<DrawBorder>False</DrawBorder>
<ChangeBackColorEveryNRow>0</ChangeBackColorEveryNRow>
<FrameColor>White</FrameColor>
<Size>697, 44</Size>
<BackColor>White</BackColor>
<Visible>True</Visible>
<ForeColor>Black</ForeColor>
</BaseRowItem>
</Items>
<Location>50, 156</Location>
<DrawBorder>False</DrawBorder>
</BaseSection>
<BaseSection>
<Size>727, 90</Size>
<Name>ReportDetail</Name>
<PageBreakAfter>False</PageBreakAfter>
<SectionMargin>0</SectionMargin>
<SectionOffset>0</SectionOffset>
<BackColor>White</BackColor>
<Items>
<BaseRowItem>
<Location>12, 14</Location>
<AlternateBackColor />
<Name>BaseRowItem1</Name>
<Items>
<BaseImageItem>
<ImageSource>Database</ImageSource>
<Location>20, 7</Location>
<Name>BaseImageItem1</Name>
<Size>30, 30</Size>
<ScaleImageToSize>False</ScaleImageToSize>
<BackColor>White</BackColor>
<ColumnName>Image</ColumnName>
</BaseImageItem>
<BaseDataItem>
<Text>EntryType</Text>
<Font>Microsoft Sans Serif, 8.25pt</Font>
<Location>135, 7</Location>
<CanGrow>False</CanGrow>
<ForeColor>Black</ForeColor>
<StringTrimming>None</StringTrimming>
<ColumnName>EntryType</ColumnName>
<DrawBorder>False</DrawBorder>
<CanShrink>False</CanShrink>
<ContentAlignment>TopLeft</ContentAlignment>
<BackColor>White</BackColor>
<FormatString />
<Name>EntryType</Name>
<Visible>True</Visible>
<Size>100, 20</Size>
<FrameColor>White</FrameColor>
</BaseDataItem>
<BaseDataItem>
<Text>Message</Text>
<Font>Microsoft Sans Serif, 8.25pt</Font>
<Location>391, 7</Location>
<CanGrow>False</CanGrow>
<ForeColor>Black</ForeColor>
<StringTrimming>None</StringTrimming>
<ColumnName>Message</ColumnName>
<DrawBorder>False</DrawBorder>
<CanShrink>False</CanShrink>
<ContentAlignment>TopLeft</ContentAlignment>
<BackColor>White</BackColor>
<FormatString />
<Name>Message</Name>
<Visible>True</Visible>
<Size>248, 20</Size>
<FrameColor>White</FrameColor>
</BaseDataItem>
<BaseDataItem>
<Text>TimeWritten</Text>
<Font>Microsoft Sans Serif, 10pt</Font>
<Location>261, 7</Location>
<CanGrow>False</CanGrow>
<ForeColor>Black</ForeColor>
<StringTrimming>None</StringTrimming>
<ColumnName>TimeWritten</ColumnName>
<DrawBorder>False</DrawBorder>
<CanShrink>False</CanShrink>
<ContentAlignment>TopLeft</ContentAlignment>
<BackColor>White</BackColor>
<FormatString />
<Name>BaseDataItem1</Name>
<Visible>True</Visible>
<Size>100, 20</Size>
<FrameColor>White</FrameColor>
</BaseDataItem>
</Items>
<DrawBorder>False</DrawBorder>
<ChangeBackColorEveryNRow>0</ChangeBackColorEveryNRow>
<FrameColor>White</FrameColor>
<Size>697, 63</Size>
<BackColor>White</BackColor>
<Visible>True</Visible>
<ForeColor>Black</ForeColor>
</BaseRowItem>
</Items>
<Location>50, 231</Location>
<DrawBorder>False</DrawBorder>
</BaseSection>
<BaseSection>
<Size>727, 60</Size>
<Name>ReportPageFooter</Name>
<PageBreakAfter>False</PageBreakAfter>
<SectionMargin>0</SectionMargin>
<SectionOffset>0</SectionOffset>
<BackColor>White</BackColor>
<Items>
<BaseTextItem>
<BackColor>White</BackColor>
<CanShrink>False</CanShrink>
<StringTrimming>None</StringTrimming>
<Text>='Page (' + Globals!PageNumber + ') of ( ' + Globals!TotalPages + ' ) Pages'</Text>
<Location>403, 21</Location>
<ContentAlignment>TopLeft</ContentAlignment>
<Visible>True</Visible>
<DrawBorder>False</DrawBorder>
<Font>Microsoft Sans Serif, 8.25pt</Font>
<CanGrow>False</CanGrow>
<FormatString />
<Name>='Page ' + Global!PageNumber + 'of ' + Global!Pages + 'Pages'</Name>
<FrameColor>White</FrameColor>
<Size>166, 20</Size>
<ForeColor>ControlText</ForeColor>
</BaseTextItem>
</Items>
<Location>50, 336</Location>
<DrawBorder>False</DrawBorder>
</BaseSection>
<BaseSection>
<Size>727, 60</Size>
<Name>ReportFooter</Name>
<PageBreakAfter>False</PageBreakAfter>
<SectionMargin>0</SectionMargin>
<SectionOffset>0</SectionOffset>
<BackColor>White</BackColor>
<Items />
<Location>50, 411</Location>
<DrawBorder>False</DrawBorder>
</BaseSection>
</SectionCollection>
</ReportModel>

BIN
samples/SharpDevelopReports/SampleReports/EventLogger/Error.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 298 B

BIN
samples/SharpDevelopReports/SampleReports/EventLogger/Info.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 310 B

BIN
samples/SharpDevelopReports/SampleReports/EventLogger/Warning.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 B

247
samples/SharpDevelopReports/SampleReports/FormSheet/JCA.srd

@ -1,247 +0,0 @@ @@ -1,247 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ReportModel>
<ReportSettings>
<ReportSettings>
<DefaultFont>Microsoft Sans Serif, 10pt</DefaultFont>
<DataModel>FormSheet</DataModel>
<RightMargin>50</RightMargin>
<UseStandardPrinter>True</UseStandardPrinter>
<SortColumnCollection />
<AvailableFieldsCollection />
<NoDataMessage>No Data for this Report</NoDataMessage>
<LeftMargin>50</LeftMargin>
<PageSize>827, 1169</PageSize>
<Padding>5, 5, 5, 5</Padding>
<BottomMargin>50</BottomMargin>
<CommandType>Text</CommandType>
<ParameterCollection />
<Landscape>False</Landscape>
<ReportName>Report1</ReportName>
<TopMargin>50</TopMargin>
<GroupColumnsCollection />
<GraphicsUnit>Millimeter</GraphicsUnit>
<CommandText />
<ReportType>FormSheet</ReportType>
<ConnectionString />
</ReportSettings>
</ReportSettings>
<SectionCollection>
<BaseSection>
<Size>718, 85</Size>
<Name>ReportHeader</Name>
<PageBreakAfter>False</PageBreakAfter>
<SectionMargin>50</SectionMargin>
<SectionOffset>0</SectionOffset>
<BackColor>Window</BackColor>
<Items>
<BaseImageItem>
<ImageSource>File</ImageSource>
<Location>103, 24</Location>
<Name>ReportImageControl</Name>
<Size>582, 50</Size>
<ScaleImageToSize>False</ScaleImageToSize>
<BackColor>Window</BackColor>
<RelativeFileName>..\..\Logos\Bannerbeige2.gif</RelativeFileName>
<ImageFileName>D:\SharpDevelop3.0_WorkingCopy\SharpDevelop\samples\SharpDevelopReports\SampleReports\Logos\Bannerbeige2.gif</ImageFileName>
</BaseImageItem>
</Items>
<Location>50, 50</Location>
<DrawBorder>False</DrawBorder>
</BaseSection>
<BaseSection>
<Size>718, 95</Size>
<Name>ReportPageHeader</Name>
<PageBreakAfter>False</PageBreakAfter>
<SectionMargin>50</SectionMargin>
<SectionOffset>0</SectionOffset>
<BackColor>Window</BackColor>
<Items>
<BaseTextItem>
<BackColor>White</BackColor>
<CanShrink>False</CanShrink>
<StringTrimming>None</StringTrimming>
<Text>#develop Open Source Project
Joint Copyright Assignment by Contributor To AlphaSierraPapa</Text>
<Location>92, 10</Location>
<ContentAlignment>TopCenter</ContentAlignment>
<Visible>True</Visible>
<DrawBorder>False</DrawBorder>
<Font>Microsoft Sans Serif, 14pt, style=Bold</Font>
<CanGrow>False</CanGrow>
<FormatString />
<Name>reportTextItem1</Name>
<FrameColor>WindowFrame</FrameColor>
<Size>597, 57</Size>
<ForeColor>ControlText</ForeColor>
</BaseTextItem>
</Items>
<Location>50, 150</Location>
<DrawBorder>False</DrawBorder>
</BaseSection>
<BaseSection>
<Size>718, 723</Size>
<Name>ReportDetail</Name>
<PageBreakAfter>False</PageBreakAfter>
<SectionMargin>50</SectionMargin>
<SectionOffset>0</SectionOffset>
<BackColor>Window</BackColor>
<Items>
<BaseTextItem>
<BackColor>White</BackColor>
<CanShrink>False</CanShrink>
<StringTrimming>None</StringTrimming>
<Text>Contact Information:
Full Name:_________________________________ (the "Contributor")
Mailing Address_________________________ e-mail :_________________________
______________________________________ Telephone :_________________________
Country:_______________________________ Facsimile :_________________________</Text>
<Location>50, 8</Location>
<ContentAlignment>TopLeft</ContentAlignment>
<Visible>True</Visible>
<DrawBorder>True</DrawBorder>
<Font>Microsoft Sans Serif, 10pt</Font>
<CanGrow>False</CanGrow>
<FormatString />
<Name>reportTextItem1</Name>
<FrameColor>WindowFrame</FrameColor>
<Size>639, 135</Size>
<ForeColor>ControlText</ForeColor>
</BaseTextItem>
<BaseTextItem>
<BackColor>White</BackColor>
<CanShrink>False</CanShrink>
<StringTrimming>None</StringTrimming>
<Text>1. Contributor owns, and has sufficient rights to contribute, all source code and related material intended
to be compiled or integrated with the source code for the #develop open source product (the
"Contribution") which Contributor has ever delivered, and AlphaSierraPapa has accepted, for
incorporation into the technology made available under the #develop open source project.</Text>
<Location>50, 171</Location>
<ContentAlignment>TopLeft</ContentAlignment>
<Visible>True</Visible>
<DrawBorder>True</DrawBorder>
<Font>Microsoft Sans Serif, 10pt</Font>
<CanGrow>False</CanGrow>
<FormatString />
<Name>reportTextItem2</Name>
<FrameColor>WindowFrame</FrameColor>
<Size>639, 67</Size>
<ForeColor>ControlText</ForeColor>
</BaseTextItem>
<BaseTextItem>
<BackColor>White</BackColor>
<CanShrink>False</CanShrink>
<StringTrimming>None</StringTrimming>
<Text>2. Contributor hereby assigns to AlphaSierraPapa joint ownership in all worldwide common law and
statutory rights associated with the copyrights, copyright application, copyright registration and moral
rights in the Contribution to the extent allowable under applicable local laws and copyright
conventions. Contributor agrees that this assignment may be submitted by AlphaSierraPapa to register
a copyright in the Contribution. Contributor retains the right to use the Contribution for Contributor's
own purposes. This Joint Copyright Assignment supersedes and replaces all prior copyright
assignments made by Contributor to AlphaSierraPapa under the #develop project.</Text>
<Location>50, 257</Location>
<ContentAlignment>TopLeft</ContentAlignment>
<Visible>True</Visible>
<DrawBorder>True</DrawBorder>
<Font>Microsoft Sans Serif, 10pt</Font>
<CanGrow>False</CanGrow>
<FormatString />
<Name>reportTextItem3</Name>
<FrameColor>WindowFrame</FrameColor>
<Size>639, 113</Size>
<ForeColor>ControlText</ForeColor>
</BaseTextItem>
<BaseTextItem>
<BackColor>White</BackColor>
<CanShrink>False</CanShrink>
<StringTrimming>None</StringTrimming>
<Text>3. Contributor is legally entitled to grant the above assignment and agrees not to provide any
Contribution that violates any law or breaches any contract.</Text>
<Location>50, 380</Location>
<ContentAlignment>TopLeft</ContentAlignment>
<Visible>True</Visible>
<DrawBorder>False</DrawBorder>
<Font>Microsoft Sans Serif, 10pt</Font>
<CanGrow>False</CanGrow>
<FormatString />
<Name>reportTextItem4</Name>
<FrameColor>WindowFrame</FrameColor>
<Size>696, 37</Size>
<ForeColor>ControlText</ForeColor>
</BaseTextItem>
<BaseTextItem>
<BackColor>White</BackColor>
<CanShrink>False</CanShrink>
<StringTrimming>None</StringTrimming>
<Text>Signed:________________________________________ Date_______________
Printed Name:__________________________________
Please send a signed copy of this assignment by facsimile to AlphaSierraPapa at:</Text>
<Location>50, 443</Location>
<ContentAlignment>TopLeft</ContentAlignment>
<Visible>True</Visible>
<DrawBorder>True</DrawBorder>
<Font>Microsoft Sans Serif, 10pt</Font>
<CanGrow>False</CanGrow>
<FormatString />
<Name>reportTextItem5</Name>
<FrameColor>WindowFrame</FrameColor>
<Size>639, 80</Size>
<ForeColor>ControlText</ForeColor>
</BaseTextItem>
<BaseTextItem>
<BackColor>White</BackColor>
<CanShrink>False</CanShrink>
<StringTrimming>None</StringTrimming>
<Text>+43-3842-22620
or mail it to:
AlphaSierraPapa
Christoph Wille
Vordernbergerstrasse 27/8
8700 Leoben
AUSTRIA</Text>
<Location>50, 551</Location>
<ContentAlignment>TopLeft</ContentAlignment>
<Visible>True</Visible>
<DrawBorder>False</DrawBorder>
<Font>Microsoft Sans Serif, 10pt</Font>
<CanGrow>False</CanGrow>
<FormatString />
<Name>reportTextItem6</Name>
<FrameColor>WindowFrame</FrameColor>
<Size>213, 139</Size>
<ForeColor>ControlText</ForeColor>
</BaseTextItem>
</Items>
<Location>50, 260</Location>
<DrawBorder>False</DrawBorder>
</BaseSection>
<BaseSection>
<Size>718, 50</Size>
<Name>ReportPageFooter</Name>
<PageBreakAfter>False</PageBreakAfter>
<SectionMargin>50</SectionMargin>
<SectionOffset>0</SectionOffset>
<BackColor>Window</BackColor>
<Items />
<Location>50, 998</Location>
<DrawBorder>False</DrawBorder>
</BaseSection>
<BaseSection>
<Size>718, 50</Size>
<Name>ReportFooter</Name>
<PageBreakAfter>False</PageBreakAfter>
<SectionMargin>50</SectionMargin>
<SectionOffset>0</SectionOffset>
<BackColor>Window</BackColor>
<Items />
<Location>50, 1063</Location>
<DrawBorder>False</DrawBorder>
</BaseSection>
</SectionCollection>
</ReportModel>

280
samples/SharpDevelopReports/SampleReports/Ilist/ContributorsList.srd

@ -1,280 +0,0 @@ @@ -1,280 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ReportModel>
<ReportSettings>
<ReportSettings>
<ReportName>Report1</ReportName>
<ReportType>DataReport</ReportType>
<BottomMargin>50</BottomMargin>
<TopMargin>50</TopMargin>
<LeftMargin>50</LeftMargin>
<RightMargin>50</RightMargin>
<PageSize>827, 1169</PageSize>
<Landscape>False</Landscape>
<GraphicsUnit>Millimeter</GraphicsUnit>
<Padding>5, 5, 5, 5</Padding>
<AvailableFieldsCollection />
<SortColumnsCollection />
<GroupColumnsCollection />
<ParameterCollection />
<ConnectionString />
<CommandText />
<CommandType>Text</CommandType>
<DataModel>PushData</DataModel>
<NoDataMessage>No Data for this Report</NoDataMessage>
<DefaultFont>Microsoft Sans Serif, 10pt</DefaultFont>
<UseStandardPrinter>True</UseStandardPrinter>
</ReportSettings>
</ReportSettings>
<SectionCollection>
<BaseSection>
<Location>50, 50</Location>
<Size>786, 35</Size>
<BackColor>Window</BackColor>
<SectionOffset>0</SectionOffset>
<SectionMargin>50</SectionMargin>
<DrawBorder>False</DrawBorder>
<PageBreakAfter>False</PageBreakAfter>
<Items />
<FrameColor>Black</FrameColor>
<Name>ReportHeader</Name>
</BaseSection>
<BaseSection>
<Location>50, 100</Location>
<Size>786, 108</Size>
<BackColor>Window</BackColor>
<SectionOffset>0</SectionOffset>
<SectionMargin>50</SectionMargin>
<DrawBorder>False</DrawBorder>
<PageBreakAfter>False</PageBreakAfter>
<Items>
<BaseTextItem>
<Location>429, 63</Location>
<Size>100, 20</Size>
<BackColor>White</BackColor>
<Font>Microsoft Sans Serif, 12pt, style=Bold</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
<CanGrow>False</CanGrow>
<CanShrink>False</CanShrink>
<Text>Job</Text>
<DrawBorder>False</DrawBorder>
<FrameColor>WindowFrame</FrameColor>
<ForeColor>ControlText</ForeColor>
<Visible>True</Visible>
<Name>Job</Name>
</BaseTextItem>
<BaseTextItem>
<Location>234, 63</Location>
<Size>100, 20</Size>
<BackColor>White</BackColor>
<Font>Microsoft Sans Serif, 12pt, style=Bold</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
<CanGrow>False</CanGrow>
<CanShrink>False</CanShrink>
<Text>Lastname</Text>
<DrawBorder>False</DrawBorder>
<FrameColor>WindowFrame</FrameColor>
<ForeColor>ControlText</ForeColor>
<Visible>True</Visible>
<Name>Lastname</Name>
</BaseTextItem>
<BaseImageItem>
<Location>47, 6</Location>
<Size>661, 42</Size>
<BackColor>Window</BackColor>
<ImageFileName>D:\git_Sharpdevelop_Reporting\samples\SharpDevelopReports\SampleReports\Logos\Bannerbeige2.gif</ImageFileName>
<ScaleImageToSize>False</ScaleImageToSize>
<ImageSource>File</ImageSource>
<RelativeFileName>..\..\Logos\Bannerbeige2.gif</RelativeFileName>
<Name>ReportImageControl</Name>
</BaseImageItem>
<BaseLineItem>
<Location>47, 87</Location>
<Size>661, 18</Size>
<BackColor>White</BackColor>
<ForeColor>ControlText</ForeColor>
<FromPoint>0, 3</FromPoint>
<ToPoint>614, 3</ToPoint>
<StartLineCap>Flat</StartLineCap>
<EndLineCap>Flat</EndLineCap>
<DashLineCap>Flat</DashLineCap>
<DashStyle>Solid</DashStyle>
<Thickness>2</Thickness>
<Name />
</BaseLineItem>
<BaseTextItem>
<Location>46, 63</Location>
<Size>109, 20</Size>
<BackColor>White</BackColor>
<Font>Microsoft Sans Serif, 12pt, style=Bold</Font>
<StringTrimming>EllipsisCharacter</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
<CanGrow>False</CanGrow>
<CanShrink>False</CanShrink>
<Text>Firstname</Text>
<DrawBorder>False</DrawBorder>
<FrameColor>WindowFrame</FrameColor>
<ForeColor>ControlText</ForeColor>
<Visible>True</Visible>
<Name>reportTextItem1</Name>
</BaseTextItem>
</Items>
<FrameColor>Black</FrameColor>
<Name>ReportPageHeader</Name>
</BaseSection>
<BaseSection>
<Location>50, 223</Location>
<Size>750, 60</Size>
<BackColor>Window</BackColor>
<SectionOffset>0</SectionOffset>
<SectionMargin>50</SectionMargin>
<DrawBorder>False</DrawBorder>
<PageBreakAfter>False</PageBreakAfter>
<Items>
<BaseRowItem>
<Location>3, 10</Location>
<Size>699, 47</Size>
<BackColor>White</BackColor>
<DrawBorder>False</DrawBorder>
<ForeColor>ControlText</ForeColor>
<Visible>True</Visible>
<FrameColor>WindowFrame</FrameColor>
<Items>
<BaseDataItem>
<Location>43, 12</Location>
<Size>147, 25</Size>
<BackColor>White</BackColor>
<Font>Microsoft Sans Serif, 10pt</Font>
<StringTrimming>EllipsisCharacter</StringTrimming>
<ContentAlignment>MiddleLeft</ContentAlignment>
<CanGrow>False</CanGrow>
<CanShrink>False</CanShrink>
<DataType>System.String</DataType>
<Text>First</Text>
<DrawBorder>False</DrawBorder>
<FrameColor>WindowFrame</FrameColor>
<ForeColor>ControlText</ForeColor>
<Visible>True</Visible>
<ColumnName>First</ColumnName>
<Name>unbound1</Name>
</BaseDataItem>
<BaseDataItem>
<Location>231, 12</Location>
<Size>139, 25</Size>
<BackColor>White</BackColor>
<Font>Microsoft Sans Serif, 10pt</Font>
<StringTrimming>EllipsisCharacter</StringTrimming>
<ContentAlignment>MiddleLeft</ContentAlignment>
<CanGrow>False</CanGrow>
<CanShrink>False</CanShrink>
<DataType>System.String</DataType>
<Text>Last</Text>
<DrawBorder>False</DrawBorder>
<FrameColor>WindowFrame</FrameColor>
<ForeColor>ControlText</ForeColor>
<Visible>True</Visible>
<ColumnName>Last</ColumnName>
<Name>unbound2</Name>
</BaseDataItem>
<BaseDataItem>
<Location>426, 10</Location>
<Size>216, 25</Size>
<BackColor>White</BackColor>
<Font>Microsoft Sans Serif, 10pt</Font>
<StringTrimming>EllipsisCharacter</StringTrimming>
<ContentAlignment>MiddleLeft</ContentAlignment>
<CanGrow>False</CanGrow>
<CanShrink>False</CanShrink>
<DataType>System.String</DataType>
<Text>Job</Text>
<DrawBorder>False</DrawBorder>
<FrameColor>WindowFrame</FrameColor>
<ForeColor>ControlText</ForeColor>
<Visible>True</Visible>
<ColumnName>Job</ColumnName>
<NullValue>--------------</NullValue>
<Name>unbound3</Name>
</BaseDataItem>
</Items>
<AlternateBackColor />
<ChangeBackColorEveryNRow>0</ChangeBackColorEveryNRow>
<Name>Row</Name>
</BaseRowItem>
</Items>
<FrameColor>Black</FrameColor>
<Name>ReportDetail</Name>
</BaseSection>
<BaseSection>
<Location>50, 298</Location>
<Size>750, 49</Size>
<BackColor>Window</BackColor>
<SectionOffset>0</SectionOffset>
<SectionMargin>50</SectionMargin>
<DrawBorder>False</DrawBorder>
<PageBreakAfter>False</PageBreakAfter>
<Items>
<BaseTextItem>
<Location>45, 24</Location>
<Size>483, 20</Size>
<BackColor>White</BackColor>
<Font>Microsoft Sans Serif, 8.25pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
<CanGrow>False</CanGrow>
<CanShrink>False</CanShrink>
<Text>=Globals!ReportFolder</Text>
<DrawBorder>False</DrawBorder>
<FrameColor>WindowFrame</FrameColor>
<ForeColor>ControlText</ForeColor>
<Visible>True</Visible>
<Name>=Globals!ReportFolder</Name>
</BaseTextItem>
<BaseLineItem>
<Location>45, 3</Location>
<Size>663, 15</Size>
<BackColor>White</BackColor>
<ForeColor>ControlText</ForeColor>
<FromPoint>0, 0</FromPoint>
<ToPoint>656, 0</ToPoint>
<StartLineCap>Flat</StartLineCap>
<EndLineCap>Flat</EndLineCap>
<DashLineCap>Flat</DashLineCap>
<DashStyle>Solid</DashStyle>
<Thickness>2</Thickness>
<Name>object_177a5444_b8e0_4202_87d2_05cdc7cd1194</Name>
</BaseLineItem>
<BaseTextItem>
<Location>602, 24</Location>
<Size>100, 20</Size>
<BackColor>White</BackColor>
<Font>Microsoft Sans Serif, 8.25pt</Font>
<StringTrimming>None</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
<CanGrow>False</CanGrow>
<CanShrink>False</CanShrink>
<Text>='Page ' + Globals!PageNumber</Text>
<DrawBorder>False</DrawBorder>
<FrameColor>WindowFrame</FrameColor>
<ForeColor>ControlText</ForeColor>
<Visible>True</Visible>
<Name>='Page ' + Globals!PageNumber</Name>
</BaseTextItem>
</Items>
<FrameColor>Black</FrameColor>
<Name>ReportPageFooter</Name>
</BaseSection>
<BaseSection>
<Location>50, 362</Location>
<Size>750, 55</Size>
<BackColor>Window</BackColor>
<SectionOffset>0</SectionOffset>
<SectionMargin>50</SectionMargin>
<DrawBorder>False</DrawBorder>
<PageBreakAfter>False</PageBreakAfter>
<Items />
<FrameColor>Black</FrameColor>
<Name>ReportFooter</Name>
</BaseSection>
</SectionCollection>
</ReportModel>

310
samples/SharpDevelopReports/SampleReports/Ilist/ContributorsListWithParameters.srd

@ -1,310 +0,0 @@ @@ -1,310 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ReportModel>
<ReportSettings>
<ReportSettings>
<ReportName>Report1</ReportName>
<ReportType>DataReport</ReportType>
<BottomMargin>50</BottomMargin>
<TopMargin>50</TopMargin>
<LeftMargin>50</LeftMargin>
<RightMargin>50</RightMargin>
<PageSize>827, 1169</PageSize>
<Landscape>False</Landscape>
<GraphicsUnit>Millimeter</GraphicsUnit>
<Padding>5, 5, 5, 5</Padding>
<AvailableFieldsCollection />
<SortColumnCollection />
<GroupColumnsCollection />
<ParameterCollection>
<BasicParameter>
<ParameterName>p1</ParameterName>
<ParameterValue>ValueOfP1</ParameterValue>
</BasicParameter>
</ParameterCollection>
<ConnectionString />
<CommandText />
<CommandType>Text</CommandType>
<DataModel>PushData</DataModel>
<NoDataMessage>No Data for this Report</NoDataMessage>
<DefaultFont>Microsoft Sans Serif, 10pt</DefaultFont>
<UseStandardPrinter>True</UseStandardPrinter>
</ReportSettings>
</ReportSettings>
<SectionCollection>
<BaseSection>
<Location>50, 50</Location>
<Size>786, 35</Size>
<BackColor>Window</BackColor>
<SectionOffset>0</SectionOffset>
<SectionMargin>50</SectionMargin>
<DrawBorder>False</DrawBorder>
<PageBreakAfter>False</PageBreakAfter>
<Items />
<FrameColor>Black</FrameColor>
<Name>ReportHeader</Name>
</BaseSection>
<BaseSection>
<Location>50, 100</Location>
<Size>786, 108</Size>
<BackColor>Window</BackColor>
<SectionOffset>0</SectionOffset>
<SectionMargin>50</SectionMargin>
<DrawBorder>False</DrawBorder>
<PageBreakAfter>False</PageBreakAfter>
<Items>
<BaseTextItem>
<Location>45, 20</Location>
<Size>272, 20</Size>
<BackColor>White</BackColor>
<Font>Segoe UI, 9pt</Font>
<FormatString />
<StringTrimming>None</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
<CanGrow>False</CanGrow>
<CanShrink>False</CanShrink>
<Text>="Param " + Parameters!p1</Text>
<DrawBorder>False</DrawBorder>
<FrameColor>Black</FrameColor>
<ForeColor>0, 0, 0</ForeColor>
<Visible>True</Visible>
<Name>BaseTextItem2147483646</Name>
</BaseTextItem>
<BaseTextItem>
<Location>429, 63</Location>
<Size>100, 20</Size>
<BackColor>White</BackColor>
<Font>Microsoft Sans Serif, 12pt, style=Bold</Font>
<FormatString />
<StringTrimming>None</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
<CanGrow>False</CanGrow>
<CanShrink>False</CanShrink>
<Text>Job</Text>
<DrawBorder>False</DrawBorder>
<FrameColor>WindowFrame</FrameColor>
<ForeColor>ControlText</ForeColor>
<Visible>True</Visible>
<Name>Job</Name>
</BaseTextItem>
<BaseTextItem>
<Location>234, 63</Location>
<Size>100, 20</Size>
<BackColor>White</BackColor>
<Font>Microsoft Sans Serif, 12pt, style=Bold</Font>
<FormatString />
<StringTrimming>None</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
<CanGrow>False</CanGrow>
<CanShrink>False</CanShrink>
<Text>Lastname</Text>
<DrawBorder>False</DrawBorder>
<FrameColor>WindowFrame</FrameColor>
<ForeColor>ControlText</ForeColor>
<Visible>True</Visible>
<Name>Lastname</Name>
</BaseTextItem>
<BaseImageItem>
<Location>429, 6</Location>
<Size>273, 42</Size>
<BackColor>Window</BackColor>
<ImageFileName>D:\SharpDevelop3.0_CHECKOUT\SharpDevelop\samples\SharpDevelopReports\SampleReports\Logos\Bannerbeige2.gif</ImageFileName>
<ScaleImageToSize>False</ScaleImageToSize>
<ImageSource>File</ImageSource>
<RelativeFileName>..\..\..\..\..\..\SharpDevelop3.0_CHECKOUT\SharpDevelop\samples\SharpDevelopReports\SampleReports\Logos\Bannerbeige2.gif</RelativeFileName>
<Name>ReportImageControl</Name>
</BaseImageItem>
<BaseLineItem>
<Location>47, 87</Location>
<Size>661, 18</Size>
<BackColor>White</BackColor>
<ForeColor>ControlText</ForeColor>
<FromPoint>0, 3</FromPoint>
<ToPoint>614, 3</ToPoint>
<StartLineCap>Flat</StartLineCap>
<EndLineCap>Flat</EndLineCap>
<DashLineCap>Flat</DashLineCap>
<DashStyle>Solid</DashStyle>
<Thickness>2</Thickness>
<Name />
</BaseLineItem>
<BaseTextItem>
<Location>46, 63</Location>
<Size>109, 20</Size>
<BackColor>White</BackColor>
<Font>Microsoft Sans Serif, 12pt, style=Bold</Font>
<FormatString />
<StringTrimming>EllipsisCharacter</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
<CanGrow>False</CanGrow>
<CanShrink>False</CanShrink>
<Text>Firstname</Text>
<DrawBorder>False</DrawBorder>
<FrameColor>WindowFrame</FrameColor>
<ForeColor>ControlText</ForeColor>
<Visible>True</Visible>
<Name>reportTextItem1</Name>
</BaseTextItem>
</Items>
<FrameColor>Black</FrameColor>
<Name>ReportPageHeader</Name>
</BaseSection>
<BaseSection>
<Location>50, 223</Location>
<Size>750, 51</Size>
<BackColor>Window</BackColor>
<SectionOffset>0</SectionOffset>
<SectionMargin>50</SectionMargin>
<DrawBorder>False</DrawBorder>
<PageBreakAfter>False</PageBreakAfter>
<Items>
<BaseRowItem>
<Location>3, 10</Location>
<Size>699, 40</Size>
<BackColor>White</BackColor>
<DrawBorder>False</DrawBorder>
<ForeColor>ControlText</ForeColor>
<Visible>True</Visible>
<FrameColor>WindowFrame</FrameColor>
<Items>
<BaseDataItem>
<Location>43, 12</Location>
<Size>147, 25</Size>
<BackColor>White</BackColor>
<Font>Microsoft Sans Serif, 10pt</Font>
<FormatString />
<StringTrimming>EllipsisCharacter</StringTrimming>
<ContentAlignment>MiddleLeft</ContentAlignment>
<CanGrow>False</CanGrow>
<CanShrink>False</CanShrink>
<DataType>System.String</DataType>
<Text>First</Text>
<DrawBorder>False</DrawBorder>
<FrameColor>WindowFrame</FrameColor>
<ForeColor>ControlText</ForeColor>
<Visible>True</Visible>
<ColumnName>First</ColumnName>
<Name>unbound1</Name>
</BaseDataItem>
<BaseDataItem>
<Location>231, 12</Location>
<Size>139, 25</Size>
<BackColor>White</BackColor>
<Font>Microsoft Sans Serif, 10pt</Font>
<FormatString />
<StringTrimming>EllipsisCharacter</StringTrimming>
<ContentAlignment>MiddleLeft</ContentAlignment>
<CanGrow>False</CanGrow>
<CanShrink>False</CanShrink>
<DataType>System.String</DataType>
<Text>last</Text>
<DrawBorder>False</DrawBorder>
<FrameColor>WindowFrame</FrameColor>
<ForeColor>ControlText</ForeColor>
<Visible>True</Visible>
<ColumnName>last</ColumnName>
<Name>unbound2</Name>
</BaseDataItem>
<BaseDataItem>
<Location>426, 10</Location>
<Size>216, 25</Size>
<BackColor>White</BackColor>
<Font>Microsoft Sans Serif, 10pt</Font>
<FormatString />
<StringTrimming>EllipsisCharacter</StringTrimming>
<ContentAlignment>MiddleLeft</ContentAlignment>
<CanGrow>False</CanGrow>
<CanShrink>False</CanShrink>
<DataType>System.String</DataType>
<Text>Job</Text>
<DrawBorder>False</DrawBorder>
<FrameColor>WindowFrame</FrameColor>
<ForeColor>ControlText</ForeColor>
<Visible>True</Visible>
<ColumnName>Job</ColumnName>
<NullValue>--------------</NullValue>
<Name>unbound3</Name>
</BaseDataItem>
</Items>
<AlternateBackColor />
<ChangeBackColorEveryNRow>0</ChangeBackColorEveryNRow>
<Name>Row</Name>
</BaseRowItem>
</Items>
<FrameColor>Black</FrameColor>
<Name>ReportDetail</Name>
</BaseSection>
<BaseSection>
<Location>50, 289</Location>
<Size>750, 49</Size>
<BackColor>Window</BackColor>
<SectionOffset>0</SectionOffset>
<SectionMargin>50</SectionMargin>
<DrawBorder>False</DrawBorder>
<PageBreakAfter>False</PageBreakAfter>
<Items>
<BaseTextItem>
<Location>45, 24</Location>
<Size>483, 20</Size>
<BackColor>White</BackColor>
<Font>Microsoft Sans Serif, 8.25pt</Font>
<FormatString />
<StringTrimming>None</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
<CanGrow>False</CanGrow>
<CanShrink>False</CanShrink>
<Text>=Globals!ReportFolder</Text>
<DrawBorder>False</DrawBorder>
<FrameColor>WindowFrame</FrameColor>
<ForeColor>ControlText</ForeColor>
<Visible>True</Visible>
<Name>=Globals!ReportFolder</Name>
</BaseTextItem>
<BaseLineItem>
<Location>45, 3</Location>
<Size>663, 15</Size>
<BackColor>White</BackColor>
<ForeColor>ControlText</ForeColor>
<FromPoint>0, 0</FromPoint>
<ToPoint>656, 0</ToPoint>
<StartLineCap>Flat</StartLineCap>
<EndLineCap>Flat</EndLineCap>
<DashLineCap>Flat</DashLineCap>
<DashStyle>Solid</DashStyle>
<Thickness>2</Thickness>
<Name>object_177a5444_b8e0_4202_87d2_05cdc7cd1194</Name>
</BaseLineItem>
<BaseTextItem>
<Location>602, 24</Location>
<Size>100, 20</Size>
<BackColor>White</BackColor>
<Font>Microsoft Sans Serif, 8.25pt</Font>
<FormatString />
<StringTrimming>None</StringTrimming>
<ContentAlignment>TopLeft</ContentAlignment>
<CanGrow>False</CanGrow>
<CanShrink>False</CanShrink>
<Text>='Page ' + Globals!PageNumber</Text>
<DrawBorder>False</DrawBorder>
<FrameColor>WindowFrame</FrameColor>
<ForeColor>ControlText</ForeColor>
<Visible>True</Visible>
<Name>='Page ' + Globals!PageNumber</Name>
</BaseTextItem>
</Items>
<FrameColor>Black</FrameColor>
<Name>ReportPageFooter</Name>
</BaseSection>
<BaseSection>
<Location>50, 353</Location>
<Size>750, 55</Size>
<BackColor>Window</BackColor>
<SectionOffset>0</SectionOffset>
<SectionMargin>50</SectionMargin>
<DrawBorder>False</DrawBorder>
<PageBreakAfter>False</PageBreakAfter>
<Items />
<FrameColor>Black</FrameColor>
<Name>ReportFooter</Name>
</BaseSection>
</SectionCollection>
</ReportModel>

BIN
samples/SharpDevelopReports/SampleReports/Logos/Bannerbeige2.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

BIN
samples/SharpDevelopReports/SampleReports/Logos/SDLogo_JPG.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

331
samples/SharpDevelopReports/SampleReports/ProviderIndependent/NoConnectionReport.srd

@ -1,331 +0,0 @@ @@ -1,331 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ReportModel>
<ReportSettings>
<ReportSettings>
<DefaultFont>Microsoft Sans Serif, 10pt</DefaultFont>
<DataModel>PullData</DataModel>
<RightMargin>50</RightMargin>
<UseStandardPrinter>True</UseStandardPrinter>
<SortColumnCollection />
<AvailableFieldsCollection>
<AbstractColumn>
<ColumnName>Kategorie-Nr</ColumnName>
<DataTypeName>System.Int32</DataTypeName>
</AbstractColumn>
<AbstractColumn>
<ColumnName>Kategoriename</ColumnName>
<DataTypeName>System.String</DataTypeName>
</AbstractColumn>
<AbstractColumn>
<ColumnName>Beschreibung</ColumnName>
<DataTypeName>System.String</DataTypeName>
</AbstractColumn>
<AbstractColumn>
<ColumnName>Abbildung</ColumnName>
<DataTypeName>System.Byte[]</DataTypeName>
</AbstractColumn>
</AvailableFieldsCollection>
<NoDataMessage>No Data for this Report</NoDataMessage>
<LeftMargin>50</LeftMargin>
<PageSize>827, 1169</PageSize>
<Padding>5, 5, 5, 5</Padding>
<BottomMargin>50</BottomMargin>
<CommandType>Text</CommandType>
<ParameterCollection>
<BasicParameter>
<ParameterName>p1</ParameterName>
<ParameterValue>aaaaa</ParameterValue>
</BasicParameter>
</ParameterCollection>
<Landscape>False</Landscape>
<ReportName>Report1</ReportName>
<TopMargin>50</TopMargin>
<GroupColumnsCollection />
<GraphicsUnit>Millimeter</GraphicsUnit>
<CommandText>SELECT * FROM Kategorien</CommandText>
<ReportType>DataReport</ReportType>
<ConnectionString />
</ReportSettings>
</ReportSettings>
<SectionCollection>
<BaseSection>
<Size>727, 60</Size>
<Name>ReportHeader</Name>
<PageBreakAfter>False</PageBreakAfter>
<SectionMargin>0</SectionMargin>
<SectionOffset>0</SectionOffset>
<BackColor>White</BackColor>
<Items>
<BaseTextItem>
<BackColor>White</BackColor>
<CanShrink>False</CanShrink>
<StringTrimming>EllipsisCharacter</StringTrimming>
<Text>='Im a ' + p1 + ' Report'</Text>
<Location>194, 5</Location>
<ContentAlignment>MiddleLeft</ContentAlignment>
<Visible>True</Visible>
<DrawBorder>False</DrawBorder>
<Font>Microsoft Sans Serif, 10pt</Font>
<CanGrow>False</CanGrow>
<FormatString />
<Name>Report1</Name>
<FrameColor>WindowFrame</FrameColor>
<Size>279, 20</Size>
<ForeColor>Black</ForeColor>
</BaseTextItem>
</Items>
<Location>50, 50</Location>
<DrawBorder>False</DrawBorder>
</BaseSection>
<BaseSection>
<Size>727, 60</Size>
<Name>ReportPageHeader</Name>
<PageBreakAfter>False</PageBreakAfter>
<SectionMargin>0</SectionMargin>
<SectionOffset>0</SectionOffset>
<BackColor>White</BackColor>
<Items>
<BaseRowItem>
<AlternateBackColor />
<FrameColor>WindowFrame</FrameColor>
<Name>AbstractItem</Name>
<Location>5, 5</Location>
<Visible>True</Visible>
<Size>717, 50</Size>
<Padding>0, 0, 0, 0</Padding>
<Items>
<BaseTextItem>
<BackColor>White</BackColor>
<CanShrink>False</CanShrink>
<StringTrimming>EllipsisCharacter</StringTrimming>
<Text>Kategorie-Nr</Text>
<Location>5, 5</Location>
<ContentAlignment>MiddleLeft</ContentAlignment>
<Visible>True</Visible>
<DrawBorder>False</DrawBorder>
<Font>Microsoft Sans Serif, 10pt</Font>
<CanGrow>False</CanGrow>
<FormatString />
<Name>Kategorie-Nr1</Name>
<FrameColor>WindowFrame</FrameColor>
<Size>100, 20</Size>
<ForeColor>Black</ForeColor>
</BaseTextItem>
<BaseTextItem>
<BackColor>White</BackColor>
<CanShrink>False</CanShrink>
<StringTrimming>EllipsisCharacter</StringTrimming>
<Text>Kategoriename</Text>
<Location>184, 5</Location>
<ContentAlignment>MiddleLeft</ContentAlignment>
<Visible>True</Visible>
<DrawBorder>False</DrawBorder>
<Font>Microsoft Sans Serif, 10pt</Font>
<CanGrow>False</CanGrow>
<FormatString />
<Name>Kategoriename2</Name>
<FrameColor>WindowFrame</FrameColor>
<Size>100, 20</Size>
<ForeColor>Black</ForeColor>
</BaseTextItem>
<BaseTextItem>
<BackColor>White</BackColor>
<CanShrink>False</CanShrink>
<StringTrimming>EllipsisCharacter</StringTrimming>
<Text>Beschreibung</Text>
<Location>363, 5</Location>
<ContentAlignment>MiddleLeft</ContentAlignment>
<Visible>True</Visible>
<DrawBorder>False</DrawBorder>
<Font>Microsoft Sans Serif, 10pt</Font>
<CanGrow>False</CanGrow>
<FormatString />
<Name>Beschreibung3</Name>
<FrameColor>WindowFrame</FrameColor>
<Size>100, 20</Size>
<ForeColor>Black</ForeColor>
</BaseTextItem>
<BaseTextItem>
<BackColor>White</BackColor>
<CanShrink>False</CanShrink>
<StringTrimming>EllipsisCharacter</StringTrimming>
<Text>Abbildung</Text>
<Location>542, 5</Location>
<ContentAlignment>MiddleLeft</ContentAlignment>
<Visible>True</Visible>
<DrawBorder>False</DrawBorder>
<Font>Microsoft Sans Serif, 10pt</Font>
<CanGrow>False</CanGrow>
<FormatString />
<Name>Abbildung4</Name>
<FrameColor>WindowFrame</FrameColor>
<Size>100, 20</Size>
<ForeColor>Black</ForeColor>
</BaseTextItem>
</Items>
<ChangeBackColorEveryNRow>0</ChangeBackColorEveryNRow>
<BackColor>White</BackColor>
<DrawBorder>False</DrawBorder>
<ForeColor>Black</ForeColor>
</BaseRowItem>
</Items>
<Location>50, 125</Location>
<DrawBorder>False</DrawBorder>
</BaseSection>
<BaseSection>
<Size>727, 60</Size>
<Name>ReportDetail</Name>
<PageBreakAfter>False</PageBreakAfter>
<SectionMargin>0</SectionMargin>
<SectionOffset>0</SectionOffset>
<BackColor>White</BackColor>
<Items>
<BaseRowItem>
<AlternateBackColor />
<FrameColor>WindowFrame</FrameColor>
<Name>AbstractItem</Name>
<Location>5, 5</Location>
<Visible>True</Visible>
<Size>717, 50</Size>
<Padding>0, 0, 0, 0</Padding>
<Items>
<BaseDataItem>
<DataType>System.Int32</DataType>
<Text>Kategorie-Nr</Text>
<Font>Microsoft Sans Serif, 10pt</Font>
<Location>10, 10</Location>
<BaseTableName>Table</BaseTableName>
<CanGrow>False</CanGrow>
<ForeColor>Black</ForeColor>
<StringTrimming>None</StringTrimming>
<ColumnName>Kategorie-Nr</ColumnName>
<DrawBorder>False</DrawBorder>
<CanShrink>False</CanShrink>
<ContentAlignment>MiddleLeft</ContentAlignment>
<BackColor>White</BackColor>
<FormatString />
<Name>Kategorie-Nr</Name>
<Visible>True</Visible>
<Size>100, 20</Size>
<FrameColor>WindowFrame</FrameColor>
</BaseDataItem>
<BaseDataItem>
<DataType>System.String</DataType>
<Text>Kategoriename</Text>
<Font>Microsoft Sans Serif, 10pt</Font>
<Location>189, 10</Location>
<BaseTableName>Table</BaseTableName>
<CanGrow>False</CanGrow>
<ForeColor>Black</ForeColor>
<StringTrimming>None</StringTrimming>
<ColumnName>Kategoriename</ColumnName>
<DrawBorder>False</DrawBorder>
<CanShrink>False</CanShrink>
<ContentAlignment>MiddleLeft</ContentAlignment>
<BackColor>White</BackColor>
<FormatString />
<Name>Kategoriename</Name>
<Visible>True</Visible>
<Size>100, 20</Size>
<FrameColor>WindowFrame</FrameColor>
</BaseDataItem>
<BaseDataItem>
<DataType>System.String</DataType>
<Text>Beschreibung</Text>
<Font>Microsoft Sans Serif, 10pt</Font>
<Location>368, 10</Location>
<BaseTableName>Table</BaseTableName>
<CanGrow>False</CanGrow>
<ForeColor>Black</ForeColor>
<StringTrimming>None</StringTrimming>
<ColumnName>Beschreibung</ColumnName>
<DrawBorder>False</DrawBorder>
<CanShrink>False</CanShrink>
<ContentAlignment>MiddleLeft</ContentAlignment>
<BackColor>White</BackColor>
<FormatString />
<Name>Beschreibung</Name>
<Visible>True</Visible>
<Size>100, 20</Size>
<FrameColor>WindowFrame</FrameColor>
</BaseDataItem>
<BaseImageItem>
<ImageSource>Database</ImageSource>
<Location>547, 10</Location>
<Name>Abbildung</Name>
<BaseTableName>Table</BaseTableName>
<Size>100, 20</Size>
<ScaleImageToSize>False</ScaleImageToSize>
<BackColor>White</BackColor>
<ColumnName>Abbildung</ColumnName>
</BaseImageItem>
</Items>
<ChangeBackColorEveryNRow>0</ChangeBackColorEveryNRow>
<BackColor>White</BackColor>
<DrawBorder>False</DrawBorder>
<ForeColor>Black</ForeColor>
</BaseRowItem>
</Items>
<Location>50, 200</Location>
<DrawBorder>False</DrawBorder>
</BaseSection>
<BaseSection>
<Size>727, 60</Size>
<Name>ReportPageFooter</Name>
<PageBreakAfter>False</PageBreakAfter>
<SectionMargin>0</SectionMargin>
<SectionOffset>0</SectionOffset>
<BackColor>White</BackColor>
<Items>
<BaseTextItem>
<BackColor>White</BackColor>
<CanShrink>False</CanShrink>
<StringTrimming>EllipsisCharacter</StringTrimming>
<Text>=Globals!PageNumber</Text>
<Location>622, 5</Location>
<ContentAlignment>MiddleLeft</ContentAlignment>
<Visible>True</Visible>
<DrawBorder>False</DrawBorder>
<Font>Microsoft Sans Serif, 10pt</Font>
<CanGrow>False</CanGrow>
<FormatString />
<Name>PageNumber1</Name>
<FrameColor>WindowFrame</FrameColor>
<Size>100, 20</Size>
<ForeColor>Black</ForeColor>
</BaseTextItem>
</Items>
<Location>50, 275</Location>
<DrawBorder>False</DrawBorder>
</BaseSection>
<BaseSection>
<Size>727, 60</Size>
<Name>ReportFooter</Name>
<PageBreakAfter>False</PageBreakAfter>
<SectionMargin>0</SectionMargin>
<SectionOffset>0</SectionOffset>
<BackColor>White</BackColor>
<Items>
<BaseTextItem>
<BackColor>Gainsboro</BackColor>
<CanShrink>False</CanShrink>
<StringTrimming>None</StringTrimming>
<Text>='This Report contains : ' + count() + ' DataRows'</Text>
<Location>5, 4</Location>
<ContentAlignment>MiddleCenter</ContentAlignment>
<Visible>True</Visible>
<DrawBorder>False</DrawBorder>
<Font>Microsoft Sans Serif, 10pt</Font>
<CanGrow>False</CanGrow>
<FormatString />
<Name>AbstractItem</Name>
<FrameColor>WindowFrame</FrameColor>
<Size>620, 20</Size>
<ForeColor>Black</ForeColor>
</BaseTextItem>
</Items>
<Location>50, 350</Location>
<DrawBorder>False</DrawBorder>
</BaseSection>
</SectionCollection>
</ReportModel>

332
samples/SharpDevelopReports/SampleReports/PullModel/Parameter_Aggregate.srd

@ -1,332 +0,0 @@ @@ -1,332 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ReportModel>
<ReportSettings>
<ReportSettings>
<GridSize>8, 8</GridSize>
<PageSize>827, 1169</PageSize>
<CommandText>SELECT * FROM Kategorien</CommandText>
<Landscape>False</Landscape>
<GroupColumnsCollection />
<RightMargin>50</RightMargin>
<NoDataMessage>No Data for this Report</NoDataMessage>
<DefaultFont>Microsoft Sans Serif, 10pt</DefaultFont>
<ReportType>DataReport</ReportType>
<UseStandardPrinter>True</UseStandardPrinter>
<CommandType>Text</CommandType>
<GraphicsUnit>Millimeter</GraphicsUnit>
<TopMargin>50</TopMargin>
<ConnectionString>Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\SharpReport_TestReports\TestReports\Nordwind.mdb;Persist Security Info=False</ConnectionString>
<Padding>5, 5, 5, 5</Padding>
<LeftMargin>50</LeftMargin>
<SortColumnCollection />
<DataModel>PullData</DataModel>
<BottomMargin>50</BottomMargin>
<AvailableFieldsCollection>
<AbstractColumn>
<ColumnName>Kategorie-Nr</ColumnName>
<DataTypeName>System.Int32</DataTypeName>
</AbstractColumn>
<AbstractColumn>
<ColumnName>Kategoriename</ColumnName>
<DataTypeName>System.String</DataTypeName>
</AbstractColumn>
<AbstractColumn>
<ColumnName>Beschreibung</ColumnName>
<DataTypeName>System.String</DataTypeName>
</AbstractColumn>
<AbstractColumn>
<ColumnName>Abbildung</ColumnName>
<DataTypeName>System.Byte[]</DataTypeName>
</AbstractColumn>
</AvailableFieldsCollection>
<ReportName>Report1</ReportName>
<ParameterCollection>
<BasicParameter>
<ParameterName>p1</ParameterName>
<ParameterValue>aaaaa</ParameterValue>
</BasicParameter>
</ParameterCollection>
</ReportSettings>
</ReportSettings>
<SectionCollection>
<BaseSection>
<Size>727, 60</Size>
<Name>ReportHeader</Name>
<PageBreakAfter>False</PageBreakAfter>
<SectionMargin>0</SectionMargin>
<SectionOffset>0</SectionOffset>
<BackColor>White</BackColor>
<Items>
<BaseTextItem>
<BackColor>White</BackColor>
<CanShrink>False</CanShrink>
<StringTrimming>EllipsisCharacter</StringTrimming>
<Text>='Report with Parameter : ' + p1</Text>
<Location>235, 19</Location>
<ContentAlignment>MiddleLeft</ContentAlignment>
<Visible>True</Visible>
<DrawBorder>False</DrawBorder>
<Font>Microsoft Sans Serif, 10pt</Font>
<CanGrow>False</CanGrow>
<FormatString />
<Name>Report1</Name>
<FrameColor>WindowFrame</FrameColor>
<Size>249, 20</Size>
<ForeColor>Black</ForeColor>
</BaseTextItem>
</Items>
<Location>50, 50</Location>
<DrawBorder>False</DrawBorder>
</BaseSection>
<BaseSection>
<Size>727, 60</Size>
<Name>ReportPageHeader</Name>
<PageBreakAfter>False</PageBreakAfter>
<SectionMargin>0</SectionMargin>
<SectionOffset>0</SectionOffset>
<BackColor>White</BackColor>
<Items>
<BaseRowItem>
<AlternateBackColor />
<FrameColor>WindowFrame</FrameColor>
<Name>AbstractItem</Name>
<Location>5, 5</Location>
<Visible>True</Visible>
<Size>717, 50</Size>
<Padding>0, 0, 0, 0</Padding>
<Items>
<BaseTextItem>
<BackColor>White</BackColor>
<CanShrink>False</CanShrink>
<StringTrimming>EllipsisCharacter</StringTrimming>
<Text>Kategorie-Nr</Text>
<Location>5, 5</Location>
<ContentAlignment>MiddleLeft</ContentAlignment>
<Visible>True</Visible>
<DrawBorder>False</DrawBorder>
<Font>Microsoft Sans Serif, 10pt</Font>
<CanGrow>False</CanGrow>
<FormatString />
<Name>Kategorie-Nr1</Name>
<FrameColor>WindowFrame</FrameColor>
<Size>100, 20</Size>
<ForeColor>Black</ForeColor>
</BaseTextItem>
<BaseTextItem>
<BackColor>White</BackColor>
<CanShrink>False</CanShrink>
<StringTrimming>EllipsisCharacter</StringTrimming>
<Text>Kategoriename</Text>
<Location>184, 5</Location>
<ContentAlignment>MiddleLeft</ContentAlignment>
<Visible>True</Visible>
<DrawBorder>False</DrawBorder>
<Font>Microsoft Sans Serif, 10pt</Font>
<CanGrow>False</CanGrow>
<FormatString />
<Name>Kategoriename2</Name>
<FrameColor>WindowFrame</FrameColor>
<Size>100, 20</Size>
<ForeColor>Black</ForeColor>
</BaseTextItem>
<BaseTextItem>
<BackColor>White</BackColor>
<CanShrink>False</CanShrink>
<StringTrimming>EllipsisCharacter</StringTrimming>
<Text>Beschreibung</Text>
<Location>363, 5</Location>
<ContentAlignment>MiddleLeft</ContentAlignment>
<Visible>True</Visible>
<DrawBorder>False</DrawBorder>
<Font>Microsoft Sans Serif, 10pt</Font>
<CanGrow>False</CanGrow>
<FormatString />
<Name>Beschreibung3</Name>
<FrameColor>WindowFrame</FrameColor>
<Size>100, 20</Size>
<ForeColor>Black</ForeColor>
</BaseTextItem>
<BaseTextItem>
<BackColor>White</BackColor>
<CanShrink>False</CanShrink>
<StringTrimming>EllipsisCharacter</StringTrimming>
<Text>Abbildung</Text>
<Location>542, 5</Location>
<ContentAlignment>MiddleLeft</ContentAlignment>
<Visible>True</Visible>
<DrawBorder>False</DrawBorder>
<Font>Microsoft Sans Serif, 10pt</Font>
<CanGrow>False</CanGrow>
<FormatString />
<Name>Abbildung4</Name>
<FrameColor>WindowFrame</FrameColor>
<Size>100, 20</Size>
<ForeColor>Black</ForeColor>
</BaseTextItem>
</Items>
<ChangeBackColorEveryNRow>0</ChangeBackColorEveryNRow>
<BackColor>White</BackColor>
<DrawBorder>False</DrawBorder>
<ForeColor>Black</ForeColor>
</BaseRowItem>
</Items>
<Location>50, 125</Location>
<DrawBorder>False</DrawBorder>
</BaseSection>
<BaseSection>
<Size>727, 60</Size>
<Name>ReportDetail</Name>
<PageBreakAfter>False</PageBreakAfter>
<SectionMargin>0</SectionMargin>
<SectionOffset>0</SectionOffset>
<BackColor>White</BackColor>
<Items>
<BaseRowItem>
<AlternateBackColor />
<FrameColor>WindowFrame</FrameColor>
<Name>AbstractItem</Name>
<Location>5, 5</Location>
<Visible>True</Visible>
<Size>717, 50</Size>
<Padding>0, 0, 0, 0</Padding>
<Items>
<BaseDataItem>
<DataType>System.Int32</DataType>
<Text>Kategorie-Nr</Text>
<Font>Microsoft Sans Serif, 10pt</Font>
<Location>10, 10</Location>
<BaseTableName>Table</BaseTableName>
<CanGrow>False</CanGrow>
<ForeColor>Black</ForeColor>
<StringTrimming>None</StringTrimming>
<ColumnName>Kategorie-Nr</ColumnName>
<DrawBorder>False</DrawBorder>
<CanShrink>False</CanShrink>
<ContentAlignment>MiddleLeft</ContentAlignment>
<BackColor>White</BackColor>
<FormatString />
<Name>Kategorie-Nr</Name>
<Visible>True</Visible>
<Size>100, 20</Size>
<FrameColor>WindowFrame</FrameColor>
</BaseDataItem>
<BaseDataItem>
<DataType>System.String</DataType>
<Text>Kategoriename</Text>
<Font>Microsoft Sans Serif, 10pt</Font>
<Location>189, 10</Location>
<BaseTableName>Table</BaseTableName>
<CanGrow>False</CanGrow>
<ForeColor>Black</ForeColor>
<StringTrimming>None</StringTrimming>
<ColumnName>Kategoriename</ColumnName>
<DrawBorder>False</DrawBorder>
<CanShrink>False</CanShrink>
<ContentAlignment>MiddleLeft</ContentAlignment>
<BackColor>White</BackColor>
<FormatString />
<Name>Kategoriename</Name>
<Visible>True</Visible>
<Size>100, 20</Size>
<FrameColor>WindowFrame</FrameColor>
</BaseDataItem>
<BaseDataItem>
<DataType>System.String</DataType>
<Text>Beschreibung</Text>
<Font>Microsoft Sans Serif, 10pt</Font>
<Location>368, 10</Location>
<BaseTableName>Table</BaseTableName>
<CanGrow>False</CanGrow>
<ForeColor>Black</ForeColor>
<StringTrimming>None</StringTrimming>
<ColumnName>Beschreibung</ColumnName>
<DrawBorder>False</DrawBorder>
<CanShrink>False</CanShrink>
<ContentAlignment>MiddleLeft</ContentAlignment>
<BackColor>Silver</BackColor>
<FormatString />
<Name>Beschreibung</Name>
<Visible>True</Visible>
<Size>100, 20</Size>
<FrameColor>WindowFrame</FrameColor>
</BaseDataItem>
<BaseImageItem>
<ImageSource>Database</ImageSource>
<Location>547, 10</Location>
<Name>Abbildung</Name>
<BaseTableName>Table</BaseTableName>
<Size>100, 20</Size>
<ScaleImageToSize>False</ScaleImageToSize>
<BackColor>White</BackColor>
<ColumnName>Abbildung</ColumnName>
</BaseImageItem>
</Items>
<ChangeBackColorEveryNRow>0</ChangeBackColorEveryNRow>
<BackColor>White</BackColor>
<DrawBorder>False</DrawBorder>
<ForeColor>Black</ForeColor>
</BaseRowItem>
</Items>
<Location>50, 200</Location>
<DrawBorder>False</DrawBorder>
</BaseSection>
<BaseSection>
<Size>727, 60</Size>
<Name>ReportPageFooter</Name>
<PageBreakAfter>False</PageBreakAfter>
<SectionMargin>0</SectionMargin>
<SectionOffset>0</SectionOffset>
<BackColor>White</BackColor>
<Items>
<BaseTextItem>
<BackColor>White</BackColor>
<CanShrink>False</CanShrink>
<StringTrimming>EllipsisCharacter</StringTrimming>
<Text>=Globals!PageNumber</Text>
<Location>622, 5</Location>
<ContentAlignment>MiddleLeft</ContentAlignment>
<Visible>True</Visible>
<DrawBorder>False</DrawBorder>
<Font>Microsoft Sans Serif, 10pt</Font>
<CanGrow>False</CanGrow>
<FormatString />
<Name>PageNumber1</Name>
<FrameColor>WindowFrame</FrameColor>
<Size>100, 20</Size>
<ForeColor>Black</ForeColor>
</BaseTextItem>
</Items>
<Location>50, 275</Location>
<DrawBorder>False</DrawBorder>
</BaseSection>
<BaseSection>
<Size>727, 60</Size>
<Name>ReportFooter</Name>
<PageBreakAfter>False</PageBreakAfter>
<SectionMargin>0</SectionMargin>
<SectionOffset>0</SectionOffset>
<BackColor>White</BackColor>
<Items>
<BaseTextItem>
<BackColor>Gainsboro</BackColor>
<CanShrink>False</CanShrink>
<StringTrimming>None</StringTrimming>
<Text>='This Report contains : ' + count() + ' DataRows'</Text>
<Location>15, 3</Location>
<ContentAlignment>MiddleCenter</ContentAlignment>
<Visible>True</Visible>
<DrawBorder>False</DrawBorder>
<Font>Microsoft Sans Serif, 10pt</Font>
<CanGrow>False</CanGrow>
<FormatString />
<Name>AbstractItem</Name>
<FrameColor>WindowFrame</FrameColor>
<Size>620, 20</Size>
<ForeColor>Black</ForeColor>
</BaseTextItem>
</Items>
<Location>50, 350</Location>
<DrawBorder>False</DrawBorder>
</BaseSection>
</SectionCollection>
</ReportModel>

3
samples/SharpDevelopReports/Samples.txt

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
Samples and documentation can be found in the SharpDevelop Reporting repository:
https://github.com/icsharpcode/SharpDevelopReporting/

20
samples/SharpDevelopReports/Web/BasicReport/Default.aspx

@ -1,20 +0,0 @@ @@ -1,20 +0,0 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Basic Report</title>
</head>
<body>
<form id="form1" runat="server">
<div>
Please click the "Create Report" Button to create the report.<br />
<br />
Requirements: SQL Server 2005 or SQL Server 2005 Express Edition with instance (local)\SQLEXPRESS<br />
<a href="http://www.microsoft.com/downloads/details.aspx?familyid=06616212-0356-46a0-8da2-eebc53a68034&displaylang=en" target="_blank">Northwind Sample Database</a> installed.<br />
<br />
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Create Report" /></div>
</form>
</body>
</html>

38
samples/SharpDevelopReports/Web/BasicReport/Default.aspx.cs

@ -1,38 +0,0 @@ @@ -1,38 +0,0 @@
using System;
using System.Web.UI;
// usings for SharpDevelop Reports for .NET
using ICSharpCode.Reports.Core;
using ICSharpCode.Reports.Core.Exporter;
using ICSharpCode.Reports.Core.Exporter.ExportRenderer;
public partial class _Default : Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
// instance reporting engine
// assign parameters
ReportEngine engine = new ReportEngine();
string reportPath = Server.MapPath("SalesByYear.srd");
PageBuilder pageBuilder = engine.CreatePageBuilder(reportPath);
pageBuilder.BuildExportList();
string outputPath = Server.MapPath("SalesByYear.Pdf");
// render report
PdfRenderer pdfRenderer =
PdfRenderer.CreateInstance(pageBuilder.Pages, outputPath, false);
pdfRenderer.Start();
pdfRenderer.RenderOutput();
pdfRenderer.End();
// send report to the client
Response.ContentType = "Application/pdf";
Response.WriteFile(outputPath);
Response.End();
}
}

247
samples/SharpDevelopReports/Web/BasicReport/SalesByYear.srd

@ -1,247 +0,0 @@ @@ -1,247 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Report>
<section name="ICSharpCode.Reports.Core.ReportSettings">
<AvailableColumns>
<column>
<ColumnName value="CategoryName" />
<DataType value="" />
</column>
<column>
<ColumnName value="ProductName" />
<DataType value="" />
</column>
<column>
<ColumnName value="ProductSales" />
<DataType value="" />
</column>
</AvailableColumns>
<ReportType value="DataReport" />
<ConnectionString value="Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Northwind;Data Source=(local)\SQLEXPRESS" />
<CommandText value="SELECT [Product Sales for 1997].CategoryName, [Product Sales for 1997].ProductName, [Product Sales for 1997].ProductSales FROM [Product Sales for 1997]" />
<CommandType value="Text" />
<DataModel value="PullData" />
<NoDataMessage value="No Data for this Report" />
<DefaultFont value="Microsoft Sans Serif, 10pt" />
<ReportName value="SalesByYear" />
<DefaultMargins value="50, 50, 50, 50" />
<GridSize value="{Width=8, Height=8}" />
<Padding value="{Left=5,Top=5,Right=5,Bottom=5}" />
</section>
<section name="ReportHeader">
<BackColor value="Color [Window]" />
<Size value="{Width=803, Height=40}" />
<SectionMargin value="50" />
<PageBreakAfter value="False" />
<CanGrow value="False" />
<CanShrink value="False" />
<Name value="ReportHeader" />
<Location value="{X=0,Y=0}" />
<controls />
</section>
<section name="ReportPageHeader">
<BackColor value="Color [Window]" />
<Size value="{Width=803, Height=80}" />
<SectionMargin value="50" />
<PageBreakAfter value="False" />
<CanGrow value="False" />
<CanShrink value="False" />
<Name value="ReportPageHeader" />
<Location value="{X=0,Y=0}" />
<controls>
<control type="ICSharpCode.Reports.Addin.ReportItems.ReportTextItem" basetype="ICSharpCode.Reports.Core.BaseTextItem">
<Location value="{X=50,Y=0}" />
<Font value="Microsoft Sans Serif, 10pt" />
<Text value="SalesByYear" />
<FormatString value="" />
<StringTrimming value="EllipsisCharacter" />
<ContentAlignment value="MiddleLeft" />
<DrawBorder value="False" />
<ForeColor value="Color [ControlText]" />
<Visible value="True" />
<CanGrow value="False" />
<CanShrink value="False" />
<Name value="reportTextItem1" />
<Size value="{Width=242, Height=26}" />
<BackColor value="Color [White]" />
</control>
<control type="ICSharpCode.Reports.Addin.ReportItems.ReportTextItem" basetype="ICSharpCode.Reports.Core.BaseTextItem">
<Location value="{X=55,Y=40}" />
<Font value="Microsoft Sans Serif, 10pt" />
<Text value="CategoryName" />
<FormatString value="" />
<StringTrimming value="EllipsisCharacter" />
<ContentAlignment value="MiddleLeft" />
<DrawBorder value="False" />
<ForeColor value="Color [ControlText]" />
<Visible value="True" />
<CanGrow value="False" />
<CanShrink value="False" />
<Name value="reportTextItem2" />
<Size value="{Width=237, Height=25}" />
<BackColor value="Color [White]" />
</control>
<control type="ICSharpCode.Reports.Addin.ReportItems.ReportTextItem" basetype="ICSharpCode.Reports.Core.BaseTextItem">
<Location value="{X=297,Y=40}" />
<Font value="Microsoft Sans Serif, 10pt" />
<Text value="ProductName" />
<FormatString value="" />
<StringTrimming value="EllipsisCharacter" />
<ContentAlignment value="MiddleLeft" />
<DrawBorder value="False" />
<ForeColor value="Color [ControlText]" />
<Visible value="True" />
<CanGrow value="False" />
<CanShrink value="False" />
<Name value="reportTextItem3" />
<Size value="{Width=237, Height=25}" />
<BackColor value="Color [White]" />
</control>
<control type="ICSharpCode.Reports.Addin.ReportItems.ReportTextItem" basetype="ICSharpCode.Reports.Core.BaseTextItem">
<Location value="{X=539,Y=40}" />
<Font value="Microsoft Sans Serif, 10pt" />
<Text value="ProductSales" />
<FormatString value="" />
<StringTrimming value="EllipsisCharacter" />
<ContentAlignment value="MiddleLeft" />
<DrawBorder value="False" />
<ForeColor value="Color [ControlText]" />
<Visible value="True" />
<CanGrow value="False" />
<CanShrink value="False" />
<Name value="reportTextItem4" />
<Size value="{Width=237, Height=25}" />
<BackColor value="Color [White]" />
</control>
</controls>
</section>
<section name="ReportDetail">
<BackColor value="Color [Window]" />
<Size value="{Width=803, Height=40}" />
<SectionMargin value="50" />
<PageBreakAfter value="False" />
<CanGrow value="False" />
<CanShrink value="False" />
<Name value="ReportDetail" />
<Location value="{X=0,Y=0}" />
<controls>
<control type="ICSharpCode.Reports.Addin.ReportItems.ReportRowItem" basetype="ICSharpCode.Reports.Core.RowItem">
<Size value="{Width=727, Height=35}" />
<Location value="{X=55,Y=0}" />
<Font value="Microsoft Sans Serif, 10pt" />
<AlternateBackColor value="Color [Empty]" />
<ChangeBackColorEveryNRow value="0" />
<Padding value="{Left=5,Top=5,Right=5,Bottom=5}" />
<Items value="ICSharpCode.Reports.Core.ReportItemCollection" />
<DrawBorder value="False" />
<ForeColor value="Color [ControlText]" />
<Visible value="True" />
<CanGrow value="False" />
<CanShrink value="False" />
<Name value="row1" />
<BackColor value="Color [White]" />
<controls>
<control type="ICSharpCode.Reports.Addin.ReportItems.ReportDataItem" basetype="ICSharpCode.Reports.Core.BaseDataItem">
<Size value="{Width=237, Height=25}" />
<Location value="{X=5,Y=5}" />
<Font value="Microsoft Sans Serif, 10pt" />
<Text value="CategoryName" />
<ColumnName value="CategoryName" />
<DataType value="System.String" />
<BaseTableName value="Table" />
<NullValue value="" />
<FormatString value="" />
<StringTrimming value="EllipsisCharacter" />
<ContentAlignment value="MiddleLeft" />
<DrawBorder value="False" />
<ForeColor value="Color [ControlText]" />
<Visible value="True" />
<CanGrow value="False" />
<CanShrink value="False" />
<Name value="reportDbTextItem1" />
<BackColor value="Color [White]" />
</control>
<control type="ICSharpCode.Reports.Addin.ReportItems.ReportDataItem" basetype="ICSharpCode.Reports.Core.BaseDataItem">
<Size value="{Width=237, Height=25}" />
<Location value="{X=247,Y=5}" />
<Font value="Microsoft Sans Serif, 10pt" />
<Text value="ProductName" />
<ColumnName value="ProductName" />
<DataType value="System.String" />
<BaseTableName value="Table" />
<NullValue value="" />
<FormatString value="" />
<StringTrimming value="EllipsisCharacter" />
<ContentAlignment value="MiddleLeft" />
<DrawBorder value="False" />
<ForeColor value="Color [ControlText]" />
<Visible value="True" />
<CanGrow value="False" />
<CanShrink value="False" />
<Name value="reportDbTextItem2" />
<BackColor value="Color [White]" />
</control>
<control type="ICSharpCode.Reports.Addin.ReportItems.ReportDataItem" basetype="ICSharpCode.Reports.Core.BaseDataItem">
<Size value="{Width=237, Height=25}" />
<Location value="{X=489,Y=5}" />
<Font value="Microsoft Sans Serif, 10pt" />
<Text value="ProductSales" />
<ColumnName value="ProductSales" />
<DataType value="System.Decimal" />
<BaseTableName value="Table" />
<NullValue value="" />
<FormatString value="" />
<StringTrimming value="EllipsisCharacter" />
<ContentAlignment value="MiddleLeft" />
<DrawBorder value="False" />
<ForeColor value="Color [ControlText]" />
<Visible value="True" />
<CanGrow value="False" />
<CanShrink value="False" />
<Name value="reportDbTextItem3" />
<BackColor value="Color [White]" />
</control>
</controls>
</control>
</controls>
</section>
<section name="ReportPageFooter">
<BackColor value="Color [Window]" />
<Size value="{Width=803, Height=40}" />
<SectionMargin value="50" />
<PageBreakAfter value="False" />
<CanGrow value="False" />
<CanShrink value="False" />
<Name value="ReportPageFooter" />
<Location value="{X=0,Y=0}" />
<controls>
<control type="ICSharpCode.Reports.Addin.ReportItems.Functions.PageNumber" basetype="ICSharpCode.Reports.Core.BasePageNumber">
<Size value="{Width=242, Height=25}" />
<Location value="{X=50,Y=0}" />
<Font value="Microsoft Sans Serif, 10pt" />
<Text value="Seiten Nummer" />
<LocalizedName value="SharpReport.Toolbar.Functions.PageNumber" />
<FormatString value="" />
<StringTrimming value="EllipsisCharacter" />
<ContentAlignment value="MiddleLeft" />
<DrawBorder value="False" />
<ForeColor value="Color [ControlText]" />
<Visible value="True" />
<CanGrow value="False" />
<CanShrink value="False" />
<Name value="pageNumber1" />
<BackColor value="Color [White]" />
</control>
</controls>
</section>
<section name="ReportFooter">
<BackColor value="Color [Window]" />
<Size value="{Width=803, Height=40}" />
<SectionMargin value="50" />
<PageBreakAfter value="False" />
<CanGrow value="False" />
<CanShrink value="False" />
<Name value="ReportFooter" />
<Location value="{X=0,Y=0}" />
<controls />
</section>
</Report>

43
samples/SharpDevelopReports/Web/BasicReport/Web.Config

@ -1,43 +0,0 @@ @@ -1,43 +0,0 @@
<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true">
<assemblies>
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.ServiceProcess, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies></compilation>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
</system.web>
</configuration>

166
samples/SharpDevelopReports/Web/IListReport/ContributorList.srd

@ -1,166 +0,0 @@ @@ -1,166 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Report>
<section name="ICSharpCode.Reports.Core.ReportSettings">
<ReportType value="DataReport" />
<CommandText value="" />
<CommandType value="0" />
<DataModel value="PushData" />
<NoDataMessage value="No Data for this Report" />
<DefaultFont value="Microsoft Sans Serif, 10pt" />
<ReportName value="SharpReport1" />
<DefaultMargins value="50, 50, 50, 50" />
<GridSize value="{Width=8, Height=8}" />
<Padding value="{Left=5,Top=5,Right=5,Bottom=5}" />
</section>
<section name="ReportHeader">
<BackColor value="Color [Window]" />
<Size value="{Width=704, Height=78}" />
<SectionMargin value="50" />
<PageBreakAfter value="False" />
<CanGrow value="False" />
<CanShrink value="False" />
<Name value="ReportHeader" />
<Location value="{X=0,Y=0}" />
<controls />
</section>
<section name="ReportPageHeader">
<BackColor value="Color [Window]" />
<Size value="{Width=704, Height=63}" />
<SectionMargin value="50" />
<PageBreakAfter value="False" />
<CanGrow value="False" />
<CanShrink value="False" />
<Name value="ReportPageHeader" />
<Location value="{X=0,Y=0}" />
<controls>
<control type="ICSharpCode.Reports.Addin.ReportItems.ReportTextItem" basetype="ICSharpCode.Reports.Core.BaseTextItem">
<Location value="{X=82,Y=10}" />
<Font value="Microsoft Sans Serif, 20pt, style=Bold" />
<Text value="Some Members of the SharpDevelop Team" />
<FormatString value="" />
<StringTrimming value="EllipsisCharacter" />
<ContentAlignment value="MiddleCenter" />
<DrawBorder value="False" />
<ForeColor value="Color [ControlText]" />
<Visible value="True" />
<CanGrow value="False" />
<CanShrink value="False" />
<Name value="reportTextItem1" />
<Size value="{Width=633, Height=39}" />
<BackColor value="Color [Silver]" />
</control>
</controls>
</section>
<section name="ReportDetail">
<BackColor value="Color [Window]" />
<Size value="{Width=704, Height=51}" />
<SectionMargin value="50" />
<PageBreakAfter value="False" />
<CanGrow value="False" />
<CanShrink value="False" />
<Name value="ReportDetail" />
<Location value="{X=0,Y=0}" />
<controls>
<control type="ICSharpCode.Reports.Addin.ReportItems.ReportRowItem" basetype="ICSharpCode.Reports.Core.RowItem">
<Size value="{Width=650, Height=30}" />
<Location value="{X=77,Y=3}" />
<Font value="Microsoft Sans Serif, 10pt" />
<AlternateBackColor value="Color [Empty]" />
<ChangeBackColorEveryNRow value="0" />
<Padding value="{Left=0,Top=0,Right=0,Bottom=0}" />
<Items value="ICSharpCode.Reports.Core.ReportItemCollection" />
<DrawBorder value="False" />
<ForeColor value="Color [ControlText]" />
<Visible value="True" />
<CanGrow value="False" />
<CanShrink value="False" />
<Name value="row1" />
<BackColor value="Color [White]" />
<controls>
<control type="ICSharpCode.Reports.Addin.ReportItems.ReportDataItem" basetype="ICSharpCode.Reports.Core.BaseDataItem">
<Size value="{Width=176, Height=22}" />
<Location value="{X=5,Y=5}" />
<Font value="Microsoft Sans Serif, 10pt" />
<Text value="First" />
<ColumnName value="First" />
<DataType value="System.String" />
<BaseTableName value="" />
<NullValue value="" />
<FormatString value="" />
<StringTrimming value="EllipsisCharacter" />
<ContentAlignment value="MiddleLeft" />
<DrawBorder value="False" />
<ForeColor value="Color [ControlText]" />
<Visible value="True" />
<CanGrow value="False" />
<CanShrink value="False" />
<Name value="reportDbTextItem1" />
<BackColor value="Color [White]" />
</control>
<control type="ICSharpCode.Reports.Addin.ReportItems.ReportDataItem" basetype="ICSharpCode.Reports.Core.BaseDataItem">
<Size value="{Width=180, Height=20}" />
<Location value="{X=190,Y=5}" />
<Font value="Microsoft Sans Serif, 10pt" />
<Text value="Last" />
<ColumnName value="Last" />
<DataType value="System.String" />
<BaseTableName value="" />
<NullValue value="" />
<FormatString value="" />
<StringTrimming value="EllipsisCharacter" />
<ContentAlignment value="MiddleLeft" />
<DrawBorder value="False" />
<ForeColor value="Color [ControlText]" />
<Visible value="True" />
<CanGrow value="False" />
<CanShrink value="False" />
<Name value="reportDbTextItem2" />
<BackColor value="Color [White]" />
</control>
<control type="ICSharpCode.Reports.Addin.ReportItems.ReportDataItem" basetype="ICSharpCode.Reports.Core.BaseDataItem">
<Size value="{Width=100, Height=20}" />
<Location value="{X=400,Y=5}" />
<Font value="Microsoft Sans Serif, 10pt" />
<Text value="Job" />
<ColumnName value="Job" />
<DataType value="System.String" />
<BaseTableName value="" />
<NullValue value="" />
<FormatString value="" />
<StringTrimming value="EllipsisCharacter" />
<ContentAlignment value="MiddleLeft" />
<DrawBorder value="False" />
<ForeColor value="Color [ControlText]" />
<Visible value="True" />
<CanGrow value="False" />
<CanShrink value="False" />
<Name value="reportDbTextItem3" />
<BackColor value="Color [White]" />
</control>
</controls>
</control>
</controls>
</section>
<section name="ReportPageFooter">
<BackColor value="Color [Window]" />
<Size value="{Width=704, Height=47}" />
<SectionMargin value="50" />
<PageBreakAfter value="False" />
<CanGrow value="False" />
<CanShrink value="False" />
<Name value="ReportPageFooter" />
<Location value="{X=0,Y=0}" />
<controls />
</section>
<section name="ReportFooter">
<BackColor value="Color [Window]" />
<Size value="{Width=704, Height=55}" />
<SectionMargin value="50" />
<PageBreakAfter value="False" />
<CanGrow value="False" />
<CanShrink value="False" />
<Name value="ReportFooter" />
<Location value="{X=0,Y=0}" />
<controls />
</section>
</Report>

17
samples/SharpDevelopReports/Web/IListReport/Default.aspx

@ -1,17 +0,0 @@ @@ -1,17 +0,0 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Basic Report</title>
</head>
<body>
<form id="form1" runat="server">
<div>
Please click the "Create Report" Button to create the report.<br />
<br />
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Create Report" /></div>
</form>
</body>
</html>

113
samples/SharpDevelopReports/Web/IListReport/Default.aspx.cs

@ -1,113 +0,0 @@ @@ -1,113 +0,0 @@
using System;
using System.Collections.Generic;
using System.Web.UI;
// usings for SharpDevelop Reports for .NET
using ICSharpCode.Reports.Core;
using ICSharpCode.Reports.Core.Exporter;
using ICSharpCode.Reports.Core.Exporter.ExportRenderer;
public partial class _Default : Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
contributors = CreateTestList();
// instance reporting engine
// assign parameters
ReportEngine engine = new ReportEngine();
string reportPath = Server.MapPath("ContributorList.srd");
ReportModel reportModel = ReportEngine.LoadReportModel(reportPath);
PageBuilder pageBuilder = engine.CreatePageBuilder(reportModel, contributors);
pageBuilder.BuildExportList();
string outputPath = Server.MapPath("ContributorList.pdf");
// render report
PdfRenderer pdfRenderer =
PdfRenderer.CreateInstance(pageBuilder.Pages, outputPath, false);
pdfRenderer.Start();
pdfRenderer.RenderOutput();
pdfRenderer.End();
// send report to the client
Response.ContentType = "Application/pdf";
Response.WriteFile(outputPath);
Response.End();
}
private TestList contributors;
public TestList Contributors
{
get { return contributors; }
}
private TestList CreateTestList()
{
TestList list = new TestList();
list.Add(new LastFirst("Christoph", "Wille", "Senior Project Wrangler"));
list.Add(new LastFirst("Bernhard", "Spuida", "Senior Project Wrangler"));
list.Add(new LastFirst("Daniel", "Grunwald", "Technical Lead"));
list.Add(new LastFirst("Matt", "Ward", "NUnit"));
list.Add(new LastFirst("David", "Srbecky", "Debugger"));
list.Add(new LastFirst("Peter", "Forstmeier", "SharpReport"));
list.Add(new LastFirst("Markus", "Palme", "Prg."));
list.Add(new LastFirst("Georg", "Brandl", "Prg."));
list.Add(new LastFirst("Roman", "Taranchenko", ""));
list.Add(new LastFirst("Denis", "Erchoff", ""));
list.Add(new LastFirst("Ifko", "Kovacka", ""));
list.Add(new LastFirst("Nathan", "Allen", ""));
list.Add(new LastFirst("Dickon", "Field", "DBTools"));
list.Add(new LastFirst("Troy", "Simpson", "Prg."));
list.Add(new LastFirst("David", "Alpert", "Prg."));
return list;
}
public class LastFirst
{
private string last;
private string first;
private string job;
public LastFirst(string last, string first, string job)
{
this.last = last;
this.first = first;
this.job = job;
}
public string Last
{
get { return last; }
}
public string First
{
get { return first; }
}
public string Job
{
get { return job; }
}
}
public class TestList : List<LastFirst>
{
}
}

44
samples/SharpDevelopReports/Web/IListReport/Web.Config

@ -1,44 +0,0 @@ @@ -1,44 +0,0 @@
<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true">
<assemblies>
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.ServiceProcess, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies></compilation>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
</system.web>
</configuration>

3
samples/SharpDevelopReports/doc/ReadMe.txt

@ -1,3 +0,0 @@ @@ -1,3 +0,0 @@
The Getting Started Guide is located here:
http://sharpdevelopreports.net/FeatureTour.ashx

31
samples/SharpDevelopReports/src/AssemblyInfo.cs

@ -1,31 +0,0 @@ @@ -1,31 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Information about this assembly is defined by the following
// attributes.
//
// change them to the information which is associated with the assembly
// you compile.
[assembly: AssemblyTitle("SharpReportSamples")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SharpReportSamples")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// This sets the default COM visibility of types in the assembly to invisible.
// If you need to expose a type to COM, use [ComVisible(true)] on that type.
[assembly: ComVisible(false)]
// The assembly version has following format :
//
// Major.Minor.Build.Revision
//
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
[assembly: AssemblyVersion("1.0.*")]

37
samples/SharpDevelopReports/src/ReportSamples.sln

@ -1,37 +0,0 @@ @@ -1,37 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
# SharpDevelop 4.2.0.7716-alpha
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpReportSamples", "SharpReportSamples\SharpReportSamples.csproj", "{BB5D34DA-3561-48B1-894A-46765C2A18C1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Reports.Core", "..\..\..\src\AddIns\Misc\Reports\ICSharpCode.Reports.Core\ICSharpCode.Reports.Core.csproj", "{4B2239FF-8FD6-431D-9D22-1B8049BA6917}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
Debug|x86 = Debug|x86
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BB5D34DA-3561-48B1-894A-46765C2A18C1}.Debug|Any CPU.Build.0 = Debug|x86
{BB5D34DA-3561-48B1-894A-46765C2A18C1}.Debug|Any CPU.ActiveCfg = Debug|x86
{BB5D34DA-3561-48B1-894A-46765C2A18C1}.Release|Any CPU.Build.0 = Release|x86
{BB5D34DA-3561-48B1-894A-46765C2A18C1}.Release|Any CPU.ActiveCfg = Release|x86
{BB5D34DA-3561-48B1-894A-46765C2A18C1}.Debug|x86.Build.0 = Debug|x86
{BB5D34DA-3561-48B1-894A-46765C2A18C1}.Debug|x86.ActiveCfg = Debug|x86
{BB5D34DA-3561-48B1-894A-46765C2A18C1}.Release|x86.Build.0 = Release|x86
{BB5D34DA-3561-48B1-894A-46765C2A18C1}.Release|x86.ActiveCfg = Release|x86
{4B2239FF-8FD6-431D-9D22-1B8049BA6917}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4B2239FF-8FD6-431D-9D22-1B8049BA6917}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4B2239FF-8FD6-431D-9D22-1B8049BA6917}.Debug|x86.Build.0 = Debug|Any CPU
{4B2239FF-8FD6-431D-9D22-1B8049BA6917}.Debug|x86.ActiveCfg = Debug|Any CPU
{4B2239FF-8FD6-431D-9D22-1B8049BA6917}.Release|Any CPU.Build.0 = Release|Any CPU
{4B2239FF-8FD6-431D-9D22-1B8049BA6917}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4B2239FF-8FD6-431D-9D22-1B8049BA6917}.Release|x86.Build.0 = Release|Any CPU
{4B2239FF-8FD6-431D-9D22-1B8049BA6917}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

86
samples/SharpDevelopReports/src/SharpReportSamples/ContributorsList.cs

@ -1,86 +0,0 @@ @@ -1,86 +0,0 @@
/*
* Erstellt mit SharpDevelop.
* Benutzer: Peter Forstmeier
* Datum: 07.01.2010
* Zeit: 19:46
*
* Sie können diese Vorlage unter Extras > Optionen > Codeerstellung > Standardheader ändern.
*/
using System;
using System.Collections.Generic;
using ICSharpCode.Reports.Core;
namespace SharpReportSamples
{
/// <summary>
/// Description of ContributorsList.
/// </summary>
public class ContributorsReportData
{
public static ContributorCollection CreateContributorsList () {
ContributorCollection list = new ContributorCollection();
list.Add(new Contributor("Christoph","Wille","Senior Project Wrangler"));
list.Add(new Contributor("Bernhard","Spuida","Senior Project Wrangler"));
list.Add(new Contributor("Daniel","Grunwald","Technical Lead"));
list.Add(new Contributor("Matt","Ward","NUnit"));
list.Add(new Contributor("David","Srbecky","Debugger"));
list.Add(new Contributor("Peter","Forstmeier","SharpDevelop.Reports"));
list.Add(new Contributor("Markus","Palme","Prg."));
list.Add(new Contributor("Itai","Bar-Haim","Prg."));
list.Add(new Contributor("Russel","Wilkins","Prg."));
list.Add(new Contributor("Justin","Dearing","Prg."));
list.Add(new Contributor("Christian","Hornung","Prg."));
list.Add(new Contributor("Siegfried","Pammer","Prg."));
list.Add(new Contributor("Georg","Brandl","Prg."));
list.Add(new Contributor("Roman","Taranchenko",""));
list.Add(new Contributor("Denis","Erchoff",""));
list.Add(new Contributor("Ifko","Kovacka",""));
list.Add(new Contributor("Nathan","Allen",""));
list.Add(new Contributor("Troy","Simpson","Prg."));
list.Add(new Contributor("David","Alpert","Prg."));
list.Add(new Contributor("Fred","Flintstone",null));
return list;
}
}
public class Contributor {
string last;
string first;
string job;
public Contributor(string last, string first,string job)
{
this.last = last;
this.first = first;
this.job = job;
}
public string Last {
get {
return last;
}
}
public string First {
get {
return first;
}
}
public string Job {
get {
return job;
}
}
}
public class ContributorCollection: List<Contributor>{
}
}

94
samples/SharpDevelopReports/src/SharpReportSamples/EventLogger.cs

@ -1,94 +0,0 @@ @@ -1,94 +0,0 @@
/*
* Erstellt mit SharpDevelop.
* Benutzer: Peter Forstmeier
* Datum: 24.03.2010
* Zeit: 19:45
*
* Sie können diese Vorlage unter Extras > Optionen > Codeerstellung > Standardheader ändern.
*/
using System;
using System.Collections;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
namespace SharpReportSamples
{
/// <summary>
/// Description of EventLogger.
/// </summary>
public class EventLogger
{
ImageList imageList ;
string fileName;
public EventLogger(string fileName)
{
this.fileName = fileName;
this.Run();
}
private void Run() {
EventLog ev = new EventLog();
ev.Log = "System";
ev.MachineName = "."; // Lokale Maschine
FillImageList();
ArrayList ar = new ArrayList();
foreach (System.Diagnostics.EventLogEntry entry in ev.Entries)
{
if (entry.TimeWritten > DateTime.Now.AddDays(-1))
{
ar.Add(entry);
}
}
this.EventLog = ar;
}
// using (var provider = ProfilingDataSQLiteProvider.FromFile("ProfilingSession.sdps"))
// var functions = provider.GetFunctions(0, provider.DataSets.Count - 1);
// foreach (CallTreeNode n in functions) Console.WriteLine("{0}: {1} calls, {2:f2}ms", n.Name, n.CallCount, n.TimeSpent);
private void FillImageList() {
string ns = this.GetType().Namespace;
// System.Console.WriteLine("{0}",ns);
Assembly a = Assembly.GetExecutingAssembly();
string [] resNames = a.GetManifestResourceNames();
// foreach(string s in resNames)
// {
// System.Console.WriteLine("{0}",s);
// }
this.imageList = new ImageList();
Stream imgStream = a.GetManifestResourceStream("SharpReportSamples.Resources.error.ico");
// Stream imgStream = a.GetManifestResourceStream("SharpReportSamples.Resources.Error.png");
this.imageList.Images.Add(Image.FromStream(imgStream));
imgStream = a.GetManifestResourceStream("SharpReportSamples.Resources.Info.png");
this.imageList.Images.Add(Image.FromStream(imgStream));
imgStream = a.GetManifestResourceStream("SharpReportSamples.Resources.warning.ico");
// imgStream = a.GetManifestResourceStream("SharpReportSamples.Resources.Warning.png");
this.imageList.Images.Add(Image.FromStream(imgStream));
// System.Console.WriteLine("imagelist contains {0} images",this.imageList.Images.Count);
}
public ArrayList EventLog {get;set;}
public ImageList Images
{
get {return this.imageList;}
}
}
}

163
samples/SharpDevelopReports/src/SharpReportSamples/MainForm.Designer.cs generated

@ -1,163 +0,0 @@ @@ -1,163 +0,0 @@
/*
* Erstellt mit SharpDevelop.
* Benutzer: Peter Forstmeier
* Datum: 03.01.2010
* Zeit: 17:43
*
* Sie können diese Vorlage unter Extras > Optionen > Codeerstellung > Standardheader ändern.
*/
namespace SharpReportSamples
{
partial class MainForm
{
/// <summary>
/// Designer variable used to keep track of non-visual components.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Disposes resources used by the form.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing) {
if (components != null) {
components.Dispose();
}
}
base.Dispose(disposing);
}
/// <summary>
/// This method is required for Windows Forms designer support.
/// Do not change the method contents inside the source code editor. The Forms designer might
/// not be able to load this method if it was changed manually.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("FormSheet");
System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("PullModel");
System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("PushModel-IList");
System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("Provider Independent");
System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("Customized");
System.Windows.Forms.TreeNode treeNode6 = new System.Windows.Forms.TreeNode("StoredProcedure");
System.Windows.Forms.TreeNode treeNode7 = new System.Windows.Forms.TreeNode("Sample Reports", new System.Windows.Forms.TreeNode[] {
treeNode1,
treeNode2,
treeNode3,
treeNode4,
treeNode5,
treeNode6});
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.treeView1 = new System.Windows.Forms.TreeView();
this.label1 = new System.Windows.Forms.Label();
this.previewControl1 = new ICSharpCode.Reports.Core.ReportViewer.PreviewControl();
this.menuStrip2 = new System.Windows.Forms.MenuStrip();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.Location = new System.Drawing.Point(0, 24);
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.treeView1);
this.splitContainer1.Panel1.Padding = new System.Windows.Forms.Padding(10);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.label1);
this.splitContainer1.Panel2.Controls.Add(this.previewControl1);
this.splitContainer1.Panel2.Padding = new System.Windows.Forms.Padding(10, 10, 10, 5);
this.splitContainer1.Size = new System.Drawing.Size(841, 464);
this.splitContainer1.SplitterDistance = 168;
this.splitContainer1.TabIndex = 0;
//
// treeView1
//
this.treeView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.treeView1.Location = new System.Drawing.Point(10, 10);
this.treeView1.Margin = new System.Windows.Forms.Padding(5);
this.treeView1.Name = "treeView1";
treeNode1.Name = "FormSheetNode";
treeNode1.Text = "FormSheet";
treeNode2.Name = "PullModelNode";
treeNode2.Text = "PullModel";
treeNode3.Name = "IListNode";
treeNode3.Text = "PushModel-IList";
treeNode4.Name = "ProviderIndependedNode";
treeNode4.Text = "Provider Independent";
treeNode5.Name = "CustomizedNode";
treeNode5.Text = "Customized";
treeNode6.Name = "StoredProcedure";
treeNode6.Text = "StoredProcedure";
treeNode7.Name = "Customized";
treeNode7.Text = "Sample Reports";
this.treeView1.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
treeNode7});
this.treeView1.Size = new System.Drawing.Size(148, 444);
this.treeView1.TabIndex = 0;
this.treeView1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.TreeView1MouseDoubleClick);
//
// label1
//
this.label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.label1.Location = new System.Drawing.Point(10, 436);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(649, 23);
this.label1.TabIndex = 3;
this.label1.Text = "label1";
//
// previewControl1
//
this.previewControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.previewControl1.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
this.previewControl1.Location = new System.Drawing.Point(10, 10);
this.previewControl1.Margin = new System.Windows.Forms.Padding(3, 3, 30, 3);
this.previewControl1.Messages = null;
this.previewControl1.Name = "previewControl1";
this.previewControl1.Padding = new System.Windows.Forms.Padding(5);
this.previewControl1.Size = new System.Drawing.Size(649, 414);
this.previewControl1.TabIndex = 2;
//
// menuStrip2
//
this.menuStrip2.Location = new System.Drawing.Point(0, 0);
this.menuStrip2.Name = "menuStrip2";
this.menuStrip2.Size = new System.Drawing.Size(841, 24);
this.menuStrip2.TabIndex = 1;
this.menuStrip2.Text = "menuStrip2";
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(841, 488);
this.Controls.Add(this.splitContainer1);
this.Controls.Add(this.menuStrip2);
this.Name = "MainForm";
this.Text = "SharpReportSamples";
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
private System.Windows.Forms.Label label1;
private System.Windows.Forms.MenuStrip menuStrip2;
private ICSharpCode.Reports.Core.ReportViewer.PreviewControl previewControl1;
private System.Windows.Forms.TreeView treeView1;
private System.Windows.Forms.SplitContainer splitContainer1;
}
}

446
samples/SharpDevelopReports/src/SharpReportSamples/MainForm.cs

@ -1,446 +0,0 @@ @@ -1,446 +0,0 @@
/*
* Erstellt mit SharpDevelop.
* Benutzer: Peter Forstmeier
* Datum: 03.01.2010
* Zeit: 17:43
*
* Sie können diese Vorlage unter Extras > Optionen > Codeerstellung > Standardheader ändern.
*/
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using ICSharpCode.Reports.Core;
using ICSharpCode.Reports.Core.Exporter.ExportRenderer;
using ICSharpCode.Reports.Core.Globals;
namespace SharpReportSamples
{
/// <summary>
/// Description of MainForm.
/// </summary>
public partial class MainForm : Form
{
private TreeNode formNode;
private TreeNode pullNode;
private TreeNode iListNode;
private TreeNode providerIndependent;
private TreeNode customized;
private TreeNode storedProcedure;
private ImageList imageList;
public MainForm()
{
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent();
InitTree();
UpdateStatusbar (Application.StartupPath);
this.previewControl1.Messages = new ReportViewerMessagesProvider();
}
private void InitTree ()
{
string formSheetDir = @"\FormSheet\JCA.srd";
string startupPath = Application.StartupPath;
string samplesDir = @"SharpDevelopReports\";
int i = startupPath.IndexOf(samplesDir);
string startPath = startupPath.Substring(0,i + samplesDir.Length) + @"SampleReports\";
string pathToFormSheet = startPath + formSheetDir;
this.formNode = this.treeView1.Nodes[0].Nodes[0];
this.pullNode = this.treeView1.Nodes[0].Nodes[1];
this.iListNode = this.treeView1.Nodes[0].Nodes[2];
this.providerIndependent = this.treeView1.Nodes[0].Nodes[3];
this.customized = this.treeView1.Nodes[0].Nodes[4];
this.storedProcedure = this.treeView1.Nodes[0].Nodes[5];
AddNodesToTree (this.formNode,startPath + @"FormSheet\" );
AddNodesToTree (this.pullNode,startPath + @"PullModel\" );
AddNodesToTree (this.iListNode,startPath + @"IList\" );
AddNodesToTree (this.providerIndependent,startPath + @"ProviderIndependent\" );
AddNodesToTree (this.customized,startPath + @"Customized\" );
AddNodesToTree (this.storedProcedure,startPath + @"StoredProcedure\" );
}
private void AddNodesToTree (TreeNode parent,string path)
{
if (!Directory.Exists(path)) {
return;
}
string[] filePaths = Directory.GetFiles(path, "*.srd");
TreeNode reportNode = null;
foreach (string fullPath in filePaths){
string fileName = Path.GetFileNameWithoutExtension(fullPath);
reportNode = new TreeNode(fileName);
reportNode.Tag = fullPath;
parent.Nodes.Add(reportNode);
}
}
private void UpdateStatusbar (string text)
{
this.label1.Text = text;
}
private void RunStandardReport(string reportName)
{
string s = Path.GetFileNameWithoutExtension(reportName);
if (s == "ContributorsList" ) {
this.RunContributors(reportName);
}
else if (s == "ContributorsListWithParameters"){
this.RunContributorsWithParameters(reportName);
}
else if (s == "SalesByYear_2Params") {
{
StoredProcedureWithParam(reportName);
}
}
else if (s == "NoConnectionReport") {
this.RunProviderIndependent(reportName);
} else if (s =="EventLog")
this.RunEventLogger_Pdf(reportName);
else {
ReportParameters parameters = ReportEngine.LoadParameters(reportName);
if ((parameters != null)&& (parameters.Parameters.Count > 0)){
parameters.Parameters[0].ParameterValue = "I'm the Parameter";
}
this.previewControl1.PreviewLayoutChanged += delegate (object sender, EventArgs e)
{
this.RunStandardReport(reportName);
};
this.previewControl1.RunReport(reportName,parameters);
}
}
#region ProviderIndependent
private void RunProviderIndependent (string reportName)
{
string conOleDbString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\SharpReport_TestReports\TestReports\Nordwind.mdb;Persist Security Info=False";
ReportParameters parameters = ReportEngine.LoadParameters(reportName);
ConnectionObject con = ConnectionObject.CreateInstance(conOleDbString,
System.Data.Common.DbProviderFactories.GetFactory("System.Data.OleDb") );
parameters.ConnectionObject = con;
parameters.Parameters[0].ParameterValue = "Provider Independent";
this.previewControl1.PreviewLayoutChanged += delegate (object sender, EventArgs e)
{
this.RunProviderIndependent(reportName);
};
this.previewControl1.RunReport(reportName,parameters);
}
#endregion
#region StoredProcedure
void StoredProcedureWithParam(string fileName)
{
var model = ReportEngine.LoadReportModel(fileName);
ReportParameters parameters = ReportEngine.LoadParameters(fileName);
// The report has no sorting, so we can add it by code
parameters.SortColumnCollection.Add (new SortColumn("ShippedDate",
System.ComponentModel.ListSortDirection.Ascending));
parameters.SqlParameters[0].ParameterValue = new System.DateTime(1997,11,01).ToString();
parameters.SqlParameters[1].ParameterValue = new System.DateTime(1997,12,31).ToString();
this.previewControl1.PreviewLayoutChanged += delegate (object sender, EventArgs e)
{
this.previewControl1.RunReport(fileName,parameters);
};
this.previewControl1.RunReport(fileName,parameters);
}
#endregion
#region Contributors
//
/// <summary>
/// Some values in the Datastructure are not set (means they are null), you can handle this values by setting
/// the NullValue in the properties of this Item, or, you can use the SectionRenderingEvent as shown
/// below
/// </summary>
/// <param name="fileName"></param>
private void RunContributors (string fileName)
{
ReportModel model = ReportEngine.LoadReportModel(fileName);
// Console.WriteLine(model.ReportSettings.PageSize);
// model.ReportSettings.PageSize = new Size(model.ReportSettings.PageSize.Width,400);
// Console.WriteLine(model.ReportSettings.PageSize);
// sorting is done here, but, be carefull, misspelled fieldnames will cause an exception
//ReportSettings settings = model.ReportSettings;
//settings.SortColumnCollection.Add(new SortColumn("First",System.ComponentModel.ListSortDirection.Ascending));
// Both variable declarations are valid
ContributorCollection contributorCollection = ContributorsReportData.CreateContributorsList();
IDataManager dataManager = DataManager.CreateInstance(contributorCollection,model.ReportSettings);
// List<Contributor> list = ContributorsReportData.CreateContributorsList();
// IDataManager dm = DataManager.CreateInstance(list,model.ReportSettings);
this.previewControl1.PreviewLayoutChanged += delegate (object sender, EventArgs e)
{
this.previewControl1.RunReport(model,dataManager);
};
this.previewControl1.RunReport(model,dataManager);
}
private void V1_RunContributorsWithParameters(string fileName)
{
ReportModel model = ReportEngine.LoadReportModel(fileName);
ReportParameters parameters = ReportEngine.LoadParameters(fileName);
BasicParameter p1 = parameters.Parameters[0];
p1.ParameterValue ="Value of Parameter";
List<Contributor> list = ContributorsReportData.CreateContributorsList();
this.previewControl1.PreviewLayoutChanged += delegate (object sender, EventArgs e)
{
this.previewControl1.RunReport(model,list,parameters);
};
this.previewControl1.RunReport(model,list,parameters);
}
// Can use this version for Parameters as well
private void V2_RunContributorsWithParameters(string fileName)
{
var model = ReportEngine.LoadReportModel(fileName);
ReportParameters parameters = ReportEngine.LoadParameters(fileName);
BasicParameter p1 = parameters.Parameters[0];
p1.ParameterValue ="Value of Parameter";
List<Contributor> list = ContributorsReportData.CreateContributorsList();
IDataManager dataManager = DataManager.CreateInstance(list,model.ReportSettings);
this.previewControl1.PreviewLayoutChanged += delegate (object sender, EventArgs e)
{
this.previewControl1.RunReport(model,dataManager);
};
this.previewControl1.RunReport(model,dataManager);
}
private void RunContributorsWithParameters(string fileName)
{
var model = ReportEngine.LoadReportModel(fileName);
ReportParameters parameters = ReportEngine.LoadParameters(fileName);
BasicParameter p1 = parameters.Parameters[0];
p1.ParameterValue ="Value of Parameter";
List<Contributor> list = ContributorsReportData.CreateContributorsList();
IReportCreator creator = ReportEngine.CreatePageBuilder(model,list,parameters);
creator.SectionRendering += PushPrinting;
creator.BuildExportList();
using (PdfRenderer pdfRenderer = PdfRenderer.CreateInstance(creator,SelectFilename(),true))
{
pdfRenderer.Start();
pdfRenderer.RenderOutput();
pdfRenderer.End();
}
}
private void RunEventLogger_Pdf (string fileName)
{
Cursor.Current = Cursors.WaitCursor;
EventLogger eventLogger = new EventLogger(fileName);
Cursor.Current = Cursors.Default;
this.imageList = eventLogger.Images;
ReportModel model = ReportEngine.LoadReportModel(fileName);
IReportCreator creator = ReportEngine.CreatePageBuilder(model,eventLogger.EventLog,null);
creator.SectionRendering += PushPrinting;
creator.BuildExportList();
using (PdfRenderer pdfRenderer = PdfRenderer.CreateInstance(creator,SelectFilename(),true))
{
pdfRenderer.Start();
pdfRenderer.RenderOutput();
pdfRenderer.End();
}
}
private void RunEventLogger (string fileName)
{
/*
using (var provider = ProfilingDataSQLiteProvider.FromFile("ProfilingSession.sdps")){
var functions = provider.GetFunctions(0, provider.DataSets.Count - 1);
foreach (CallTreeNode n in functions) {
Console.WriteLine("{0}: {1} calls, {2:f2}ms", n.Name, n.CallCount, n.TimeSpent);
}
}
*/
Cursor.Current = Cursors.WaitCursor;
EventLogger eLog = new EventLogger(fileName);
Cursor.Current = Cursors.Default;
this.imageList = eLog.Images;
ReportModel model = ReportEngine.LoadReportModel(fileName);
IDataManager dataManager = DataManager.CreateInstance(eLog.EventLog,model.ReportSettings);
// this.previewControl1.SectionRendering += PushPrinting;
this.previewControl1.PreviewLayoutChanged += delegate (object sender, EventArgs e)
{
this.previewControl1.RunReport(model,dataManager);
};
this.previewControl1.RunReport(model,dataManager);
}
//Handles SectionRenderEvent
int hour = 0;
private void PushPrinting (object sender, SectionRenderEventArgs e )
{
string sectionName = e.Section.Name;
if (sectionName == ReportSectionNames.ReportHeader) {
Console.WriteLine("PushPrinting :" + ReportSectionNames.ReportHeader);
}
else if (sectionName == ReportSectionNames.ReportPageHeader) {
Console.WriteLine("PushPrinting :" +ReportSectionNames .ReportPageHeader);
}
else if (sectionName == ReportSectionNames.ReportDetail){
Console.WriteLine("PushPrinting :" + ReportSectionNames.ReportDetail);
// TimeWritten
BaseDataItem time = e.Section.FindItem("BaseDataItem1") as BaseDataItem;
if (time != null) {
DateTime dateTime = Convert.ToDateTime(time.DBValue);
int newhour = dateTime.Hour;
if (hour != newhour) {
hour = newhour;
// e.Section.Items[0].DrawBorder = true;
e.Section.Items[0].FrameColor = Color.Black;
// e.Section.Items[0].BackColor = Color.LightGray;
time.DBValue = dateTime.Hour.ToString();
time.ContentAlignment = ContentAlignment.MiddleLeft;
} else {
// time.DrawBorder = false;
e.Section.Items[0].FrameColor = Color.White;
// e.Section.Items[0].BackColor = Color.White;
time.DBValue = dateTime.Minute.ToString() + ":" + dateTime.Second.ToString();
time.ContentAlignment = ContentAlignment.MiddleRight;
}
}
// D:\SharpDevelop3.0_WorkingCopy\SharpDevelop\samples\SharpDevelopReports\SampleReports\EventLogger\Error.png
// Image
BaseDataItem dataItem = e.Section.FindItem("EntryType") as BaseDataItem;
if (dataItem != null) {
string str = dataItem.DBValue;
Image image = null;
if (str == "Information") {
image = this.imageList.Images[1];
} else if (str == "Warning") {
image = this.imageList.Images[2];
} else if (str == "Error")
{
image = this.imageList.Images[0];
}
if (image != null)
{
BaseImageItem imageItem = e.Section.FindItem("BaseImageItem1") as BaseImageItem;
if (imageItem != null) {
imageItem.Image = image;
}
}
}
}
else if (sectionName == ReportSectionNames.ReportPageFooter){
Console.WriteLine("PushPrinting :" + ReportSectionNames.ReportPageFooter);
}
else if (sectionName == ReportSectionNames.ReportFooter){
Console.WriteLine("PushPrinting :" + ReportSectionNames.ReportFooter);
}
else{
throw new WrongSectionException(sectionName);
}
}
private string SelectFilename()
{
using (SaveFileDialog saveDialog = new SaveFileDialog()){
saveDialog.FileName = "_pdf";
saveDialog.DefaultExt = "PDF";
saveDialog.ValidateNames = true;
if(saveDialog.ShowDialog() == DialogResult.OK){
return saveDialog.FileName;
} else {
return String.Empty;
}
}
}
#endregion
void TreeView1MouseDoubleClick(object sender, MouseEventArgs e)
{
TreeNode selectedNode = this.treeView1.SelectedNode;
if (selectedNode != null) {
RunStandardReport(selectedNode.Tag.ToString());
}
}
}
}

126
samples/SharpDevelopReports/src/SharpReportSamples/MainForm.resx

@ -1,126 +0,0 @@ @@ -1,126 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="menuStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>237, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>25</value>
</metadata>
</root>

31
samples/SharpDevelopReports/src/SharpReportSamples/Program.cs

@ -1,31 +0,0 @@ @@ -1,31 +0,0 @@
/*
* Erstellt mit SharpDevelop.
* Benutzer: Peter Forstmeier
* Datum: 03.01.2010
* Zeit: 17:43
*
* Sie können diese Vorlage unter Extras > Optionen > Codeerstellung > Standardheader ändern.
*/
using System;
using System.Windows.Forms;
namespace SharpReportSamples
{
/// <summary>
/// Class with program entry point.
/// </summary>
internal sealed class Program
{
/// <summary>
/// Program entry point.
/// </summary>
[STAThread]
private static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
}
}

31
samples/SharpDevelopReports/src/SharpReportSamples/Properties/AssemblyInfo.cs

@ -1,31 +0,0 @@ @@ -1,31 +0,0 @@
#region Using directives
using System;
using System.Reflection;
using System.Runtime.InteropServices;
#endregion
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("SharpReportSamples")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SharpReportSamples")]
[assembly: AssemblyCopyright("Copyright 2010")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// This sets the default COM visibility of types in the assembly to invisible.
// If you need to expose a type to COM, use [ComVisible(true)] on that type.
[assembly: ComVisible(false)]
// The assembly version has following format :
//
// Major.Minor.Build.Revision
//
// You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.*")]

77
samples/SharpDevelopReports/src/SharpReportSamples/ReportViewerMessagesProvider.cs

@ -1,77 +0,0 @@ @@ -1,77 +0,0 @@
/*
* Erstellt mit SharpDevelop.
* Benutzer: Peter Forstmeier
* Datum: 14.01.2010
* Zeit: 20:08
*
* Sie können diese Vorlage unter Extras > Optionen > Codeerstellung > Standardheader ändern.
*/
using System;
namespace SharpReportSamples
{
/// <summary>
/// Description of ReportViewerMessagesProvider.
/// </summary>
public class ReportViewerMessagesProvider:ICSharpCode.Reports.Core.ReportViewer.IReportViewerMessages
{
public ReportViewerMessagesProvider(){
}
public string BackButtonText {
get {
return "Back";
}
}
public string NextButtonMessage {
get {
return "Forward";
}
}
public string PrintButtonMessage {
get {
return "Printer";
}
}
public string CancelButtonMessage {
get {
return "Stop";
}
}
public string ZoomMessage {
get {
return "Zoom";
}
}
public string PagesCreatedMessage {
get{
return "Pages created";
}
}
public string PdfFileMessage {
get{
return "Create PdfFile";
}
}
public string FirstPageMessage {
get {
return "FirstPage";
}
}
public string LastPageMessage {
get {
return "LastPage";
}
}
}
}

BIN
samples/SharpDevelopReports/src/SharpReportSamples/Resources/Info.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

BIN
samples/SharpDevelopReports/src/SharpReportSamples/Resources/error.ico

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

BIN
samples/SharpDevelopReports/src/SharpReportSamples/Resources/warning.ico

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

80
samples/SharpDevelopReports/src/SharpReportSamples/SharpReportSamples.csproj

@ -1,80 +0,0 @@ @@ -1,80 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{BB5D34DA-3561-48B1-894A-46765C2A18C1}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<OutputType>Exe</OutputType>
<RootNamespace>SharpReportSamples</RootNamespace>
<AssemblyName>SharpReportSamples</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<AppDesignerFolder>Properties</AppDesignerFolder>
<SourceAnalysisOverrideSettingsFile>C:\Users\Peter Forstmeier\AppData\Roaming\ICSharpCode/SharpDevelop3.0\Settings.SourceAnalysis</SourceAnalysisOverrideSettingsFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'x86' ">
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>bin\Debug\</OutputPath>
<DebugSymbols>True</DebugSymbols>
<DebugType>Full</DebugType>
<Optimize>False</Optimize>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<DefineConstants>DEBUG;TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<OutputPath>bin\Release\</OutputPath>
<DebugSymbols>False</DebugSymbols>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
<ItemGroup>
<Reference Include="Irony">
<HintPath>..\..\..\..\src\AddIns\Misc\Reports\Irony\obj\Debug\Irony.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.Management" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="ContributorsList.cs" />
<Compile Include="EventLogger.cs" />
<Compile Include="MainForm.cs" />
<Compile Include="MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ReportViewerMessagesProvider.cs" />
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Resources\error.ico" />
<EmbeddedResource Include="Resources\Info.png" />
<EmbeddedResource Include="Resources\warning.ico" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\src\AddIns\Misc\Reports\ICSharpCode.Reports.Core\ICSharpCode.Reports.Core.csproj">
<Project>{4B2239FF-8FD6-431D-9D22-1B8049BA6917}</Project>
<Name>ICSharpCode.Reports.Core</Name>
</ProjectReference>
</ItemGroup>
</Project>

85
samples/XamlDesigner/App.xaml.cs

@ -2,11 +2,16 @@ using System; @@ -2,11 +2,16 @@ using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Windows;
using ICSharpCode.XamlDesigner.Configuration;
using System.Windows.Threading;
using System.Diagnostics;
using ICSharpCode.WpfDesign.Designer;
using ICSharpCode.XamlDesigner.Configuration;
namespace ICSharpCode.XamlDesigner
{
@ -14,12 +19,70 @@ namespace ICSharpCode.XamlDesigner @@ -14,12 +19,70 @@ namespace ICSharpCode.XamlDesigner
{
public static string[] Args;
protected override void OnStartup(StartupEventArgs e)
{
protected override void OnStartup(StartupEventArgs e)
{
AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(AppDomain_CurrentDomain_AssemblyResolve);
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(AppDomain_CurrentDomain_UnhandledException);
DragDropExceptionHandler.UnhandledException += new ThreadExceptionEventHandler(DragDropExceptionHandler_UnhandledException);
DispatcherUnhandledException += App_DispatcherUnhandledException;
Args = e.Args;
base.OnStartup(e);
}
base.OnStartup(e);
}
private static bool internalLoad = false;
private static string lastRequesting = null;
Assembly AppDomain_CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
{
if (internalLoad)
return null;
if (args.Name.Split(new [] { ',' })[0].Trim().EndsWith(".resources"))
return null;
internalLoad = true;
Assembly ass = null;
try {
ass = Assembly.Load(args.Name);
}
catch (Exception) { }
if (ass == null && args.RequestingAssembly != null) {
lastRequesting = args.RequestingAssembly.Location;
var dir = Path.GetDirectoryName(args.RequestingAssembly.Location);
var file = args.Name.Split(new [] { ',' })[0].Trim() + ".dll";
try {
ass = Assembly.LoadFrom(Path.Combine(dir, file));
}
catch (Exception) { }
}
else if (lastRequesting != null) {
var dir = Path.GetDirectoryName(lastRequesting);
var file = args.Name.Split(new [] { ',' })[0].Trim() + ".dll";
try {
ass = Assembly.LoadFrom(Path.Combine(dir, file));
}
catch (Exception) { }
}
internalLoad = false;
return ass;
}
void DragDropExceptionHandler_UnhandledException(object sender, ThreadExceptionEventArgs e)
{
Shell.ReportException(e.Exception);
}
void AppDomain_CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
Shell.ReportException(e.ExceptionObject as Exception);
}
void App_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
{
@ -27,10 +90,10 @@ namespace ICSharpCode.XamlDesigner @@ -27,10 +90,10 @@ namespace ICSharpCode.XamlDesigner
e.Handled = true;
}
protected override void OnExit(ExitEventArgs e)
{
Settings.Default.Save();
base.OnExit(e);
}
protected override void OnExit(ExitEventArgs e)
{
Settings.Default.Save();
base.OnExit(e);
}
}
}

45
samples/XamlDesigner/Configuration/Settings.Designer.cs generated

@ -37,25 +37,34 @@ namespace ICSharpCode.XamlDesigner.Configuration { @@ -37,25 +37,34 @@ namespace ICSharpCode.XamlDesigner.Configuration {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute(@"<DockingManager>
<ResizingPanel Orientation=""Horizontal"">
<ResizingPanel ResizeWidth=""200"" Orientation=""Vertical"">
<DockablePane ResizeHeight=""441.36166666666668"" Anchor=""Left"">
<DockableContent Name=""content1"" AutoHide=""false"" />
</DockablePane>
<DockablePane ResizeWidth=""200"" Anchor=""Left"">
<DockableContent Name=""content2"" AutoHide=""false"" />
</DockablePane>
[global::System.Configuration.DefaultSettingValueAttribute(@"<DockingManager version=""1.3.0"">
<ResizingPanel ResizeWidth=""*"" ResizeHeight=""*"" EffectiveSize=""0,0"" Orientation=""Vertical"">
<ResizingPanel ResizeWidth=""*"" ResizeHeight=""*"" EffectiveSize=""1920,1153.04"" Orientation=""Horizontal"">
<ResizingPanel ResizeWidth=""250"" ResizeHeight=""*"" EffectiveSize=""250,1153.04"" Orientation=""Vertical"">
<DockablePane ResizeWidth=""0.742440632565806*"" ResizeHeight=""0.742440632565806*"" EffectiveSize=""250,851.609103178282"" ID=""bb7a5fd3-be24-4636-8fd6-a50a09e65e69"" Anchor=""Left"" IsAutoHidden=""false"">
<DockableContent Name=""content1"" FloatingWindowSize=""250,400"" ChildIndex=""0"" Width=""315"" Height=""1153.04"" Anchor=""Right"" State=""Docked"" />
</DockablePane>
<DockablePane ResizeWidth=""0.257559367434194*"" ResizeHeight=""0.257559367434194*"" EffectiveSize=""250,295.430896821718"" ID=""17cd1941-1004-4ed9-8cda-03c254681289"" Anchor=""Left"" IsAutoHidden=""false"">
<DockableContent Name=""content2"" FloatingWindowSize=""250,400"" ChildIndex=""0"" Width=""328"" Height=""1153.04"" Anchor=""Right"" State=""Docked"" />
</DockablePane>
</ResizingPanel>
<ResizingPanel ResizeWidth=""*"" ResizeHeight=""*"" EffectiveSize=""1408,1153.04"" Orientation=""Vertical"">
<DocumentPaneResizingPanel ResizeWidth=""*"" ResizeHeight=""*"" EffectiveSize=""1408,965.04"" Orientation=""Vertical"">
<DocumentPane IsMain=""true"" ResizeWidth=""*"" ResizeHeight=""*"" EffectiveSize=""1408,965.04"" />
</DocumentPaneResizingPanel>
<DockablePane ResizeWidth=""*"" ResizeHeight=""182"" EffectiveSize=""1408,182"" ID=""ebd34b7e-6a89-42c6-b172-0e666b0d8a0a"" Anchor=""Bottom"" IsAutoHidden=""false"">
<DockableContent Name=""content3"" FloatingWindowSize=""250,400"" ChildIndex=""0"" Width=""1920"" Height=""400"" Anchor=""Bottom"" State=""Docked"" />
</DockablePane>
</ResizingPanel>
<ResizingPanel ResizeWidth=""250"" ResizeHeight=""*"" EffectiveSize=""250,1153.04"" Orientation=""Vertical"">
<DockablePane ResizeWidth=""0.145251345356991*"" ResizeHeight=""0.145251345356991*"" EffectiveSize=""250,166.609103178283"" ID=""aa545474-48b3-49a6-b76c-b0c625e79e4c"" Anchor=""Right"" IsAutoHidden=""false"">
<DockableContent Name=""content5"" FloatingWindowSize=""250,400"" ChildIndex=""0"" Width=""550.666666666667"" Height=""1153.04"" Anchor=""Right"" State=""Docked"" />
</DockablePane>
<DockablePane ResizeWidth=""0.854748654643009*"" ResizeHeight=""0.854748654643009*"" EffectiveSize=""250,980.430896821717"" ID=""64e5518b-2c83-4e22-908d-a510a6995c27"" Anchor=""Right"" IsAutoHidden=""false"">
<DockableContent Name=""content4"" FloatingWindowSize=""250,400"" ChildIndex=""0"" Width=""399.967430639324"" Height=""1153.04"" Anchor=""Right"" State=""Docked"" />
</DockablePane>
</ResizingPanel>
</ResizingPanel>
<ResizingPanel Orientation=""Vertical"">
<DocumentPanePlaceHolder />
<DockablePane ResizeHeight=""138"" Anchor=""Bottom"">
<DockableContent Name=""content3"" AutoHide=""false"" />
</DockablePane>
</ResizingPanel>
<DockablePane ResizeWidth=""271"" Anchor=""Right"">
<DockableContent Name=""content4"" AutoHide=""false"" />
</DockablePane>
</ResizingPanel>
<Hidden />
<Windows />

45
samples/XamlDesigner/Configuration/Settings.settings

@ -6,25 +6,34 @@ @@ -6,25 +6,34 @@
<Value Profile="(Default)">0,0,0,0</Value>
</Setting>
<Setting Name="AvalonDockLayout" Type="System.String" Scope="User">
<Value Profile="(Default)">&lt;DockingManager&gt;
&lt;ResizingPanel Orientation="Horizontal"&gt;
&lt;ResizingPanel ResizeWidth="200" Orientation="Vertical"&gt;
&lt;DockablePane ResizeHeight="441.36166666666668" Anchor="Left"&gt;
&lt;DockableContent Name="content1" AutoHide="false" /&gt;
&lt;/DockablePane&gt;
&lt;DockablePane ResizeWidth="200" Anchor="Left"&gt;
&lt;DockableContent Name="content2" AutoHide="false" /&gt;
&lt;/DockablePane&gt;
<Value Profile="(Default)">&lt;DockingManager version="1.3.0"&gt;
&lt;ResizingPanel ResizeWidth="*" ResizeHeight="*" EffectiveSize="0,0" Orientation="Vertical"&gt;
&lt;ResizingPanel ResizeWidth="*" ResizeHeight="*" EffectiveSize="1920,1153.04" Orientation="Horizontal"&gt;
&lt;ResizingPanel ResizeWidth="250" ResizeHeight="*" EffectiveSize="250,1153.04" Orientation="Vertical"&gt;
&lt;DockablePane ResizeWidth="0.742440632565806*" ResizeHeight="0.742440632565806*" EffectiveSize="250,851.609103178282" ID="bb7a5fd3-be24-4636-8fd6-a50a09e65e69" Anchor="Left" IsAutoHidden="false"&gt;
&lt;DockableContent Name="content1" FloatingWindowSize="250,400" ChildIndex="0" Width="315" Height="1153.04" Anchor="Right" State="Docked" /&gt;
&lt;/DockablePane&gt;
&lt;DockablePane ResizeWidth="0.257559367434194*" ResizeHeight="0.257559367434194*" EffectiveSize="250,295.430896821718" ID="17cd1941-1004-4ed9-8cda-03c254681289" Anchor="Left" IsAutoHidden="false"&gt;
&lt;DockableContent Name="content2" FloatingWindowSize="250,400" ChildIndex="0" Width="328" Height="1153.04" Anchor="Right" State="Docked" /&gt;
&lt;/DockablePane&gt;
&lt;/ResizingPanel&gt;
&lt;ResizingPanel ResizeWidth="*" ResizeHeight="*" EffectiveSize="1408,1153.04" Orientation="Vertical"&gt;
&lt;DocumentPaneResizingPanel ResizeWidth="*" ResizeHeight="*" EffectiveSize="1408,965.04" Orientation="Vertical"&gt;
&lt;DocumentPane IsMain="true" ResizeWidth="*" ResizeHeight="*" EffectiveSize="1408,965.04" /&gt;
&lt;/DocumentPaneResizingPanel&gt;
&lt;DockablePane ResizeWidth="*" ResizeHeight="182" EffectiveSize="1408,182" ID="ebd34b7e-6a89-42c6-b172-0e666b0d8a0a" Anchor="Bottom" IsAutoHidden="false"&gt;
&lt;DockableContent Name="content3" FloatingWindowSize="250,400" ChildIndex="0" Width="1920" Height="400" Anchor="Bottom" State="Docked" /&gt;
&lt;/DockablePane&gt;
&lt;/ResizingPanel&gt;
&lt;ResizingPanel ResizeWidth="250" ResizeHeight="*" EffectiveSize="250,1153.04" Orientation="Vertical"&gt;
&lt;DockablePane ResizeWidth="0.145251345356991*" ResizeHeight="0.145251345356991*" EffectiveSize="250,166.609103178283" ID="aa545474-48b3-49a6-b76c-b0c625e79e4c" Anchor="Right" IsAutoHidden="false"&gt;
&lt;DockableContent Name="content5" FloatingWindowSize="250,400" ChildIndex="0" Width="550.666666666667" Height="1153.04" Anchor="Right" State="Docked" /&gt;
&lt;/DockablePane&gt;
&lt;DockablePane ResizeWidth="0.854748654643009*" ResizeHeight="0.854748654643009*" EffectiveSize="250,980.430896821717" ID="64e5518b-2c83-4e22-908d-a510a6995c27" Anchor="Right" IsAutoHidden="false"&gt;
&lt;DockableContent Name="content4" FloatingWindowSize="250,400" ChildIndex="0" Width="399.967430639324" Height="1153.04" Anchor="Right" State="Docked" /&gt;
&lt;/DockablePane&gt;
&lt;/ResizingPanel&gt;
&lt;/ResizingPanel&gt;
&lt;ResizingPanel Orientation="Vertical"&gt;
&lt;DocumentPanePlaceHolder /&gt;
&lt;DockablePane ResizeHeight="138" Anchor="Bottom"&gt;
&lt;DockableContent Name="content3" AutoHide="false" /&gt;
&lt;/DockablePane&gt;
&lt;/ResizingPanel&gt;
&lt;DockablePane ResizeWidth="271" Anchor="Right"&gt;
&lt;DockableContent Name="content4" AutoHide="false" /&gt;
&lt;/DockablePane&gt;
&lt;/ResizingPanel&gt;
&lt;Hidden /&gt;
&lt;Windows /&gt;

12
samples/XamlDesigner/MainWindow.xaml

@ -42,6 +42,12 @@ @@ -42,6 +42,12 @@
<CommandBinding Command="Default:MainWindow.ExitCommand"
Executed="ExitCommand_Executed" />
<CommandBinding Command="Default:MainWindow.RunCommand"
Executed="RunCommand_Executed" />
<CommandBinding Command="Default:MainWindow.RenderToBitmapCommand"
Executed="RenderToBitmapCommand_Executed" />
</Window.CommandBindings>
<DockPanel>
@ -78,8 +84,12 @@ @@ -78,8 +84,12 @@
<MenuItem Command="Default:MainWindow.RefreshCommand" />
<MenuItem Command="Find" />
</MenuItem>
<MenuItem Header="Test">
<MenuItem Command="Default:MainWindow.RunCommand" />
<MenuItem Command="Default:MainWindow.RenderToBitmapCommand" />
</MenuItem>
</Menu>
<AvalonDock:DockingManager x:Name="uxDockingManager">
<AvalonDock:ResizingPanel>

79
samples/XamlDesigner/MainWindow_Commands.cs

@ -1,9 +1,18 @@ @@ -1,9 +1,18 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Input;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Xml;
using Microsoft.Win32;
namespace ICSharpCode.XamlDesigner
{
@ -13,6 +22,8 @@ namespace ICSharpCode.XamlDesigner @@ -13,6 +22,8 @@ namespace ICSharpCode.XamlDesigner
public static SimpleCommand SaveAllCommand = new SimpleCommand("Save All", ModifierKeys.Control | ModifierKeys.Shift, Key.S);
public static SimpleCommand ExitCommand = new SimpleCommand("Exit");
public static SimpleCommand RefreshCommand = new SimpleCommand("Refresh", Key.F5);
public static SimpleCommand RunCommand = new SimpleCommand("Run", ModifierKeys.Shift, Key.F5);
public static SimpleCommand RenderToBitmapCommand = new SimpleCommand("Render to Bitmap");
static void RenameCommands()
{
@ -59,6 +70,72 @@ namespace ICSharpCode.XamlDesigner @@ -59,6 +70,72 @@ namespace ICSharpCode.XamlDesigner
{
Shell.Instance.SaveAll();
}
void RunCommand_Executed(object sender, ExecutedRoutedEventArgs e)
{
StringBuilder sb = new StringBuilder();
var xmlWriter = XmlWriter.Create(new StringWriter(sb));
Shell.Instance.CurrentDocument.DesignSurface.SaveDesigner(xmlWriter);
var txt = sb.ToString();
var xmlReader = XmlReader.Create(new StringReader(txt));
var ctl = XamlReader.Load(xmlReader);
Window wnd = ctl as Window;
if (wnd == null) {
wnd = new Window();
wnd.Content = ctl;
}
wnd.Show();
}
void RenderToBitmapCommand_Executed(object sender, ExecutedRoutedEventArgs e)
{
int desiredWidth = 300;
int desiredHeight = 300;
StringBuilder sb = new StringBuilder();
var xmlWriter = XmlWriter.Create(new StringWriter(sb));
Shell.Instance.CurrentDocument.DesignSurface.SaveDesigner(xmlWriter);
var txt = sb.ToString();
var xmlReader = XmlReader.Create(new StringReader(txt));
var ctl = XamlReader.Load(xmlReader) as Control;
if (ctl is Window) {
var wnd = ctl as Window;
wnd.Width = desiredWidth;
wnd.Height = desiredHeight;
wnd.Top = -10000;
wnd.Left = -10000;
wnd.Show();
} else {
ctl.Measure(new Size(desiredWidth, desiredHeight));
ctl.Arrange(new Rect(new Size(desiredWidth, desiredHeight)));
}
RenderTargetBitmap bmp = new RenderTargetBitmap(300, 300, 96, 96, PixelFormats.Default);
bmp.Render(ctl);
var encoder = new PngBitmapEncoder();
encoder.Frames.Add(BitmapFrame.Create(bmp));
var dlg = new SaveFileDialog();
dlg.Filter = "*.png|*.png";
if (dlg.ShowDialog() == true) {
using (Stream stm = File.OpenWrite(dlg.FileName)) {
encoder.Save(stm);
stm.Flush();
}
}
if (ctl is Window) {
var wnd = ctl as Window;
wnd.Close();
}
}
void ExitCommand_Executed(object sender, ExecutedRoutedEventArgs e)
{

13
src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/src/MSpecApplication.cs

@ -24,6 +24,7 @@ using System.Linq; @@ -24,6 +24,7 @@ using System.Linq;
using System.Text;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.UnitTesting;
@ -103,7 +104,7 @@ namespace ICSharpCode.MachineSpecifications @@ -103,7 +104,7 @@ namespace ICSharpCode.MachineSpecifications
string runnerDirectory = Path.Combine(assemblyDirectory, @"Tools\Machine.Specifications");
string executableName = "mspec";
if (TargetPlatformIs32Bit(project))
if (project.IsPlatformTarget32BitOrAnyCPU())
executableName += "-x86";
if (!ProjectUsesDotnet20Runtime(project))
executableName += "-clr4";
@ -122,16 +123,6 @@ namespace ICSharpCode.MachineSpecifications @@ -122,16 +123,6 @@ namespace ICSharpCode.MachineSpecifications
return false;
}
bool TargetPlatformIs32Bit(IProject project)
{
MSBuildBasedProject msbuildProject = project as MSBuildBasedProject;
if (msbuildProject != null) {
string platformTarget = msbuildProject.GetEvaluatedProperty("PlatformTarget");
return String.Compare(platformTarget, "x86", true) == 0;
}
return false;
}
string WorkingDirectory {
get {
return Path.GetDirectoryName(project.OutputAssemblyFullPath);

18
src/AddIns/Analysis/Profiler/Frontend/AddIn/Src/Dialogs/ProfileExecutableForm.xaml.cs

@ -17,6 +17,7 @@ @@ -17,6 +17,7 @@
// DEALINGS IN THE SOFTWARE.
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
@ -86,12 +87,17 @@ namespace ICSharpCode.Profiler.AddIn.Dialogs @@ -86,12 +87,17 @@ namespace ICSharpCode.Profiler.AddIn.Dialogs
MessageService.ShowError(StringParser.Parse("${res:AddIns.Profiler.ProfileExecutable.ErrorMessage}"));
} catch (FileNotFoundException ex) {
MessageService.ShowError(ex.Message);
} catch (DirectoryNotFoundException ex2) {
MessageService.ShowError(ex2.Message);
} catch (UnauthorizedAccessException ex4) {
MessageService.ShowError(ex4.Message);
} catch (Exception ex3) {
MessageService.ShowException(ex3);
} catch (DirectoryNotFoundException ex) {
MessageService.ShowError(ex.Message);
} catch (UnauthorizedAccessException ex) {
MessageService.ShowError(ex.Message);
} catch (Win32Exception ex) {
if ((uint)ex.HResult == 0x80004005)
MessageService.ShowError(ex.Message);
else
MessageService.ShowException(ex);
} catch (Exception ex) {
MessageService.ShowException(ex);
}
}

16
src/AddIns/Analysis/UnitTesting/NUnit/NUnitConsoleApplication.cs

@ -100,7 +100,7 @@ namespace ICSharpCode.UnitTesting @@ -100,7 +100,7 @@ namespace ICSharpCode.UnitTesting
}
// As SharpDevelop can't debug 64-bit applications yet, use
// 32-bit NUnit even for AnyCPU test projects.
if (IsPlatformTarget32BitOrAnyCPU(project)) {
if (project.IsPlatformTarget32BitOrAnyCPU()) {
exe += "-x86";
}
exe += ".exe";
@ -246,20 +246,6 @@ namespace ICSharpCode.UnitTesting @@ -246,20 +246,6 @@ namespace ICSharpCode.UnitTesting
return b.ToString();
}
/// <summary>
/// Checks that the project's PlatformTarget is x32 for the active configuration.
/// </summary>
static bool IsPlatformTarget32BitOrAnyCPU(IProject project)
{
MSBuildBasedProject msbuildProject = project as MSBuildBasedProject;
if (msbuildProject != null) {
string platformTarget = msbuildProject.GetEvaluatedProperty("PlatformTarget");
return string.IsNullOrEmpty(platformTarget) || String.Equals(platformTarget, "x86", StringComparison.OrdinalIgnoreCase)
|| String.Equals(platformTarget, "AnyCPU", StringComparison.OrdinalIgnoreCase);
}
return false;
}
static bool ProjectUsesDotnet20Runtime(IProject project)
{
var p = project as ICSharpCode.SharpDevelop.Project.Converter.IUpgradableProject;

4
src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.csproj

@ -79,17 +79,19 @@ @@ -79,17 +79,19 @@
<Compile Include="Src\Completion\CSharpInsightItem.cs" />
<Compile Include="Src\Completion\CSharpMethodInsight.cs" />
<Compile Include="Src\Completion\EventCreationCompletionData.cs" />
<Compile Include="Src\Completion\FormatItemCompletionData.cs" />
<Compile Include="Src\Completion\ImportCompletionData.cs" />
<Compile Include="Src\Completion\OverrideCompletionData.cs" />
<Compile Include="Src\Completion\OverrideEqualsGetHashCodeCompletionData.cs" />
<Compile Include="Src\Completion\OverrideToStringCompletionData.cs" />
<Compile Include="Src\Completion\PartialCompletionData.cs" />
<Compile Include="Src\Completion\SegmentTrackingOutputFormatter.cs" />
<Compile Include="Src\Completion\TypeCompletionData.cs" />
<Compile Include="Src\Completion\XmlDocCompletionData.cs" />
<Compile Include="Src\CSharpSemanticHighlighterVisitor.cs">
<DependentUpon>CSharpSemanticHighlighter.cs</DependentUpon>
</Compile>
<Compile Include="Src\FormattingStrategy\CSharpFormattingOptionsContainer.cs" />
<Compile Include="Src\FormattingStrategy\CSharpFormattingOptionsContainer.cs" />
<Compile Include="Src\FormattingStrategy\CSharpFormatter.cs" />
<Compile Include="Src\FormattingStrategy\CSharpFormattingOptionsPersistence.cs" />
<Compile Include="Src\FormattingStrategy\FormattingOptionBinding.cs" />

47
src/AddIns/BackendBindings/CSharpBinding/Project/Src/CaretReferenceHighlightRenderer.cs

@ -71,6 +71,7 @@ namespace CSharpBinding @@ -71,6 +71,7 @@ namespace CSharpBinding
timer.Tick += (sender, e) => ResolveAtCaret();
editor.Caret.LocationChanged += CaretLocationChanged;
editor.Document.ChangeCompleted += DocumentChanged;
textView.VisualLinesChanged += VisualLinesChanged;
SD.ParserService.ParseInformationUpdated += ParseInformationUpdated;
SD.ParserService.LoadSolutionProjectsThread.Finished += LoadSolutionProjectsThreadFinished;
@ -79,18 +80,17 @@ namespace CSharpBinding @@ -79,18 +80,17 @@ namespace CSharpBinding
public void Dispose()
{
timer.Stop();
this.textView.BackgroundRenderers.Remove(this);
editor.Caret.LocationChanged -= CaretLocationChanged;
editor.Document.ChangeCompleted -= DocumentChanged;
textView.VisualLinesChanged -= VisualLinesChanged;
SD.ParserService.ParseInformationUpdated -= ParseInformationUpdated;
SD.ParserService.LoadSolutionProjectsThread.Finished -= LoadSolutionProjectsThreadFinished;
}
public void Draw(TextView textView, DrawingContext drawingContext)
{
var codeEditorOptions = editor.Options as ICodeEditorOptions;
if ((codeEditorOptions != null) && !codeEditorOptions.HighlightSymbol) {
// User has disabled highlighting of symbols
return;
}
if (currentReferences == null) {
if (textView.VisualLines.Count == 0)
return;
@ -130,21 +130,48 @@ namespace CSharpBinding @@ -130,21 +130,48 @@ namespace CSharpBinding
return;
currentReferences = null;
textView.InvalidateLayer(KnownLayer.Selection);
}
void LoadSolutionProjectsThreadFinished(object sender, EventArgs e)
{
currentReferences = null;
textView.InvalidateLayer(KnownLayer.Selection);
StartTimer();
}
void CaretLocationChanged(object sender, EventArgs e)
{
if (currentReferences != null) {
int caretOffset = editor.Caret.Offset;
if (!currentReferences.Any(r => r.Offset <= caretOffset && caretOffset <= r.EndOffset)) {
// If the caret moved outside any highlighted identifier, immediately clear the highlight
// as the caret is not on the same symbol as before
SetCurrentSymbol(null);
}
}
StartTimer();
}
void DocumentChanged(object sender, EventArgs e)
{
// If the document has changed, the current symbol likely also has changed (most edits are at the caret position),
// so immediately clear the highlighting.
SetCurrentSymbol(null);
StartTimer();
}
void StartTimer()
{
if (caretMovementTokenSource != null)
caretMovementTokenSource.Cancel();
timer.Stop();
timer.Start();
var codeEditorOptions = editor.Options as ICodeEditorOptions;
if (codeEditorOptions == null || codeEditorOptions.HighlightSymbol) {
// If symbol highlighting is enabled
timer.Start();
} else {
// Clear highlighting if its disabled
SetCurrentSymbol(null);
}
}
async void ResolveAtCaret()

4
src/AddIns/BackendBindings/CSharpBinding/Project/Src/Completion/CSharpCompletionDataFactory.cs

@ -136,7 +136,7 @@ namespace CSharpBinding.Completion @@ -136,7 +136,7 @@ namespace CSharpBinding.Completion
ICompletionData ICompletionDataFactory.CreateNewPartialCompletionData(int declarationBegin, IUnresolvedTypeDefinition type, IUnresolvedMember m)
{
return new CompletionData("TODO: partial completion");
return new PartialCompletionData(declarationBegin, m.Resolve(contextAtCaret.CurrentTypeResolveContext), contextAtCaret);
}
IEnumerable<ICompletionData> ICompletionDataFactory.CreateCodeTemplateCompletionData()
@ -162,7 +162,7 @@ namespace CSharpBinding.Completion @@ -162,7 +162,7 @@ namespace CSharpBinding.Completion
ICompletionData ICompletionDataFactory.CreateFormatItemCompletionData(string format, string description, object example)
{
return new CompletionData("TODO: format item completion");
return new FormatItemCompletionData(format, description, example);
}
ICompletionData ICompletionDataFactory.CreateXmlDocCompletionData(string tag, string description, string tagInsertionText)

14
src/AddIns/BackendBindings/CSharpBinding/Project/Src/Completion/CompletionData.cs

@ -87,8 +87,20 @@ namespace CSharpBinding.Completion @@ -87,8 +87,20 @@ namespace CSharpBinding.Completion
context.EndOffset = context.StartOffset + this.CompletionText.Length;
}
object fancyContent;
object IFancyCompletionItem.Content {
get { return this.DisplayText; }
get {
if (fancyContent == null) {
fancyContent = CreateFancyContent();
}
return fancyContent;
}
}
protected virtual object CreateFancyContent()
{
return DisplayText;
}
object fancyDescription;

53
src/AddIns/BackendBindings/CSharpBinding/Project/Src/Completion/FormatItemCompletionData.cs

@ -0,0 +1,53 @@ @@ -0,0 +1,53 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using ICSharpCode.SharpDevelop.Editor.CodeCompletion;
namespace CSharpBinding.Completion
{
class FormatItemCompletionData : CompletionData
{
readonly string description;
readonly string format;
public FormatItemCompletionData(string format, string description, object example)
: base(format)
{
this.description = description;
this.format = format;
this.DisplayText = format + " - " + description;
try {
this.Description = string.Format("{0:" + format + "}", example);
} catch (FormatException) {
}
}
protected override object CreateFancyContent()
{
TextBlock textBlock = new TextBlock();
textBlock.Inlines.Add(new Run(format));
textBlock.Inlines.Add(new Run(" - " + description) { Foreground = SystemColors.GrayTextBrush });
return textBlock;
}
}
}

93
src/AddIns/BackendBindings/CSharpBinding/Project/Src/Completion/PartialCompletionData.cs

@ -0,0 +1,93 @@ @@ -0,0 +1,93 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using ICSharpCode.NRefactory.CSharp;
using ICSharpCode.NRefactory.CSharp.Refactoring;
using ICSharpCode.NRefactory.CSharp.Resolver;
using ICSharpCode.NRefactory.TypeSystem;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Editor.CodeCompletion;
using CSharpBinding.FormattingStrategy;
namespace CSharpBinding.Completion
{
/// <summary>
/// Item for 'partial' completion.
/// </summary>
class PartialCompletionData : EntityCompletionData
{
protected readonly int declarationBegin;
protected readonly CSharpResolver contextAtCaret;
public PartialCompletionData(int declarationBegin, IMember m, CSharpResolver contextAtCaret)
: base(m)
{
this.declarationBegin = declarationBegin;
this.contextAtCaret = contextAtCaret;
var ambience = new CSharpAmbience();
ambience.ConversionFlags = ConversionFlags.ShowTypeParameterList | ConversionFlags.ShowParameterList | ConversionFlags.ShowParameterNames;
this.CompletionText = ambience.ConvertSymbol(m);
}
public override void Complete(CompletionContext context)
{
if (declarationBegin > context.StartOffset) {
base.Complete(context);
return;
}
TypeSystemAstBuilder b = new TypeSystemAstBuilder(contextAtCaret);
b.GenerateBody = true;
var entityDeclaration = b.ConvertEntity(this.Entity);
entityDeclaration.Modifiers &= ~Modifiers.VisibilityMask; // remove visiblity
entityDeclaration.Modifiers |= Modifiers.Partial;
var document = context.Editor.Document;
StringWriter w = new StringWriter();
var formattingOptions = CSharpFormattingOptionsPersistence.GetProjectOptions(contextAtCaret.Compilation.GetProject());
var segmentDict = SegmentTrackingOutputFormatter.WriteNode(
w, entityDeclaration, formattingOptions.OptionsContainer.GetEffectiveOptions(), context.Editor.Options);
using (document.OpenUndoGroup()) {
string newText = w.ToString().TrimEnd();
document.Replace(declarationBegin, context.EndOffset - declarationBegin, newText);
var throwStatement = entityDeclaration.Descendants.FirstOrDefault(n => n is ThrowStatement);
if (throwStatement != null) {
var segment = segmentDict[throwStatement];
context.Editor.Select(declarationBegin + segment.Offset, segment.Length);
}
CSharpFormatterHelper.Format(context.Editor, declarationBegin, newText.Length, formattingOptions.OptionsContainer);
}
}
IEnumerable<Expression> ParametersToExpressions(IEntity entity)
{
foreach (var p in ((IParameterizedMember)entity).Parameters) {
if (p.IsRef || p.IsOut)
yield return new DirectionExpression(p.IsOut ? FieldDirection.Out : FieldDirection.Ref, new IdentifierExpression(p.Name));
else
yield return new IdentifierExpression(p.Name);
}
}
}
}

2
src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormattingStrategy/CSharpFormattingOptionsPersistence.cs

@ -74,7 +74,7 @@ namespace CSharpBinding.FormattingStrategy @@ -74,7 +74,7 @@ namespace CSharpBinding.FormattingStrategy
public static bool AutoFormatting
{
get {
return SD.PropertyService.Get("CSharpBinding.Formatting.AutoFormatting", true);
return SD.PropertyService.Get("CSharpBinding.Formatting.AutoFormatting", false);
}
set {
SD.PropertyService.Set("CSharpBinding.Formatting.AutoFormatting", value);

28
src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormattingStrategy/CSharpFormattingStrategy.cs

@ -44,22 +44,29 @@ namespace CSharpBinding.FormattingStrategy @@ -44,22 +44,29 @@ namespace CSharpBinding.FormattingStrategy
#region Smart Indentation
public override void IndentLine(ITextEditor editor, IDocumentLine line)
{
var document = editor.Document;
var engine = CreateIndentEngine(document, editor.ToEditorOptions());
IndentSingleLine(engine, document, line);
int lineNr = line.LineNumber;
DocumentAccessor acc = new DocumentAccessor(editor.Document, lineNr, lineNr);
CSharpIndentationStrategy indentStrategy = new CSharpIndentationStrategy();
indentStrategy.IndentationString = editor.Options.IndentationString;
indentStrategy.Indent(acc, false);
string t = acc.Text;
if (t.Length == 0) {
// use AutoIndentation for new lines in comments / verbatim strings.
base.IndentLine(editor, line);
}
}
public override void IndentLines(ITextEditor editor, int beginLine, int endLine)
{
var document = editor.Document;
var engine = CreateIndentEngine(document, editor.ToEditorOptions());
int currentLine = beginLine;
do {
var line = document.GetLineByNumber(currentLine);
IndentSingleLine(engine, document, line);
} while (++currentLine <= endLine);
DocumentAccessor acc = new DocumentAccessor(editor.Document, beginLine, endLine);
CSharpIndentationStrategy indentStrategy = new CSharpIndentationStrategy();
indentStrategy.IndentationString = editor.Options.IndentationString;
indentStrategy.Indent(acc, true);
}
/* NR indent engine (temporarily?) disabled as per #447
static void IndentSingleLine(CacheIndentEngine engine, IDocument document, IDocumentLine line)
{
engine.Update(line.EndOffset);
@ -83,6 +90,7 @@ namespace CSharpBinding.FormattingStrategy @@ -83,6 +90,7 @@ namespace CSharpBinding.FormattingStrategy
var engine = new CSharpIndentEngine(document, options, formattingOptions.OptionsContainer.GetEffectiveOptions());
return new CacheIndentEngine(engine);
}
*/
#endregion
#region Private functions

37
src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/CSharpSyntaxIssue.cs

@ -39,13 +39,26 @@ namespace CSharpBinding.Refactoring @@ -39,13 +39,26 @@ namespace CSharpBinding.Refactoring
{
var refactoringContext = context as SDRefactoringContext;
if (refactoringContext == null)
return Enumerable.Empty<CodeIssue>();
yield break;
var syntaxTree = context.RootNode as SyntaxTree;
if (syntaxTree == null)
return Enumerable.Empty<CodeIssue>();
return syntaxTree.Errors.Select(error => CreateCodeIssue(error, refactoringContext)).Where(issue => issue != null);
yield break;
int prevLine = 0;
foreach (var error in syntaxTree.Errors) {
if (error.Region.BeginLine == prevLine)
continue; // show at most one error per line
prevLine = error.Region.BeginLine;
var issue = CreateCodeIssue(error, refactoringContext);
if (issue != null)
yield return issue;
}
}
static bool IsSpaceOrTab(char c)
{
return c == ' ' || c == '\t';
}
CodeIssue CreateCodeIssue(Error error, SDRefactoringContext context)
@ -55,16 +68,18 @@ namespace CSharpBinding.Refactoring @@ -55,16 +68,18 @@ namespace CSharpBinding.Refactoring
if (begin.Line <= 0 || begin.Line > document.LineCount)
return null;
// Columns seem to be zero-based, SD expects 1-based columns
int offset = document.GetOffset(begin.Line, begin.Column + 1);
int offset = document.GetOffset(begin.Line, begin.Column);
// the parser sometimes reports errors in the whitespace prior to the invalid token, so search for the next word:
while (offset < document.TextLength && IsSpaceOrTab(document.GetCharAt(offset)))
offset++;
int endOffset = TextUtilities.GetNextCaretPosition(document, offset, System.Windows.Documents.LogicalDirection.Forward, CaretPositioningMode.WordBorderOrSymbol);
if (endOffset < 0) endOffset = document.TextLength;
int length = endOffset - offset;
if (length < 2) {
// marker should be at least 2 characters long, but take care that we don't make
// it longer than the document
length = Math.Min(2, document.TextLength - offset);
if (length < 1) {
// marker should be at least 1 characters long,
// but take care that we don't make it longer than the document
length = Math.Min(1, document.TextLength - offset);
}
TextLocation start = document.GetLocation(offset);

2
src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlCompletionItemList.cs

@ -100,7 +100,7 @@ namespace ICSharpCode.XamlBinding @@ -100,7 +100,7 @@ namespace ICSharpCode.XamlBinding
int spaces = CountWhiteSpacesAtEnd(context.Editor.GetWordBeforeCaret());
int typeNameStart = markup.ExtensionType.IndexOf(':') + 1;
if (!(word == "." || word == "," || word == ":") && markup.ExtensionType.Substring(typeNameStart, markup.ExtensionType.Length - typeNameStart) != word) {
if (!(word == "." || word == "," || word == ":" || word == "=") && markup.ExtensionType.Substring(typeNameStart, markup.ExtensionType.Length - typeNameStart) != word) {
context.Editor.Document.Replace(context.Editor.Caret.Offset - spaces, spaces, ", ");
oldOffset += (2 - spaces);
}

52
src/AddIns/Debugger/Debugger.AddIn/NRefactory/ExpressionEvaluationVisitor.cs

@ -88,6 +88,30 @@ namespace Debugger.AddIn @@ -88,6 +88,30 @@ namespace Debugger.AddIn
this.allowSetValue = allowSetValue;
}
/// <summary>
/// Imports a type into the debugger's type system, and into the current generic context.
/// </summary>
IType Import(IType type)
{
IType importedType = debuggerTypeSystem.Import(type);
if (importedType != null)
return importedType.AcceptVisitor(context.MethodInfo.Substitution);
else
return null;
}
/// <summary>
/// Imports a type into the debugger's type system, and into the current generic context.
/// </summary>
IMember Import(IMember member)
{
IMember importedMember = debuggerTypeSystem.Import(member);
if (importedMember != null)
return importedMember.Specialize(context.MethodInfo.Substitution);
else
return null;
}
public Value Convert(ResolveResult result)
{
if (result.IsCompileTimeConstant && !result.IsError)
@ -122,7 +146,7 @@ namespace Debugger.AddIn @@ -122,7 +146,7 @@ namespace Debugger.AddIn
Value Visit(MemberResolveResult result)
{
var importedMember = debuggerTypeSystem.Import(result.Member);
var importedMember = Import(result.Member);
if (importedMember == null)
throw new GetValueException("Member not found!");
Value target = null;
@ -136,7 +160,7 @@ namespace Debugger.AddIn @@ -136,7 +160,7 @@ namespace Debugger.AddIn
}
if (!allowMethodInvoke && (importedMember is IMethod))
throw new InvalidOperationException("Method invocation not allowed in the current context!");
Value val = Value.GetMemberValue(evalThread, target, importedMember.Specialize(context.MethodInfo.Substitution));
Value val = Value.GetMemberValue(evalThread, target, importedMember);
if (val == null)
throw new GetValueException("Member not found!");
return val;
@ -316,7 +340,7 @@ namespace Debugger.AddIn @@ -316,7 +340,7 @@ namespace Debugger.AddIn
/// </remarks>
Value Visit(TypeIsResolveResult result)
{
var importedType = NullableType.GetUnderlyingType(debuggerTypeSystem.Import(result.TargetType));
var importedType = NullableType.GetUnderlyingType(Import(result.TargetType));
var val = Convert(result.Input);
var conversions = CSharpConversions.Get(debuggerTypeSystem);
bool evalResult = false;
@ -334,7 +358,7 @@ namespace Debugger.AddIn @@ -334,7 +358,7 @@ namespace Debugger.AddIn
Value Visit(TypeOfResolveResult result)
{
var type = debuggerTypeSystem.Import(result.ReferencedType);
var type = Import(result.ReferencedType);
if (type == null)
throw new GetValueException("Error: cannot find '{0}'.", result.ReferencedType.FullName);
return Eval.TypeOf(evalThread, type);
@ -402,19 +426,17 @@ namespace Debugger.AddIn @@ -402,19 +426,17 @@ namespace Debugger.AddIn
Value Visit(InvocationResolveResult result)
{
var importedMember = debuggerTypeSystem.Import(result.Member);
if (importedMember == null)
throw new GetValueException("Member not found!");
// InvokeMethod() will import the member, so work in the original compilation to find the method to invoke:
IMethod usedMethod;
if (importedMember is IProperty) {
var prop = (IProperty)importedMember;
if (result.Member is IProperty) {
var prop = (IProperty)result.Member;
if (!prop.CanGet)
throw new GetValueException("Indexer does not have a getter.");
usedMethod = prop.Getter;
} else if (importedMember is IMethod) {
} else if (result.Member is IMethod) {
if (!allowMethodInvoke)
throw new InvalidOperationException("Method invocation not allowed in the current context!");
usedMethod = (IMethod)importedMember;
usedMethod = (IMethod)result.Member;
} else
throw new GetValueException("Invoked member must be a method or property");
Value target = null;
@ -430,7 +452,7 @@ namespace Debugger.AddIn @@ -430,7 +452,7 @@ namespace Debugger.AddIn
Value InvokeMethod(Value thisValue, IMethod method, params Value[] arguments)
{
method = debuggerTypeSystem.Import(method);
method = Import(method) as IMethod;
if (method == null)
throw new GetValueException("Method not found!");
return Value.InvokeMethod(evalThread, thisValue, method, arguments);
@ -468,11 +490,7 @@ namespace Debugger.AddIn @@ -468,11 +490,7 @@ namespace Debugger.AddIn
}
sb.Append("}");
return sb.ToString();
} else if (val.Type.IsKnownType(KnownTypeCode.Char)) {
return "'" + TextWriterTokenWriter.ConvertChar((char)val.PrimitiveValue) + "'";
} else if (val.Type.IsKnownType(KnownTypeCode.String)) {
return "\"" + TextWriterTokenWriter.ConvertString((string)val.PrimitiveValue) + "\"";
} else if (val.Type.IsPrimitiveType()) {
} else if (val.Type.IsKnownType(KnownTypeCode.String) || val.Type.IsPrimitiveType()) {
return TextWriterTokenWriter.PrintPrimitiveValue(val.PrimitiveValue);
} else {
return val.InvokeToString(evalThread);

102
src/AddIns/Debugger/Debugger.AddIn/Pads/DebuggerDotCompletion.cs

@ -60,76 +60,78 @@ namespace Debugger.AddIn.Pads.Controls @@ -60,76 +60,78 @@ namespace Debugger.AddIn.Pads.Controls
var file = SD.ParserService.GetExistingUnresolvedFile(context.FileName);
if (compilation == null || file == null)
return "";
var member = file.GetMember(context.Location);
var unresolvedMember = file.GetMember(context.Location);
if (unresolvedMember == null)
return "";
var member = unresolvedMember.Resolve(new SimpleTypeResolveContext(compilation.MainAssembly));
if (member == null)
return "";
var builder = new TypeSystemAstBuilder();
EntityDeclaration decl = builder.ConvertEntity(member.Resolve(new SimpleTypeResolveContext(compilation.MainAssembly)));
decl.Name = "__DebuggerStub_" + decl.Name;
decl.Modifiers &= (Modifiers.Static);
switch (member.SymbolKind) {
case SymbolKind.Property:
break;
case SymbolKind.Indexer:
break;
case SymbolKind.Event:
break;
case SymbolKind.Method:
GenerateBodyFromContext(builder, context, (MethodDeclaration)decl);
break;
case SymbolKind.Operator:
break;
case SymbolKind.Constructor:
break;
case SymbolKind.Destructor:
break;
case SymbolKind.Accessor:
break;
default:
throw new ArgumentOutOfRangeException();
MethodDeclaration decl;
if (unresolvedMember is IMethod) {
// If it's a method, convert it directly (including parameters + type parameters)
decl = (MethodDeclaration)builder.ConvertEntity(member);
} else {
// Otherwise, create a method anyways, and copy the parameters
decl = new MethodDeclaration();
if (member is IParameterizedMember) {
foreach (var p in ((IParameterizedMember)member).Parameters) {
decl.Parameters.Add(builder.ConvertParameter(p));
}
}
}
return WrapInType(member.DeclaringTypeDefinition, decl.ToString());
decl.Name = "__DebuggerStub__";
decl.ReturnType = builder.ConvertType(member.ReturnType);
decl.Modifiers = unresolvedMember.IsStatic ? Modifiers.Static : Modifiers.None;
// Make the method look like an explicit interface implementation so that it doesn't appear in CC
decl.PrivateImplementationType = new SimpleType("__DummyType__");
decl.Body = GenerateBodyFromContext(builder, context);
return WrapInType(unresolvedMember.DeclaringTypeDefinition, decl).ToString();
}
static void GenerateBodyFromContext(TypeSystemAstBuilder builder, DebuggerCompletionContext context, MethodDeclaration methodDeclaration)
static BlockStatement GenerateBodyFromContext(TypeSystemAstBuilder builder, DebuggerCompletionContext context)
{
methodDeclaration.Body = new BlockStatement();
var body = new BlockStatement();
foreach (var v in context.Variables)
methodDeclaration.Body.Statements.Add(new VariableDeclarationStatement(builder.ConvertType(v.Type), v.Name));
methodDeclaration.Body.Statements.Add(new ExpressionStatement(new IdentifierExpression("$__Caret_Point__$")));
body.Statements.Add(new VariableDeclarationStatement(builder.ConvertType(v.Type), v.Name));
body.Statements.Add(new ExpressionStatement(new IdentifierExpression("$__Caret_Point__$")));
return body;
}
static string WrapInType(IUnresolvedTypeDefinition entity, string code)
static AstNode WrapInType(IUnresolvedTypeDefinition entity, EntityDeclaration decl)
{
if (entity == null)
return code;
code = WrapInType(entity.DeclaringTypeDefinition, GetHeader(entity) + code + "\r\n}");
if (entity.DeclaringTypeDefinition == null) {
return "namespace " + entity.Namespace + " {\r\n" + code + "\r\n}";
}
return code;
return decl;
// Wrap decl in TypeDeclaration
decl = new TypeDeclaration {
ClassType = GetClassType(entity),
Modifiers = Modifiers.Partial,
Name = entity.Name,
Members = { decl }
};
if (entity.DeclaringTypeDefinition != null) {
// Handle nested types
return WrapInType(entity.DeclaringTypeDefinition, decl);
}
if (string.IsNullOrEmpty(entity.Namespace))
return decl;
return new NamespaceDeclaration(entity.Namespace) {
Members = {
decl
}
};
}
static string GetHeader(IUnresolvedTypeDefinition entity)
static ClassType GetClassType(IUnresolvedTypeDefinition entity)
{
StringBuilder builder = new StringBuilder();
builder.Append("partial ");
switch (entity.Kind) {
case TypeKind.Class:
builder.Append("class ");
break;
case TypeKind.Interface:
builder.Append("interface ");
break;
return ClassType.Interface;
case TypeKind.Struct:
builder.Append("struct ");
break;
return ClassType.Struct;
default:
throw new NotSupportedException();
return ClassType.Class;
}
builder.Append(entity.Name);
builder.AppendLine(" {");
return builder.ToString();
}
}

4
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/BasicMetadata.cs

@ -163,6 +163,8 @@ namespace ICSharpCode.WpfDesign.Designer @@ -163,6 +163,8 @@ namespace ICSharpCode.WpfDesign.Designer
Metadata.AddPopularProperty(typeof(Binding), "ElementName");
Metadata.AddPopularProperty(typeof(Binding), "Converter");
Metadata.AddPopularProperty(typeof(Binding), "XPath");
Metadata.AddPopularProperty(typeof(ItemsControl), "Items");
Metadata.AddValueRange(Block.LineHeightProperty, double.Epsilon, double.MaxValue);
Metadata.AddValueRange(Canvas.BottomProperty, double.MinValue, double.MaxValue);
@ -219,7 +221,7 @@ namespace ICSharpCode.WpfDesign.Designer @@ -219,7 +221,7 @@ namespace ICSharpCode.WpfDesign.Designer
Metadata.HideProperty(typeof(UIElement), "RenderSize");
Metadata.HideProperty(FrameworkElement.NameProperty);
Metadata.HideProperty(typeof(FrameworkElement), "Resources");
//Metadata.HideProperty(typeof(FrameworkElement), "Resources");
Metadata.HideProperty(typeof(Window), "Owner");
//Metadata.DisablePlacement(typeof(Button));

68
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/DesignPanel.cs

@ -35,6 +35,10 @@ namespace ICSharpCode.WpfDesign.Designer @@ -35,6 +35,10 @@ namespace ICSharpCode.WpfDesign.Designer
public sealed class DesignPanel : Decorator, IDesignPanel, INotifyPropertyChanged
{
#region Hit Testing
private List<DependencyObject> hitTestElements = new List<DependencyObject>();
private DependencyObject lastElement;
/// <summary>
/// this element is always hit (unless HitTestVisible is set to false)
/// </summary>
@ -54,7 +58,7 @@ namespace ICSharpCode.WpfDesign.Designer @@ -54,7 +58,7 @@ namespace ICSharpCode.WpfDesign.Designer
void RunHitTest(Visual reference, Point point, HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback)
{
VisualTreeHelper.HitTest(reference, filterCallback, resultCallback,
new PointHitTestParameters(point));
new PointHitTestParameters(point));
}
HitTestFilterBehavior FilterHitTestInvisibleElements(DependencyObject potentialHitTestTarget)
@ -70,9 +74,10 @@ namespace ICSharpCode.WpfDesign.Designer @@ -70,9 +74,10 @@ namespace ICSharpCode.WpfDesign.Designer
if (designItem != null && designItem.IsDesignTimeLocked) {
return HitTestFilterBehavior.ContinueSkipSelfAndChildren;
}
}
}
hitTestElements.Add(element);
return HitTestFilterBehavior.Continue;
}
@ -80,14 +85,17 @@ namespace ICSharpCode.WpfDesign.Designer @@ -80,14 +85,17 @@ namespace ICSharpCode.WpfDesign.Designer
/// <summary>
/// Performs a custom hit testing lookup for the specified mouse event args.
/// </summary>
public DesignPanelHitTestResult HitTest(Point mousePosition, bool testAdorners, bool testDesignSurface)
public DesignPanelHitTestResult HitTest(Point mousePosition, bool testAdorners, bool testDesignSurface, HitTestType hitTestType)
{
hitTestElements.Clear();
DesignPanelHitTestResult result = DesignPanelHitTestResult.NoHit;
HitTest(mousePosition, testAdorners, testDesignSurface,
delegate(DesignPanelHitTestResult r) {
result = r;
return false;
});
delegate(DesignPanelHitTestResult r) {
result = r;
return false;
}, hitTestType);
return result;
}
@ -95,7 +103,7 @@ namespace ICSharpCode.WpfDesign.Designer @@ -95,7 +103,7 @@ namespace ICSharpCode.WpfDesign.Designer
/// Performs a hit test on the design surface, raising <paramref name="callback"/> for each match.
/// Hit testing continues while the callback returns true.
/// </summary>
public void HitTest(Point mousePosition, bool testAdorners, bool testDesignSurface, Predicate<DesignPanelHitTestResult> callback)
public void HitTest(Point mousePosition, bool testAdorners, bool testDesignSurface, Predicate<DesignPanelHitTestResult> callback, HitTestType hitTestType)
{
if (mousePosition.X < 0 || mousePosition.Y < 0 || mousePosition.X > this.RenderSize.Width || mousePosition.Y > this.RenderSize.Height) {
return;
@ -104,6 +112,8 @@ namespace ICSharpCode.WpfDesign.Designer @@ -104,6 +112,8 @@ namespace ICSharpCode.WpfDesign.Designer
bool continueHitTest = true;
hitTestElements.Clear();
if (testAdorners) {
RunHitTest(
_adornerLayer, mousePosition, FilterHitTestInvisibleElements,
@ -135,6 +145,19 @@ namespace ICSharpCode.WpfDesign.Designer @@ -135,6 +145,19 @@ namespace ICSharpCode.WpfDesign.Designer
ViewService viewService = _context.Services.View;
DependencyObject obj = result.VisualHit;
if (hitTestType == HitTestType.ElementSelection)
{
if (Keyboard.IsKeyDown(Key.LeftAlt))
if (lastElement != null && lastElement != _context.RootItem.Component &&
hitTestElements.Contains(lastElement))
{
var idx = hitTestElements.IndexOf(lastElement) - 1;
if (idx >= 0)
obj = hitTestElements[idx];
}
}
while (obj != null) {
if ((customResult.ModelHit = viewService.GetModel(obj)) != null)
break;
@ -143,6 +166,13 @@ namespace ICSharpCode.WpfDesign.Designer @@ -143,6 +166,13 @@ namespace ICSharpCode.WpfDesign.Designer
if (customResult.ModelHit == null) {
customResult.ModelHit = _context.RootItem;
}
if (hitTestType == HitTestType.ElementSelection)
{
lastElement = obj;
}
continueHitTest = callback(customResult);
return continueHitTest ? HitTestResultBehavior.Continue : HitTestResultBehavior.Stop;
} else {
@ -223,7 +253,7 @@ namespace ICSharpCode.WpfDesign.Designer @@ -223,7 +253,7 @@ namespace ICSharpCode.WpfDesign.Designer
}
}
}
/// <summary>
/// Enables / Disables the Raster Placement
/// </summary>
@ -341,14 +371,14 @@ namespace ICSharpCode.WpfDesign.Designer @@ -341,14 +371,14 @@ namespace ICSharpCode.WpfDesign.Designer
if (e.Key == Key.Left || e.Key == Key.Right || e.Key == Key.Up || e.Key == Key.Down)
{
e.Handled = true;
if (placementOp == null) {
dx = 0;
dy = 0;
placementOp = PlacementOperation.Start(Context.Services.Selection.SelectedItems, PlacementType.Move);
}
dx += (e.Key == Key.Left) ? Keyboard.IsKeyDown(Key.LeftShift) ? -10 : -1 : 0;
dy += (e.Key == Key.Up) ? Keyboard.IsKeyDown(Key.LeftShift) ? -10 : -1 : 0;
dx += (e.Key == Key.Right) ? Keyboard.IsKeyDown(Key.LeftShift) ? 10 : 1 : 0;
@ -358,18 +388,18 @@ namespace ICSharpCode.WpfDesign.Designer @@ -358,18 +388,18 @@ namespace ICSharpCode.WpfDesign.Designer
if (!Keyboard.IsKeyDown(Key.LeftCtrl))
{
info.Bounds = new Rect(info.OriginalBounds.Left + dx,
info.OriginalBounds.Top + dy,
info.OriginalBounds.Width,
info.OriginalBounds.Height);
info.OriginalBounds.Top + dy,
info.OriginalBounds.Width,
info.OriginalBounds.Height);
}
else
{
info.Bounds = new Rect(info.OriginalBounds.Left,
info.OriginalBounds.Top,
info.OriginalBounds.Width + dx,
info.OriginalBounds.Height + dy);
info.OriginalBounds.Top,
info.OriginalBounds.Width + dx,
info.OriginalBounds.Height + dy);
}
placementOp.CurrentContainerBehavior.SetPosition(info);
}
}

6
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/InPlaceEditorExtension.cs

@ -159,7 +159,7 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions @@ -159,7 +159,7 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
void MouseDown(object sender,MouseEventArgs e)
{
result = designPanel.HitTest(e.GetPosition(designPanel), false, true);
result = designPanel.HitTest(e.GetPosition(designPanel), false, true, HitTestType.Default);
if(result.ModelHit==ExtendedItem && result.VisualHit is TextBlock) {
Start = Mouse.GetPosition(null);
Current = Start;
@ -171,7 +171,7 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions @@ -171,7 +171,7 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
void MouseMove(object sender, MouseEventArgs e)
{
Current += e.GetPosition(null) - Start;
result = designPanel.HitTest(e.GetPosition(designPanel), false, true);
result = designPanel.HitTest(e.GetPosition(designPanel), false, true, HitTestType.Default);
if (result.ModelHit == ExtendedItem && result.VisualHit is TextBlock) {
if (numClicks > 0) {
if (isMouseDown &&
@ -190,7 +190,7 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions @@ -190,7 +190,7 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
void MouseUp(object sender,MouseEventArgs e)
{
result = designPanel.HitTest(e.GetPosition(designPanel), false, true);
result = designPanel.HitTest(e.GetPosition(designPanel), false, true, HitTestType.Default);
if (result.ModelHit == ExtendedItem && result.VisualHit is TextBlock && numClicks>0){
if (!isGettingDragged) {
PlaceEditor(result.VisualHit, e);

1
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/BoolEditor.xaml

@ -3,5 +3,6 @@ @@ -3,5 +3,6 @@
xmlns="http://schemas.microsoft.com/netfx/2007/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
IsChecked="{Binding Value}"
Focusable="False"
>
</CheckBox>

7
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/ColorEditor.xaml

@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
<xctk:ColorPicker x:Class="ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors.ColorEditor"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
Focusable="False"
SelectedColor="{Binding Value}">
</xctk:ColorPicker>

29
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/ColorEditor.xaml.cs

@ -0,0 +1,29 @@ @@ -0,0 +1,29 @@
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using ICSharpCode.WpfDesign.PropertyGrid;
namespace ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors
{
[TypeEditor(typeof(Color))]
public partial class ColorEditor
{
public ColorEditor()
{
InitializeComponent();
}
}
}

20
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/FlatCollectionEditor.xaml.cs

@ -57,18 +57,28 @@ namespace ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors @@ -57,18 +57,28 @@ namespace ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors
this.Owner = Application.Current.MainWindow;
}
public Type GetItemsSourceType(Type t)
{
Type tp = t.GetInterfaces().FirstOrDefault(x => x.IsGenericType && x.GetGenericTypeDefinition() == typeof(ICollection<>));
return (tp != null ) ? tp.GetGenericArguments()[0] : null;
}
public void LoadItemsCollection(DesignItemProperty itemProperty)
{
_itemProperty = itemProperty;
_componentService=_itemProperty.DesignItem.Services.Component;
TypeMappings.TryGetValue(_itemProperty.ReturnType, out _type);
_type = _type ?? GetItemsSourceType(_itemProperty.ReturnType);
if (_type == null) {
PropertyGridView.IsEnabled=false;
ListBox.IsEnabled=false;
//PropertyGridView.IsEnabled=false;
//ListBox.IsEnabled=false;
AddItem.IsEnabled=false;
RemoveItem.IsEnabled=false;
MoveUpItem.IsEnabled=false;
MoveDownItem.IsEnabled=false;
//RemoveItem.IsEnabled=false;
//MoveUpItem.IsEnabled=false;
//MoveDownItem.IsEnabled=false;
}
ListBox.ItemsSource = _itemProperty.CollectionElements;

17
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/OpenCollectionEditor.xaml

@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<UserControl
x:Class="ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors.OpenCollectionEditor" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid>
<TextBlock
Margin="0,0,20,0"
Text="{Binding Value}" VerticalAlignment="Center" />
<Button
Width="15"
Margin="0,0,1,0"
HorizontalAlignment="Right"
VerticalAlignment="Stretch"
Content="..."
Focusable="False"
Click="open_Click" />
</Grid>
</UserControl>

38
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/OpenCollectionEditor.xaml.cs

@ -0,0 +1,38 @@ @@ -0,0 +1,38 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using ICSharpCode.WpfDesign.PropertyGrid;
//using Xceed.Wpf.Toolkit;
namespace ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors
{
[TypeEditor(typeof(ICollection))]
public partial class OpenCollectionEditor : UserControl
{
public OpenCollectionEditor()
{
InitializeComponent();
}
void open_Click(object sender, RoutedEventArgs e)
{
var node = this.DataContext as PropertyNode;
var editor = new FlatCollectionEditor();
editor.LoadItemsCollection(node.FirstProperty);
editor.ShowDialog();
}
}
}

6
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/TimeSpanEditor.xaml

@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
<xctk:TimeSpanUpDown x:Class="ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors.TimeSpanEditor"
xmlns="http://schemas.microsoft.com/netfx/2007/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
Value="{Binding Value}">
</xctk:TimeSpanUpDown>

30
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/TimeSpanEditor.xaml.cs

@ -0,0 +1,30 @@ @@ -0,0 +1,30 @@
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using ICSharpCode.WpfDesign.PropertyGrid;
namespace ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors
{
[TypeEditor(typeof(TimeSpan))]
public partial class TimeSpanEditor
{
public TimeSpanEditor()
{
InitializeComponent();
}
}
}

4
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/CreateComponentTool.cs

@ -86,7 +86,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services @@ -86,7 +86,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services
if (e.Data.GetData(typeof(CreateComponentTool)) != this) return;
// TODO: dropLayer in designPanel
designPanel.IsAdornerLayerHitTestVisible = false;
DesignPanelHitTestResult result = designPanel.HitTest(p, false, true);
DesignPanelHitTestResult result = designPanel.HitTest(p, false, true, HitTestType.Default);
if (result.ModelHit != null) {
designPanel.Focus();
@ -180,7 +180,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services @@ -180,7 +180,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services
if (e.ChangedButton == MouseButton.Left && MouseGestureBase.IsOnlyButtonPressed(e, MouseButton.Left)) {
e.Handled = true;
IDesignPanel designPanel = (IDesignPanel)sender;
DesignPanelHitTestResult result = designPanel.HitTest(e.GetPosition(designPanel), false, true);
DesignPanelHitTestResult result = designPanel.HitTest(e.GetPosition(designPanel), false, true, HitTestType.Default);
if (result.ModelHit != null) {
IPlacementBehavior behavior = result.ModelHit.GetBehavior<IPlacementBehavior>();
if (behavior != null) {

2
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/MoveLogic.cs

@ -124,7 +124,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services @@ -124,7 +124,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services
return true; // continue hit testing
result = r;
return false; // finish hit testing
});
}, HitTestType.Default);
return result;
}

2
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/PointerTool.cs

@ -42,7 +42,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services @@ -42,7 +42,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services
void OnMouseDown(object sender, MouseButtonEventArgs e)
{
IDesignPanel designPanel = (IDesignPanel)sender;
DesignPanelHitTestResult result = designPanel.HitTest(e.GetPosition(designPanel), false, true);
DesignPanelHitTestResult result = designPanel.HitTest(e.GetPosition(designPanel), false, true, HitTestType.ElementSelection);
if (result.ModelHit != null) {
IHandlePointerToolMouseDown b = result.ModelHit.GetBehavior<IHandlePointerToolMouseDown>();
if (b != null) {

15
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/WpfDesign.Designer.csproj

@ -75,6 +75,9 @@ @@ -75,6 +75,9 @@
<Private>False</Private>
<RequiredTargetFramework>3.0</RequiredTargetFramework>
</Reference>
<Reference Include="Xceed.Wpf.Toolkit">
<HintPath>..\..\..\..\..\Libraries\WPFExtendedToolkit\Xceed.Wpf.Toolkit.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\..\..\..\Main\GlobalAssemblyInfo.cs">
@ -89,10 +92,19 @@ @@ -89,10 +92,19 @@
<Compile Include="Extensions\RightClickContextMenuExtension.cs" />
<Compile Include="Extensions\SkewThumbExtension.cs" />
<Compile Include="Extensions\TopLeftContainerDragHandleMultipleItems.cs" />
<Compile Include="PropertyGrid\Editors\ColorEditor.xaml.cs">
<DependentUpon>ColorEditor.xaml</DependentUpon>
</Compile>
<Compile Include="PropertyGrid\Editors\FlatCollectionEditor.xaml.cs">
<DependentUpon>FlatCollectionEditor.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="PropertyGrid\Editors\OpenCollectionEditor.xaml.cs">
<DependentUpon>OpenCollectionEditor.xaml</DependentUpon>
</Compile>
<Compile Include="PropertyGrid\Editors\TimeSpanEditor.xaml.cs">
<DependentUpon>TimeSpanEditor.xaml</DependentUpon>
</Compile>
<Compile Include="Translations.cs" />
<Compile Include="Configuration\AssemblyInfo.cs" />
<Compile Include="Controls\AdornerLayer.cs" />
@ -251,7 +263,10 @@ @@ -251,7 +263,10 @@
</ItemGroup>
<ItemGroup>
<Page Include="Extensions\RightClickContextMenu.xaml" />
<Page Include="PropertyGrid\Editors\ColorEditor.xaml" />
<Page Include="PropertyGrid\Editors\FlatCollectionEditor.xaml" />
<Page Include="PropertyGrid\Editors\OpenCollectionEditor.xaml" />
<Page Include="PropertyGrid\Editors\TimeSpanEditor.xaml" />
<Page Include="ThumbnailView\ThumbnailView.xaml" />
<ProjectReference Include="..\..\..\..\..\Main\ICSharpCode.SharpDevelop.Widgets\Project\ICSharpCode.SharpDevelop.Widgets.csproj">
<Project>{8035765F-D51F-4A0C-A746-2FD100E19419}</Project>

41
src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/HitTestType.cs

@ -0,0 +1,41 @@ @@ -0,0 +1,41 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ICSharpCode.WpfDesign
{
/// <summary>
///
/// </summary>
public enum HitTestType
{
/// <summary>
///
/// </summary>
Default,
/// <summary>
///
/// </summary>
ElementSelection,
}
}

7
src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/PropertyGrid/EditorManager.cs

@ -51,6 +51,13 @@ namespace ICSharpCode.WpfDesign.PropertyGrid @@ -51,6 +51,13 @@ namespace ICSharpCode.WpfDesign.PropertyGrid
}
type = type.BaseType;
}
foreach (var t in typeEditors) {
if (t.Key.IsAssignableFrom(property.ReturnType)) {
return (FrameworkElement)Activator.CreateInstance(t.Value);
}
}
if (editorType == null) {
var standardValues = Metadata.GetStandardValues(property.ReturnType);
if (standardValues != null) {

5
src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/PropertyGrid/TypeHelper.cs

@ -17,6 +17,7 @@ @@ -17,6 +17,7 @@
// DEALINGS IN THE SOFTWARE.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@ -93,7 +94,7 @@ namespace ICSharpCode.WpfDesign.PropertyGrid @@ -93,7 +94,7 @@ namespace ICSharpCode.WpfDesign.PropertyGrid
foreach (PropertyDescriptor p in TypeDescriptor.GetProperties(element))
{
if (!p.IsBrowsable) continue;
if (p.IsReadOnly) continue;
if (p.IsReadOnly && !typeof(ICollection).IsAssignableFrom(p.PropertyType)) continue;
if (hiddenPropertiesOnWindow.Contains(p.Name)) continue;
if (p.Attributes.OfType<ObsoleteAttribute>().Count() != 0) continue;
yield return p;
@ -103,7 +104,7 @@ namespace ICSharpCode.WpfDesign.PropertyGrid @@ -103,7 +104,7 @@ namespace ICSharpCode.WpfDesign.PropertyGrid
{
foreach(PropertyDescriptor p in TypeDescriptor.GetProperties(element)){
if (!p.IsBrowsable) continue;
if (p.IsReadOnly) continue;
if (p.IsReadOnly && !typeof(ICollection).IsAssignableFrom(p.PropertyType)) continue;
if (p.Attributes.OfType<ObsoleteAttribute>().Count()!=0) continue;
yield return p;
}

8
src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/Tools.cs

@ -99,14 +99,14 @@ namespace ICSharpCode.WpfDesign @@ -99,14 +99,14 @@ namespace ICSharpCode.WpfDesign
/// <summary>
/// Performs a hit test on the design surface.
/// </summary>
DesignPanelHitTestResult HitTest(Point mousePosition, bool testAdorners, bool testDesignSurface);
DesignPanelHitTestResult HitTest(Point mousePosition, bool testAdorners, bool testDesignSurface, HitTestType hitTestType);
/// <summary>
/// Performs a hit test on the design surface, raising <paramref name="callback"/> for each match.
/// Hit testing continues while the callback returns true.
/// </summary>
void HitTest(Point mousePosition, bool testAdorners, bool testDesignSurface, Predicate<DesignPanelHitTestResult> callback);
void HitTest(Point mousePosition, bool testAdorners, bool testDesignSurface, Predicate<DesignPanelHitTestResult> callback, HitTestType hitTestType);
// The following members were missing in <see cref="IInputElement"/>, but
// are supported on the DesignPanel:

1
src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/WpfDesign.csproj

@ -74,6 +74,7 @@ @@ -74,6 +74,7 @@
<Compile Include="Adorners\AdornerProviderClasses.cs" />
<Compile Include="Adorners\RelativePlacement.cs" />
<Compile Include="ExtensionMethods.cs" />
<Compile Include="HitTestType.cs" />
<Compile Include="Metadata.cs" />
<Compile Include="PlacementInformation.cs" />
<Compile Include="PlacementBehavior.cs" />

2
src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/OutputVisitor/TextWriterOutputFormatter.cs

@ -333,7 +333,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -333,7 +333,7 @@ namespace ICSharpCode.NRefactory.CSharp
/// Gets the escape sequence for the specified character.
/// </summary>
/// <remarks>This method does not convert ' or ".</remarks>
public static string ConvertChar(char ch)
static string ConvertChar(char ch)
{
switch (ch) {
case '\\':

BIN
src/Libraries/WPFExtendedToolkit/Xceed.Wpf.Toolkit.dll

Binary file not shown.

2
src/Main/Base/Project/Editor/DocumentationUIBuilder.cs

@ -239,7 +239,7 @@ namespace ICSharpCode.SharpDevelop.Editor @@ -239,7 +239,7 @@ namespace ICSharpCode.SharpDevelop.Editor
var richText = DocumentPrinter.ConvertTextDocumentToRichText(document, highlightingDefinition).ToRichTextModel();
richText.SetFontWeight(currentParameterOffset, currentParameterLength, FontWeights.Bold);
var block = new Paragraph();
block.Inlines.AddRange(new RichText(signature, richText).CreateRuns()); // TODO richText.CreateRuns(document)
block.Inlines.AddRange(richText.CreateRuns(document));
block.FontFamily = GetCodeFont();
block.TextAlignment = TextAlignment.Left;
AddBlock(block);

8
src/Main/Base/Project/Src/Services/Tasks/ErrorPainter.cs

@ -206,10 +206,10 @@ namespace ICSharpCode.SharpDevelop @@ -206,10 +206,10 @@ namespace ICSharpCode.SharpDevelop
if (endOffset < 0) endOffset = textEditor.Document.TextLength;
int length = endOffset - offset;
if (length < 2) {
// marker should be at least 2 characters long, but take care that we don't make
// it longer than the document
length = Math.Min(2, textEditor.Document.TextLength - offset);
if (length < 1) {
// marker should be at least 1 characters long,
// but take care that we don't make it longer than the document
length = Math.Min(1, textEditor.Document.TextLength - offset);
}
ITextMarker marker = this.markerService.Create(offset, length);

11
src/Main/Base/Project/Util/DotnetDetection.cs

@ -69,5 +69,16 @@ namespace ICSharpCode.SharpDevelop @@ -69,5 +69,16 @@ namespace ICSharpCode.SharpDevelop
}
return null;
}
/// <summary>
/// Gets whether the Microsoft Build Tools 2013 (MSBuild 12.0) is installed.
/// </summary>
public static bool IsBuildTools2013Installed()
{
// HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\BuildTools\Servicing\12.0
using (var key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\DevDiv\BuildTools\Servicing\12.0\MSBuild")) {
return key != null && key.GetValue("Install") as int? >= 1;
}
}
}
}

16
src/Main/Base/Project/Util/SharpDevelopExtensions.cs

@ -1052,5 +1052,21 @@ namespace ICSharpCode.SharpDevelop @@ -1052,5 +1052,21 @@ namespace ICSharpCode.SharpDevelop
return document.GetLineByOffset(offset);
}
#endregion
#region IProject extensions
/// <summary>
/// Checks if the project's output is a .NET executable that can be run in a 32-bit process.
/// </summary>
public static bool IsPlatformTarget32BitOrAnyCPU(this IProject project)
{
MSBuildBasedProject msbuildProject = project as MSBuildBasedProject;
if (msbuildProject != null) {
string platformTarget = msbuildProject.GetEvaluatedProperty("PlatformTarget");
return string.IsNullOrEmpty(platformTarget) || String.Equals(platformTarget, "x86", StringComparison.OrdinalIgnoreCase)
|| String.Equals(platformTarget, "AnyCPU", StringComparison.OrdinalIgnoreCase);
}
return false;
}
#endregion
}
}

8
src/Main/SharpDevelop/Project/Build/MSBuildEngine/MSBuildEngineWorker.cs

@ -159,10 +159,12 @@ namespace ICSharpCode.SharpDevelop.Project @@ -159,10 +159,12 @@ namespace ICSharpCode.SharpDevelop.Project
loggerChain.HandleError(new BuildError(job.ProjectFileName, ".NET 3.5 SP1 is required to build this project."));
tcs.SetResult(false);
}
} else if (projectMinimumSolutionVersion <= SolutionFormatVersion.VS2010) {
BuildWorkerManager.MSBuild40.RunBuildJob(job, loggerChain, OnDone, cancellationToken);
} else {
BuildWorkerManager.MSBuild120.RunBuildJob(job, loggerChain, OnDone, cancellationToken);
if (DotnetDetection.IsBuildTools2013Installed()) {
BuildWorkerManager.MSBuild120.RunBuildJob(job, loggerChain, OnDone, cancellationToken);
} else {
BuildWorkerManager.MSBuild40.RunBuildJob(job, loggerChain, OnDone, cancellationToken);
}
}
return tcs.Task;
}

Loading…
Cancel
Save