diff --git a/README.md b/README.md
index 15807e93b5..92de3a1a2a 100644
--- a/README.md
+++ b/README.md
@@ -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)
diff --git a/samples/SharpDevelopReports/SampleReports/Customized/EventLog.srd b/samples/SharpDevelopReports/SampleReports/Customized/EventLog.srd
deleted file mode 100644
index 1291491346..0000000000
--- a/samples/SharpDevelopReports/SampleReports/Customized/EventLog.srd
+++ /dev/null
@@ -1,292 +0,0 @@
-
-
-
-
- Microsoft Sans Serif, 10pt
- PushData
- 50
- True
-
-
- No Data for this Report
- 50
- 827, 1169
- 5, 5, 5, 5
- 50
- Text
-
- False
- Customized
- 50
-
- Pixel
-
- DataReport
-
-
-
-
-
- 727, 91
- ReportHeader
- False
- 0
- 0
- White
-
-
- File
- 83, 13
- BaseImageItem2
- 568, 36
- False
- White
- ..\Logos\Bannerbeige2.gif
- D:\SharpDevelop3.0_WorkingCopy\SharpDevelop\samples\SharpDevelopReports\SampleReports\Logos\Bannerbeige2.gif
-
-
- Silver
- False
- None
- System - Eventlog
- 83, 55
- TopCenter
- True
- False
- Microsoft Sans Serif, 15pt
- False
-
- BaseTextItem2147483643
- White
- 568, 33
- ControlText
-
-
- 50, 50
- False
-
-
- 727, 60
- ReportPageHeader
- False
- 0
- 0
- White
-
-
- 12, 3
-
- BaseRowItem2
-
-
- White
- False
- None
- Image
- 20, 7
- TopCenter
- True
- False
- Microsoft Sans Serif, 12pt
- False
-
- BaseTextItem2147483642
- White
- 100, 20
- ControlText
-
-
- White
- False
- None
- EntryType
- 135, 7
- TopCenter
- True
- False
- Microsoft Sans Serif, 12pt
- False
-
- BaseTextItem2147483644
- White
- 100, 20
- ControlText
-
-
- White
- False
- None
- DateWritten
- 261, 7
- TopCenter
- True
- False
- Microsoft Sans Serif, 12pt
- False
-
- BaseTextItem2147483645
- White
- 100, 20
- ControlText
-
-
- White
- False
- None
- Message
- 391, 7
- TopLeft
- True
- False
- Microsoft Sans Serif, 12pt
- False
-
- BaseTextItem2147483646
- White
- 248, 20
- ControlText
-
-
- False
- 0
- White
- 697, 44
- White
- True
- Black
-
-
- 50, 156
- False
-
-
- 727, 90
- ReportDetail
- False
- 0
- 0
- White
-
-
- 12, 14
-
- BaseRowItem1
-
-
- Database
- 20, 7
- BaseImageItem1
- 30, 30
- False
- White
- Image
-
-
- EntryType
- Microsoft Sans Serif, 8.25pt
- 135, 7
- False
- Black
- None
- EntryType
- False
- False
- TopLeft
- White
-
- EntryType
- True
- 100, 20
- White
-
-
- Message
- Microsoft Sans Serif, 8.25pt
- 391, 7
- False
- Black
- None
- Message
- False
- False
- TopLeft
- White
-
- Message
- True
- 248, 20
- White
-
-
- TimeWritten
- Microsoft Sans Serif, 10pt
- 261, 7
- False
- Black
- None
- TimeWritten
- False
- False
- TopLeft
- White
-
- BaseDataItem1
- True
- 100, 20
- White
-
-
- False
- 0
- White
- 697, 63
- White
- True
- Black
-
-
- 50, 231
- False
-
-
- 727, 60
- ReportPageFooter
- False
- 0
- 0
- White
-
-
- White
- False
- None
- ='Page (' + Globals!PageNumber + ') of ( ' + Globals!TotalPages + ' ) Pages'
- 403, 21
- TopLeft
- True
- False
- Microsoft Sans Serif, 8.25pt
- False
-
- ='Page ' + Global!PageNumber + 'of ' + Global!Pages + 'Pages'
- White
- 166, 20
- ControlText
-
-
- 50, 336
- False
-
-
- 727, 60
- ReportFooter
- False
- 0
- 0
- White
-
- 50, 411
- False
-
-
-
\ No newline at end of file
diff --git a/samples/SharpDevelopReports/SampleReports/EventLogger/Error.png b/samples/SharpDevelopReports/SampleReports/EventLogger/Error.png
deleted file mode 100644
index 3dd44833f4..0000000000
Binary files a/samples/SharpDevelopReports/SampleReports/EventLogger/Error.png and /dev/null differ
diff --git a/samples/SharpDevelopReports/SampleReports/EventLogger/Info.png b/samples/SharpDevelopReports/SampleReports/EventLogger/Info.png
deleted file mode 100644
index a355479ae2..0000000000
Binary files a/samples/SharpDevelopReports/SampleReports/EventLogger/Info.png and /dev/null differ
diff --git a/samples/SharpDevelopReports/SampleReports/EventLogger/Warning.png b/samples/SharpDevelopReports/SampleReports/EventLogger/Warning.png
deleted file mode 100644
index 0f65f19a91..0000000000
Binary files a/samples/SharpDevelopReports/SampleReports/EventLogger/Warning.png and /dev/null differ
diff --git a/samples/SharpDevelopReports/SampleReports/FormSheet/JCA.srd b/samples/SharpDevelopReports/SampleReports/FormSheet/JCA.srd
deleted file mode 100644
index d625aa2bac..0000000000
--- a/samples/SharpDevelopReports/SampleReports/FormSheet/JCA.srd
+++ /dev/null
@@ -1,247 +0,0 @@
-
-
-
-
- Microsoft Sans Serif, 10pt
- FormSheet
- 50
- True
-
-
- No Data for this Report
- 50
- 827, 1169
- 5, 5, 5, 5
- 50
- Text
-
- False
- Report1
- 50
-
- Millimeter
-
- FormSheet
-
-
-
-
-
- 718, 85
- ReportHeader
- False
- 50
- 0
- Window
-
-
- File
- 103, 24
- ReportImageControl
- 582, 50
- False
- Window
- ..\..\Logos\Bannerbeige2.gif
- D:\SharpDevelop3.0_WorkingCopy\SharpDevelop\samples\SharpDevelopReports\SampleReports\Logos\Bannerbeige2.gif
-
-
- 50, 50
- False
-
-
- 718, 95
- ReportPageHeader
- False
- 50
- 0
- Window
-
-
- White
- False
- None
- #develop Open Source Project
-Joint Copyright Assignment by Contributor To AlphaSierraPapa
- 92, 10
- TopCenter
- True
- False
- Microsoft Sans Serif, 14pt, style=Bold
- False
-
- reportTextItem1
- WindowFrame
- 597, 57
- ControlText
-
-
- 50, 150
- False
-
-
- 718, 723
- ReportDetail
- False
- 50
- 0
- Window
-
-
- White
- False
- None
- Contact Information:
-Full Name:_________________________________ (the "Contributor")
-
-Mailing Address_________________________ e-mail :_________________________
-
-______________________________________ Telephone :_________________________
-
-Country:_______________________________ Facsimile :_________________________
- 50, 8
- TopLeft
- True
- True
- Microsoft Sans Serif, 10pt
- False
-
- reportTextItem1
- WindowFrame
- 639, 135
- ControlText
-
-
- White
- False
- None
- 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.
- 50, 171
- TopLeft
- True
- True
- Microsoft Sans Serif, 10pt
- False
-
- reportTextItem2
- WindowFrame
- 639, 67
- ControlText
-
-
- White
- False
- None
- 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.
- 50, 257
- TopLeft
- True
- True
- Microsoft Sans Serif, 10pt
- False
-
- reportTextItem3
- WindowFrame
- 639, 113
- ControlText
-
-
- White
- False
- None
- 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.
- 50, 380
- TopLeft
- True
- False
- Microsoft Sans Serif, 10pt
- False
-
- reportTextItem4
- WindowFrame
- 696, 37
- ControlText
-
-
- White
- False
- None
- Signed:________________________________________ Date_______________
-
-Printed Name:__________________________________
-
-Please send a signed copy of this assignment by facsimile to AlphaSierraPapa at:
- 50, 443
- TopLeft
- True
- True
- Microsoft Sans Serif, 10pt
- False
-
- reportTextItem5
- WindowFrame
- 639, 80
- ControlText
-
-
- White
- False
- None
- +43-3842-22620
-
-or mail it to:
-
-AlphaSierraPapa
-Christoph Wille
-Vordernbergerstrasse 27/8
-8700 Leoben
-AUSTRIA
- 50, 551
- TopLeft
- True
- False
- Microsoft Sans Serif, 10pt
- False
-
- reportTextItem6
- WindowFrame
- 213, 139
- ControlText
-
-
- 50, 260
- False
-
-
- 718, 50
- ReportPageFooter
- False
- 50
- 0
- Window
-
- 50, 998
- False
-
-
- 718, 50
- ReportFooter
- False
- 50
- 0
- Window
-
- 50, 1063
- False
-
-
-
\ No newline at end of file
diff --git a/samples/SharpDevelopReports/SampleReports/Ilist/ContributorsList.srd b/samples/SharpDevelopReports/SampleReports/Ilist/ContributorsList.srd
deleted file mode 100644
index 0426263d32..0000000000
--- a/samples/SharpDevelopReports/SampleReports/Ilist/ContributorsList.srd
+++ /dev/null
@@ -1,280 +0,0 @@
-
-
-
-
- Report1
- DataReport
- 50
- 50
- 50
- 50
- 827, 1169
- False
- Millimeter
- 5, 5, 5, 5
-
-
-
-
-
-
- Text
- PushData
- No Data for this Report
- Microsoft Sans Serif, 10pt
- True
-
-
-
-
- 50, 50
- 786, 35
- Window
- 0
- 50
- False
- False
-
- Black
- ReportHeader
-
-
- 50, 100
- 786, 108
- Window
- 0
- 50
- False
- False
-
-
- 429, 63
- 100, 20
- White
- Microsoft Sans Serif, 12pt, style=Bold
- None
- TopLeft
- False
- False
- Job
- False
- WindowFrame
- ControlText
- True
- Job
-
-
- 234, 63
- 100, 20
- White
- Microsoft Sans Serif, 12pt, style=Bold
- None
- TopLeft
- False
- False
- Lastname
- False
- WindowFrame
- ControlText
- True
- Lastname
-
-
- 47, 6
- 661, 42
- Window
- D:\git_Sharpdevelop_Reporting\samples\SharpDevelopReports\SampleReports\Logos\Bannerbeige2.gif
- False
- File
- ..\..\Logos\Bannerbeige2.gif
- ReportImageControl
-
-
- 47, 87
- 661, 18
- White
- ControlText
- 0, 3
- 614, 3
- Flat
- Flat
- Flat
- Solid
- 2
-
-
-
- 46, 63
- 109, 20
- White
- Microsoft Sans Serif, 12pt, style=Bold
- EllipsisCharacter
- TopLeft
- False
- False
- Firstname
- False
- WindowFrame
- ControlText
- True
- reportTextItem1
-
-
- Black
- ReportPageHeader
-
-
- 50, 223
- 750, 60
- Window
- 0
- 50
- False
- False
-
-
- 3, 10
- 699, 47
- White
- False
- ControlText
- True
- WindowFrame
-
-
- 43, 12
- 147, 25
- White
- Microsoft Sans Serif, 10pt
- EllipsisCharacter
- MiddleLeft
- False
- False
- System.String
- First
- False
- WindowFrame
- ControlText
- True
- First
- unbound1
-
-
- 231, 12
- 139, 25
- White
- Microsoft Sans Serif, 10pt
- EllipsisCharacter
- MiddleLeft
- False
- False
- System.String
- Last
- False
- WindowFrame
- ControlText
- True
- Last
- unbound2
-
-
- 426, 10
- 216, 25
- White
- Microsoft Sans Serif, 10pt
- EllipsisCharacter
- MiddleLeft
- False
- False
- System.String
- Job
- False
- WindowFrame
- ControlText
- True
- Job
- --------------
- unbound3
-
-
-
- 0
- Row
-
-
- Black
- ReportDetail
-
-
- 50, 298
- 750, 49
- Window
- 0
- 50
- False
- False
-
-
- 45, 24
- 483, 20
- White
- Microsoft Sans Serif, 8.25pt
- None
- TopLeft
- False
- False
- =Globals!ReportFolder
- False
- WindowFrame
- ControlText
- True
- =Globals!ReportFolder
-
-
- 45, 3
- 663, 15
- White
- ControlText
- 0, 0
- 656, 0
- Flat
- Flat
- Flat
- Solid
- 2
- object_177a5444_b8e0_4202_87d2_05cdc7cd1194
-
-
- 602, 24
- 100, 20
- White
- Microsoft Sans Serif, 8.25pt
- None
- TopLeft
- False
- False
- ='Page ' + Globals!PageNumber
- False
- WindowFrame
- ControlText
- True
- ='Page ' + Globals!PageNumber
-
-
- Black
- ReportPageFooter
-
-
- 50, 362
- 750, 55
- Window
- 0
- 50
- False
- False
-
- Black
- ReportFooter
-
-
-
\ No newline at end of file
diff --git a/samples/SharpDevelopReports/SampleReports/Ilist/ContributorsListWithParameters.srd b/samples/SharpDevelopReports/SampleReports/Ilist/ContributorsListWithParameters.srd
deleted file mode 100644
index 8177a8c12e..0000000000
--- a/samples/SharpDevelopReports/SampleReports/Ilist/ContributorsListWithParameters.srd
+++ /dev/null
@@ -1,310 +0,0 @@
-
-
-
-
- Report1
- DataReport
- 50
- 50
- 50
- 50
- 827, 1169
- False
- Millimeter
- 5, 5, 5, 5
-
-
-
-
-
- p1
- ValueOfP1
-
-
-
-
- Text
- PushData
- No Data for this Report
- Microsoft Sans Serif, 10pt
- True
-
-
-
-
- 50, 50
- 786, 35
- Window
- 0
- 50
- False
- False
-
- Black
- ReportHeader
-
-
- 50, 100
- 786, 108
- Window
- 0
- 50
- False
- False
-
-
- 45, 20
- 272, 20
- White
- Segoe UI, 9pt
-
- None
- TopLeft
- False
- False
- ="Param " + Parameters!p1
- False
- Black
- 0, 0, 0
- True
- BaseTextItem2147483646
-
-
- 429, 63
- 100, 20
- White
- Microsoft Sans Serif, 12pt, style=Bold
-
- None
- TopLeft
- False
- False
- Job
- False
- WindowFrame
- ControlText
- True
- Job
-
-
- 234, 63
- 100, 20
- White
- Microsoft Sans Serif, 12pt, style=Bold
-
- None
- TopLeft
- False
- False
- Lastname
- False
- WindowFrame
- ControlText
- True
- Lastname
-
-
- 429, 6
- 273, 42
- Window
- D:\SharpDevelop3.0_CHECKOUT\SharpDevelop\samples\SharpDevelopReports\SampleReports\Logos\Bannerbeige2.gif
- False
- File
- ..\..\..\..\..\..\SharpDevelop3.0_CHECKOUT\SharpDevelop\samples\SharpDevelopReports\SampleReports\Logos\Bannerbeige2.gif
- ReportImageControl
-
-
- 47, 87
- 661, 18
- White
- ControlText
- 0, 3
- 614, 3
- Flat
- Flat
- Flat
- Solid
- 2
-
-
-
- 46, 63
- 109, 20
- White
- Microsoft Sans Serif, 12pt, style=Bold
-
- EllipsisCharacter
- TopLeft
- False
- False
- Firstname
- False
- WindowFrame
- ControlText
- True
- reportTextItem1
-
-
- Black
- ReportPageHeader
-
-
- 50, 223
- 750, 51
- Window
- 0
- 50
- False
- False
-
-
- 3, 10
- 699, 40
- White
- False
- ControlText
- True
- WindowFrame
-
-
- 43, 12
- 147, 25
- White
- Microsoft Sans Serif, 10pt
-
- EllipsisCharacter
- MiddleLeft
- False
- False
- System.String
- First
- False
- WindowFrame
- ControlText
- True
- First
- unbound1
-
-
- 231, 12
- 139, 25
- White
- Microsoft Sans Serif, 10pt
-
- EllipsisCharacter
- MiddleLeft
- False
- False
- System.String
- last
- False
- WindowFrame
- ControlText
- True
- last
- unbound2
-
-
- 426, 10
- 216, 25
- White
- Microsoft Sans Serif, 10pt
-
- EllipsisCharacter
- MiddleLeft
- False
- False
- System.String
- Job
- False
- WindowFrame
- ControlText
- True
- Job
- --------------
- unbound3
-
-
-
- 0
- Row
-
-
- Black
- ReportDetail
-
-
- 50, 289
- 750, 49
- Window
- 0
- 50
- False
- False
-
-
- 45, 24
- 483, 20
- White
- Microsoft Sans Serif, 8.25pt
-
- None
- TopLeft
- False
- False
- =Globals!ReportFolder
- False
- WindowFrame
- ControlText
- True
- =Globals!ReportFolder
-
-
- 45, 3
- 663, 15
- White
- ControlText
- 0, 0
- 656, 0
- Flat
- Flat
- Flat
- Solid
- 2
- object_177a5444_b8e0_4202_87d2_05cdc7cd1194
-
-
- 602, 24
- 100, 20
- White
- Microsoft Sans Serif, 8.25pt
-
- None
- TopLeft
- False
- False
- ='Page ' + Globals!PageNumber
- False
- WindowFrame
- ControlText
- True
- ='Page ' + Globals!PageNumber
-
-
- Black
- ReportPageFooter
-
-
- 50, 353
- 750, 55
- Window
- 0
- 50
- False
- False
-
- Black
- ReportFooter
-
-
-
\ No newline at end of file
diff --git a/samples/SharpDevelopReports/SampleReports/Logos/Bannerbeige2.gif b/samples/SharpDevelopReports/SampleReports/Logos/Bannerbeige2.gif
deleted file mode 100644
index 5071ebf245..0000000000
Binary files a/samples/SharpDevelopReports/SampleReports/Logos/Bannerbeige2.gif and /dev/null differ
diff --git a/samples/SharpDevelopReports/SampleReports/Logos/SDLogo_JPG.jpg b/samples/SharpDevelopReports/SampleReports/Logos/SDLogo_JPG.jpg
deleted file mode 100644
index 1ed9853be0..0000000000
Binary files a/samples/SharpDevelopReports/SampleReports/Logos/SDLogo_JPG.jpg and /dev/null differ
diff --git a/samples/SharpDevelopReports/SampleReports/ProviderIndependent/NoConnectionReport.srd b/samples/SharpDevelopReports/SampleReports/ProviderIndependent/NoConnectionReport.srd
deleted file mode 100644
index 955d51965e..0000000000
--- a/samples/SharpDevelopReports/SampleReports/ProviderIndependent/NoConnectionReport.srd
+++ /dev/null
@@ -1,331 +0,0 @@
-
-
-
-
- Microsoft Sans Serif, 10pt
- PullData
- 50
- True
-
-
-
- Kategorie-Nr
- System.Int32
-
-
- Kategoriename
- System.String
-
-
- Beschreibung
- System.String
-
-
- Abbildung
- System.Byte[]
-
-
- No Data for this Report
- 50
- 827, 1169
- 5, 5, 5, 5
- 50
- Text
-
-
- p1
- aaaaa
-
-
- False
- Report1
- 50
-
- Millimeter
- SELECT * FROM Kategorien
- DataReport
-
-
-
-
-
- 727, 60
- ReportHeader
- False
- 0
- 0
- White
-
-
- White
- False
- EllipsisCharacter
- ='Im a ' + p1 + ' Report'
- 194, 5
- MiddleLeft
- True
- False
- Microsoft Sans Serif, 10pt
- False
-
- Report1
- WindowFrame
- 279, 20
- Black
-
-
- 50, 50
- False
-
-
- 727, 60
- ReportPageHeader
- False
- 0
- 0
- White
-
-
-
- WindowFrame
- AbstractItem
- 5, 5
- True
- 717, 50
- 0, 0, 0, 0
-
-
- White
- False
- EllipsisCharacter
- Kategorie-Nr
- 5, 5
- MiddleLeft
- True
- False
- Microsoft Sans Serif, 10pt
- False
-
- Kategorie-Nr1
- WindowFrame
- 100, 20
- Black
-
-
- White
- False
- EllipsisCharacter
- Kategoriename
- 184, 5
- MiddleLeft
- True
- False
- Microsoft Sans Serif, 10pt
- False
-
- Kategoriename2
- WindowFrame
- 100, 20
- Black
-
-
- White
- False
- EllipsisCharacter
- Beschreibung
- 363, 5
- MiddleLeft
- True
- False
- Microsoft Sans Serif, 10pt
- False
-
- Beschreibung3
- WindowFrame
- 100, 20
- Black
-
-
- White
- False
- EllipsisCharacter
- Abbildung
- 542, 5
- MiddleLeft
- True
- False
- Microsoft Sans Serif, 10pt
- False
-
- Abbildung4
- WindowFrame
- 100, 20
- Black
-
-
- 0
- White
- False
- Black
-
-
- 50, 125
- False
-
-
- 727, 60
- ReportDetail
- False
- 0
- 0
- White
-
-
-
- WindowFrame
- AbstractItem
- 5, 5
- True
- 717, 50
- 0, 0, 0, 0
-
-
- System.Int32
- Kategorie-Nr
- Microsoft Sans Serif, 10pt
- 10, 10
- Table
- False
- Black
- None
- Kategorie-Nr
- False
- False
- MiddleLeft
- White
-
- Kategorie-Nr
- True
- 100, 20
- WindowFrame
-
-
- System.String
- Kategoriename
- Microsoft Sans Serif, 10pt
- 189, 10
- Table
- False
- Black
- None
- Kategoriename
- False
- False
- MiddleLeft
- White
-
- Kategoriename
- True
- 100, 20
- WindowFrame
-
-
- System.String
- Beschreibung
- Microsoft Sans Serif, 10pt
- 368, 10
- Table
- False
- Black
- None
- Beschreibung
- False
- False
- MiddleLeft
- White
-
- Beschreibung
- True
- 100, 20
- WindowFrame
-
-
- Database
- 547, 10
- Abbildung
- Table
- 100, 20
- False
- White
- Abbildung
-
-
- 0
- White
- False
- Black
-
-
- 50, 200
- False
-
-
- 727, 60
- ReportPageFooter
- False
- 0
- 0
- White
-
-
- White
- False
- EllipsisCharacter
- =Globals!PageNumber
- 622, 5
- MiddleLeft
- True
- False
- Microsoft Sans Serif, 10pt
- False
-
- PageNumber1
- WindowFrame
- 100, 20
- Black
-
-
- 50, 275
- False
-
-
- 727, 60
- ReportFooter
- False
- 0
- 0
- White
-
-
- Gainsboro
- False
- None
- ='This Report contains : ' + count() + ' DataRows'
- 5, 4
- MiddleCenter
- True
- False
- Microsoft Sans Serif, 10pt
- False
-
- AbstractItem
- WindowFrame
- 620, 20
- Black
-
-
- 50, 350
- False
-
-
-
\ No newline at end of file
diff --git a/samples/SharpDevelopReports/SampleReports/PullModel/Parameter_Aggregate.srd b/samples/SharpDevelopReports/SampleReports/PullModel/Parameter_Aggregate.srd
deleted file mode 100644
index 4d04ad6fd2..0000000000
--- a/samples/SharpDevelopReports/SampleReports/PullModel/Parameter_Aggregate.srd
+++ /dev/null
@@ -1,332 +0,0 @@
-
-
-
-
- 8, 8
- 827, 1169
- SELECT * FROM Kategorien
- False
-
- 50
- No Data for this Report
- Microsoft Sans Serif, 10pt
- DataReport
- True
- Text
- Millimeter
- 50
- Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\SharpReport_TestReports\TestReports\Nordwind.mdb;Persist Security Info=False
- 5, 5, 5, 5
- 50
-
- PullData
- 50
-
-
- Kategorie-Nr
- System.Int32
-
-
- Kategoriename
- System.String
-
-
- Beschreibung
- System.String
-
-
- Abbildung
- System.Byte[]
-
-
- Report1
-
-
- p1
- aaaaa
-
-
-
-
-
-
- 727, 60
- ReportHeader
- False
- 0
- 0
- White
-
-
- White
- False
- EllipsisCharacter
- ='Report with Parameter : ' + p1
- 235, 19
- MiddleLeft
- True
- False
- Microsoft Sans Serif, 10pt
- False
-
- Report1
- WindowFrame
- 249, 20
- Black
-
-
- 50, 50
- False
-
-
- 727, 60
- ReportPageHeader
- False
- 0
- 0
- White
-
-
-
- WindowFrame
- AbstractItem
- 5, 5
- True
- 717, 50
- 0, 0, 0, 0
-
-
- White
- False
- EllipsisCharacter
- Kategorie-Nr
- 5, 5
- MiddleLeft
- True
- False
- Microsoft Sans Serif, 10pt
- False
-
- Kategorie-Nr1
- WindowFrame
- 100, 20
- Black
-
-
- White
- False
- EllipsisCharacter
- Kategoriename
- 184, 5
- MiddleLeft
- True
- False
- Microsoft Sans Serif, 10pt
- False
-
- Kategoriename2
- WindowFrame
- 100, 20
- Black
-
-
- White
- False
- EllipsisCharacter
- Beschreibung
- 363, 5
- MiddleLeft
- True
- False
- Microsoft Sans Serif, 10pt
- False
-
- Beschreibung3
- WindowFrame
- 100, 20
- Black
-
-
- White
- False
- EllipsisCharacter
- Abbildung
- 542, 5
- MiddleLeft
- True
- False
- Microsoft Sans Serif, 10pt
- False
-
- Abbildung4
- WindowFrame
- 100, 20
- Black
-
-
- 0
- White
- False
- Black
-
-
- 50, 125
- False
-
-
- 727, 60
- ReportDetail
- False
- 0
- 0
- White
-
-
-
- WindowFrame
- AbstractItem
- 5, 5
- True
- 717, 50
- 0, 0, 0, 0
-
-
- System.Int32
- Kategorie-Nr
- Microsoft Sans Serif, 10pt
- 10, 10
- Table
- False
- Black
- None
- Kategorie-Nr
- False
- False
- MiddleLeft
- White
-
- Kategorie-Nr
- True
- 100, 20
- WindowFrame
-
-
- System.String
- Kategoriename
- Microsoft Sans Serif, 10pt
- 189, 10
- Table
- False
- Black
- None
- Kategoriename
- False
- False
- MiddleLeft
- White
-
- Kategoriename
- True
- 100, 20
- WindowFrame
-
-
- System.String
- Beschreibung
- Microsoft Sans Serif, 10pt
- 368, 10
- Table
- False
- Black
- None
- Beschreibung
- False
- False
- MiddleLeft
- Silver
-
- Beschreibung
- True
- 100, 20
- WindowFrame
-
-
- Database
- 547, 10
- Abbildung
- Table
- 100, 20
- False
- White
- Abbildung
-
-
- 0
- White
- False
- Black
-
-
- 50, 200
- False
-
-
- 727, 60
- ReportPageFooter
- False
- 0
- 0
- White
-
-
- White
- False
- EllipsisCharacter
- =Globals!PageNumber
- 622, 5
- MiddleLeft
- True
- False
- Microsoft Sans Serif, 10pt
- False
-
- PageNumber1
- WindowFrame
- 100, 20
- Black
-
-
- 50, 275
- False
-
-
- 727, 60
- ReportFooter
- False
- 0
- 0
- White
-
-
- Gainsboro
- False
- None
- ='This Report contains : ' + count() + ' DataRows'
- 15, 3
- MiddleCenter
- True
- False
- Microsoft Sans Serif, 10pt
- False
-
- AbstractItem
- WindowFrame
- 620, 20
- Black
-
-
- 50, 350
- False
-
-
-
\ No newline at end of file
diff --git a/samples/SharpDevelopReports/Samples.txt b/samples/SharpDevelopReports/Samples.txt
new file mode 100644
index 0000000000..59022adeb7
--- /dev/null
+++ b/samples/SharpDevelopReports/Samples.txt
@@ -0,0 +1,3 @@
+Samples and documentation can be found in the SharpDevelop Reporting repository:
+
+https://github.com/icsharpcode/SharpDevelopReporting/
diff --git a/samples/SharpDevelopReports/Web/BasicReport/Default.aspx b/samples/SharpDevelopReports/Web/BasicReport/Default.aspx
deleted file mode 100644
index 2f93899957..0000000000
--- a/samples/SharpDevelopReports/Web/BasicReport/Default.aspx
+++ /dev/null
@@ -1,20 +0,0 @@
-<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
-
-
-
-
-
- Basic Report
-
-
-
-
-
diff --git a/samples/SharpDevelopReports/Web/BasicReport/Default.aspx.cs b/samples/SharpDevelopReports/Web/BasicReport/Default.aspx.cs
deleted file mode 100644
index 7e472a2982..0000000000
--- a/samples/SharpDevelopReports/Web/BasicReport/Default.aspx.cs
+++ /dev/null
@@ -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();
- }
-}
\ No newline at end of file
diff --git a/samples/SharpDevelopReports/Web/BasicReport/SalesByYear.srd b/samples/SharpDevelopReports/Web/BasicReport/SalesByYear.srd
deleted file mode 100644
index d3670fc40b..0000000000
--- a/samples/SharpDevelopReports/Web/BasicReport/SalesByYear.srd
+++ /dev/null
@@ -1,247 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/samples/SharpDevelopReports/Web/BasicReport/Web.Config b/samples/SharpDevelopReports/Web/BasicReport/Web.Config
deleted file mode 100644
index 4065b14427..0000000000
--- a/samples/SharpDevelopReports/Web/BasicReport/Web.Config
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/samples/SharpDevelopReports/Web/IListReport/ContributorList.srd b/samples/SharpDevelopReports/Web/IListReport/ContributorList.srd
deleted file mode 100644
index ff6c58e91e..0000000000
--- a/samples/SharpDevelopReports/Web/IListReport/ContributorList.srd
+++ /dev/null
@@ -1,166 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/samples/SharpDevelopReports/Web/IListReport/Default.aspx b/samples/SharpDevelopReports/Web/IListReport/Default.aspx
deleted file mode 100644
index 25e8e53050..0000000000
--- a/samples/SharpDevelopReports/Web/IListReport/Default.aspx
+++ /dev/null
@@ -1,17 +0,0 @@
-<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
-
-
-
-
-
- Basic Report
-
-
-
-
-
diff --git a/samples/SharpDevelopReports/Web/IListReport/Default.aspx.cs b/samples/SharpDevelopReports/Web/IListReport/Default.aspx.cs
deleted file mode 100644
index f1068b351b..0000000000
--- a/samples/SharpDevelopReports/Web/IListReport/Default.aspx.cs
+++ /dev/null
@@ -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
- {
- }
-}
\ No newline at end of file
diff --git a/samples/SharpDevelopReports/Web/IListReport/Web.Config b/samples/SharpDevelopReports/Web/IListReport/Web.Config
deleted file mode 100644
index c704a6db33..0000000000
--- a/samples/SharpDevelopReports/Web/IListReport/Web.Config
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/samples/SharpDevelopReports/doc/ReadMe.txt b/samples/SharpDevelopReports/doc/ReadMe.txt
deleted file mode 100644
index 11ade8bd79..0000000000
--- a/samples/SharpDevelopReports/doc/ReadMe.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-The Getting Started Guide is located here:
-
-http://sharpdevelopreports.net/FeatureTour.ashx
\ No newline at end of file
diff --git a/samples/SharpDevelopReports/src/AssemblyInfo.cs b/samples/SharpDevelopReports/src/AssemblyInfo.cs
deleted file mode 100644
index 7b64854ca6..0000000000
--- a/samples/SharpDevelopReports/src/AssemblyInfo.cs
+++ /dev/null
@@ -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.*")]
diff --git a/samples/SharpDevelopReports/src/ReportSamples.sln b/samples/SharpDevelopReports/src/ReportSamples.sln
deleted file mode 100644
index 2a196afebc..0000000000
--- a/samples/SharpDevelopReports/src/ReportSamples.sln
+++ /dev/null
@@ -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
diff --git a/samples/SharpDevelopReports/src/SharpReportSamples/ContributorsList.cs b/samples/SharpDevelopReports/src/SharpReportSamples/ContributorsList.cs
deleted file mode 100644
index a21a80ae0e..0000000000
--- a/samples/SharpDevelopReports/src/SharpReportSamples/ContributorsList.cs
+++ /dev/null
@@ -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
-{
- ///
- /// Description of ContributorsList.
- ///
- 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{
- }
-}
diff --git a/samples/SharpDevelopReports/src/SharpReportSamples/EventLogger.cs b/samples/SharpDevelopReports/src/SharpReportSamples/EventLogger.cs
deleted file mode 100644
index d1f70774be..0000000000
--- a/samples/SharpDevelopReports/src/SharpReportSamples/EventLogger.cs
+++ /dev/null
@@ -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
-{
- ///
- /// Description of EventLogger.
- ///
- 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;}
- }
- }
-}
-
diff --git a/samples/SharpDevelopReports/src/SharpReportSamples/MainForm.Designer.cs b/samples/SharpDevelopReports/src/SharpReportSamples/MainForm.Designer.cs
deleted file mode 100644
index 336c86a1db..0000000000
--- a/samples/SharpDevelopReports/src/SharpReportSamples/MainForm.Designer.cs
+++ /dev/null
@@ -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
- {
- ///
- /// Designer variable used to keep track of non-visual components.
- ///
- private System.ComponentModel.IContainer components = null;
-
- ///
- /// Disposes resources used by the form.
- ///
- /// true if managed resources should be disposed; otherwise, false.
- protected override void Dispose(bool disposing)
- {
- if (disposing) {
- if (components != null) {
- components.Dispose();
- }
- }
- base.Dispose(disposing);
- }
-
- ///
- /// 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.
- ///
- 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;
- }
-}
diff --git a/samples/SharpDevelopReports/src/SharpReportSamples/MainForm.cs b/samples/SharpDevelopReports/src/SharpReportSamples/MainForm.cs
deleted file mode 100644
index 9fbba10e42..0000000000
--- a/samples/SharpDevelopReports/src/SharpReportSamples/MainForm.cs
+++ /dev/null
@@ -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
-{
- ///
- /// Description of MainForm.
- ///
- 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
- //
- ///
- /// 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
- ///
- ///
- 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 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 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 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 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());
- }
- }
- }
-}
diff --git a/samples/SharpDevelopReports/src/SharpReportSamples/MainForm.resx b/samples/SharpDevelopReports/src/SharpReportSamples/MainForm.resx
deleted file mode 100644
index 54d092328c..0000000000
--- a/samples/SharpDevelopReports/src/SharpReportSamples/MainForm.resx
+++ /dev/null
@@ -1,126 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- 237, 17
-
-
- 25
-
-
\ No newline at end of file
diff --git a/samples/SharpDevelopReports/src/SharpReportSamples/Program.cs b/samples/SharpDevelopReports/src/SharpReportSamples/Program.cs
deleted file mode 100644
index b2eb57767e..0000000000
--- a/samples/SharpDevelopReports/src/SharpReportSamples/Program.cs
+++ /dev/null
@@ -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
-{
- ///
- /// Class with program entry point.
- ///
- internal sealed class Program
- {
- ///
- /// Program entry point.
- ///
- [STAThread]
- private static void Main(string[] args)
- {
- Application.EnableVisualStyles();
- Application.SetCompatibleTextRenderingDefault(false);
- Application.Run(new MainForm());
- }
-
- }
-}
diff --git a/samples/SharpDevelopReports/src/SharpReportSamples/Properties/AssemblyInfo.cs b/samples/SharpDevelopReports/src/SharpReportSamples/Properties/AssemblyInfo.cs
deleted file mode 100644
index b8bea83970..0000000000
--- a/samples/SharpDevelopReports/src/SharpReportSamples/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -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.*")]
diff --git a/samples/SharpDevelopReports/src/SharpReportSamples/ReportViewerMessagesProvider.cs b/samples/SharpDevelopReports/src/SharpReportSamples/ReportViewerMessagesProvider.cs
deleted file mode 100644
index c4851f47fc..0000000000
--- a/samples/SharpDevelopReports/src/SharpReportSamples/ReportViewerMessagesProvider.cs
+++ /dev/null
@@ -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
-{
- ///
- /// Description of ReportViewerMessagesProvider.
- ///
- 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";
- }
- }
- }
-}
diff --git a/samples/SharpDevelopReports/src/SharpReportSamples/Resources/Info.png b/samples/SharpDevelopReports/src/SharpReportSamples/Resources/Info.png
deleted file mode 100644
index c9b7bdc15b..0000000000
Binary files a/samples/SharpDevelopReports/src/SharpReportSamples/Resources/Info.png and /dev/null differ
diff --git a/samples/SharpDevelopReports/src/SharpReportSamples/Resources/error.ico b/samples/SharpDevelopReports/src/SharpReportSamples/Resources/error.ico
deleted file mode 100644
index c444ce95ac..0000000000
Binary files a/samples/SharpDevelopReports/src/SharpReportSamples/Resources/error.ico and /dev/null differ
diff --git a/samples/SharpDevelopReports/src/SharpReportSamples/Resources/warning.ico b/samples/SharpDevelopReports/src/SharpReportSamples/Resources/warning.ico
deleted file mode 100644
index 07adc5b07d..0000000000
Binary files a/samples/SharpDevelopReports/src/SharpReportSamples/Resources/warning.ico and /dev/null differ
diff --git a/samples/SharpDevelopReports/src/SharpReportSamples/SharpReportSamples.csproj b/samples/SharpDevelopReports/src/SharpReportSamples/SharpReportSamples.csproj
deleted file mode 100644
index e09f5b2627..0000000000
--- a/samples/SharpDevelopReports/src/SharpReportSamples/SharpReportSamples.csproj
+++ /dev/null
@@ -1,80 +0,0 @@
-
-
-
- {BB5D34DA-3561-48B1-894A-46765C2A18C1}
- Debug
- x86
- Exe
- SharpReportSamples
- SharpReportSamples
- v4.0
- Properties
- C:\Users\Peter Forstmeier\AppData\Roaming\ICSharpCode/SharpDevelop3.0\Settings.SourceAnalysis
-
-
- x86
-
-
- bin\Debug\
- True
- Full
- False
- True
- DEBUG;TRACE
-
-
- bin\Release\
- False
- None
- True
- False
- TRACE
-
-
-
-
- ..\..\..\..\src\AddIns\Misc\Reports\Irony\obj\Debug\Irony.dll
-
-
-
- 3.5
-
-
-
- 3.5
-
-
-
-
-
-
- 3.5
-
-
-
-
-
-
-
- MainForm.cs
-
-
-
-
-
- MainForm.cs
-
-
-
-
-
-
-
-
-
-
- {4B2239FF-8FD6-431D-9D22-1B8049BA6917}
- ICSharpCode.Reports.Core
-
-
-
\ No newline at end of file
diff --git a/samples/XamlDesigner/App.xaml.cs b/samples/XamlDesigner/App.xaml.cs
index 5ec88cffc2..6a9be5c98c 100644
--- a/samples/XamlDesigner/App.xaml.cs
+++ b/samples/XamlDesigner/App.xaml.cs
@@ -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
{
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
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);
+ }
}
}
diff --git a/samples/XamlDesigner/Configuration/Settings.Designer.cs b/samples/XamlDesigner/Configuration/Settings.Designer.cs
index 9a835b8cf5..856ed1ff13 100644
--- a/samples/XamlDesigner/Configuration/Settings.Designer.cs
+++ b/samples/XamlDesigner/Configuration/Settings.Designer.cs
@@ -37,25 +37,34 @@ namespace ICSharpCode.XamlDesigner.Configuration {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute(@"
-
-
-
-
-
-
-
-
+ [global::System.Configuration.DefaultSettingValueAttribute(@"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
diff --git a/samples/XamlDesigner/Configuration/Settings.settings b/samples/XamlDesigner/Configuration/Settings.settings
index 65e359e302..33f62b33b9 100644
--- a/samples/XamlDesigner/Configuration/Settings.settings
+++ b/samples/XamlDesigner/Configuration/Settings.settings
@@ -6,25 +6,34 @@
0,0,0,0
- <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>
+ <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 />
diff --git a/samples/XamlDesigner/MainWindow.xaml b/samples/XamlDesigner/MainWindow.xaml
index b3cd9e3b43..881a18b050 100644
--- a/samples/XamlDesigner/MainWindow.xaml
+++ b/samples/XamlDesigner/MainWindow.xaml
@@ -42,6 +42,12 @@
+
+
+
+
@@ -78,8 +84,12 @@
+
-
+
diff --git a/samples/XamlDesigner/MainWindow_Commands.cs b/samples/XamlDesigner/MainWindow_Commands.cs
index 040f15a27c..bb6c0c7b5b 100644
--- a/samples/XamlDesigner/MainWindow_Commands.cs
+++ b/samples/XamlDesigner/MainWindow_Commands.cs
@@ -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
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
{
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)
{
diff --git a/src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/src/MSpecApplication.cs b/src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/src/MSpecApplication.cs
index 8a9913b46f..64af8836a9 100644
--- a/src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/src/MSpecApplication.cs
+++ b/src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/src/MSpecApplication.cs
@@ -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
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
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);
diff --git a/src/AddIns/Analysis/Profiler/Frontend/AddIn/Src/Dialogs/ProfileExecutableForm.xaml.cs b/src/AddIns/Analysis/Profiler/Frontend/AddIn/Src/Dialogs/ProfileExecutableForm.xaml.cs
index 88d126157f..37cb1bec4d 100644
--- a/src/AddIns/Analysis/Profiler/Frontend/AddIn/Src/Dialogs/ProfileExecutableForm.xaml.cs
+++ b/src/AddIns/Analysis/Profiler/Frontend/AddIn/Src/Dialogs/ProfileExecutableForm.xaml.cs
@@ -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
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);
}
}
diff --git a/src/AddIns/Analysis/UnitTesting/NUnit/NUnitConsoleApplication.cs b/src/AddIns/Analysis/UnitTesting/NUnit/NUnitConsoleApplication.cs
index ca88a54f38..7bdde481b8 100644
--- a/src/AddIns/Analysis/UnitTesting/NUnit/NUnitConsoleApplication.cs
+++ b/src/AddIns/Analysis/UnitTesting/NUnit/NUnitConsoleApplication.cs
@@ -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
return b.ToString();
}
- ///
- /// Checks that the project's PlatformTarget is x32 for the active configuration.
- ///
- 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;
diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.csproj b/src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.csproj
index 01c4eeb7f2..2762300961 100644
--- a/src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.csproj
+++ b/src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.csproj
@@ -79,17 +79,19 @@
+
+
CSharpSemanticHighlighter.cs
-
+
diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/CaretReferenceHighlightRenderer.cs b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/CaretReferenceHighlightRenderer.cs
index 5b6bc1782b..24d5a55521 100644
--- a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/CaretReferenceHighlightRenderer.cs
+++ b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/CaretReferenceHighlightRenderer.cs
@@ -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
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
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()
diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Completion/CSharpCompletionDataFactory.cs b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Completion/CSharpCompletionDataFactory.cs
index f9342c40f0..8fbfc7e3f7 100644
--- a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Completion/CSharpCompletionDataFactory.cs
+++ b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Completion/CSharpCompletionDataFactory.cs
@@ -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 ICompletionDataFactory.CreateCodeTemplateCompletionData()
@@ -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)
diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Completion/CompletionData.cs b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Completion/CompletionData.cs
index 507310c1cf..7c04f56b9f 100644
--- a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Completion/CompletionData.cs
+++ b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Completion/CompletionData.cs
@@ -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;
diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Completion/FormatItemCompletionData.cs b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Completion/FormatItemCompletionData.cs
new file mode 100644
index 0000000000..f0881fe996
--- /dev/null
+++ b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Completion/FormatItemCompletionData.cs
@@ -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;
+ }
+ }
+}
diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Completion/PartialCompletionData.cs b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Completion/PartialCompletionData.cs
new file mode 100644
index 0000000000..7cd6f37a43
--- /dev/null
+++ b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Completion/PartialCompletionData.cs
@@ -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
+{
+ ///
+ /// Item for 'partial' completion.
+ ///
+ 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 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);
+ }
+ }
+ }
+}
diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormattingStrategy/CSharpFormattingOptionsPersistence.cs b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormattingStrategy/CSharpFormattingOptionsPersistence.cs
index a8f726ce99..37256b9915 100644
--- a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormattingStrategy/CSharpFormattingOptionsPersistence.cs
+++ b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormattingStrategy/CSharpFormattingOptionsPersistence.cs
@@ -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);
diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormattingStrategy/CSharpFormattingStrategy.cs b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormattingStrategy/CSharpFormattingStrategy.cs
index 0e0e8498c3..5c365b2f66 100644
--- a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormattingStrategy/CSharpFormattingStrategy.cs
+++ b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormattingStrategy/CSharpFormattingStrategy.cs
@@ -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
var engine = new CSharpIndentEngine(document, options, formattingOptions.OptionsContainer.GetEffectiveOptions());
return new CacheIndentEngine(engine);
}
+ */
#endregion
#region Private functions
diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/CSharpSyntaxIssue.cs b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/CSharpSyntaxIssue.cs
index ca499aa18c..72f36c457d 100644
--- a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/CSharpSyntaxIssue.cs
+++ b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/CSharpSyntaxIssue.cs
@@ -39,13 +39,26 @@ namespace CSharpBinding.Refactoring
{
var refactoringContext = context as SDRefactoringContext;
if (refactoringContext == null)
- return Enumerable.Empty();
+ yield break;
var syntaxTree = context.RootNode as SyntaxTree;
if (syntaxTree == null)
- return Enumerable.Empty();
-
- 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
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);
diff --git a/src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlCompletionItemList.cs b/src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlCompletionItemList.cs
index 60668bbc36..1138d7fe84 100644
--- a/src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlCompletionItemList.cs
+++ b/src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlCompletionItemList.cs
@@ -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);
}
diff --git a/src/AddIns/Debugger/Debugger.AddIn/NRefactory/ExpressionEvaluationVisitor.cs b/src/AddIns/Debugger/Debugger.AddIn/NRefactory/ExpressionEvaluationVisitor.cs
index 30ea878d5c..81dc11623e 100644
--- a/src/AddIns/Debugger/Debugger.AddIn/NRefactory/ExpressionEvaluationVisitor.cs
+++ b/src/AddIns/Debugger/Debugger.AddIn/NRefactory/ExpressionEvaluationVisitor.cs
@@ -88,6 +88,30 @@ namespace Debugger.AddIn
this.allowSetValue = allowSetValue;
}
+ ///
+ /// Imports a type into the debugger's type system, and into the current generic context.
+ ///
+ IType Import(IType type)
+ {
+ IType importedType = debuggerTypeSystem.Import(type);
+ if (importedType != null)
+ return importedType.AcceptVisitor(context.MethodInfo.Substitution);
+ else
+ return null;
+ }
+
+ ///
+ /// Imports a type into the debugger's type system, and into the current generic context.
+ ///
+ 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
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
}
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
///
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
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
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
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
}
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);
diff --git a/src/AddIns/Debugger/Debugger.AddIn/Pads/DebuggerDotCompletion.cs b/src/AddIns/Debugger/Debugger.AddIn/Pads/DebuggerDotCompletion.cs
index 7ef10201d3..4518c832ae 100644
--- a/src/AddIns/Debugger/Debugger.AddIn/Pads/DebuggerDotCompletion.cs
+++ b/src/AddIns/Debugger/Debugger.AddIn/Pads/DebuggerDotCompletion.cs
@@ -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();
}
}
diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/BasicMetadata.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/BasicMetadata.cs
index d3d6ffcd18..91dbe48dd1 100644
--- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/BasicMetadata.cs
+++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/BasicMetadata.cs
@@ -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
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));
diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/DesignPanel.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/DesignPanel.cs
index aa8f55a245..0a5ba978a3 100644
--- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/DesignPanel.cs
+++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/DesignPanel.cs
@@ -35,6 +35,10 @@ namespace ICSharpCode.WpfDesign.Designer
public sealed class DesignPanel : Decorator, IDesignPanel, INotifyPropertyChanged
{
#region Hit Testing
+
+ private List hitTestElements = new List();
+ private DependencyObject lastElement;
+
///
/// this element is always hit (unless HitTestVisible is set to false)
///
@@ -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
if (designItem != null && designItem.IsDesignTimeLocked) {
return HitTestFilterBehavior.ContinueSkipSelfAndChildren;
+ }
}
- }
+ hitTestElements.Add(element);
return HitTestFilterBehavior.Continue;
}
@@ -80,14 +85,17 @@ namespace ICSharpCode.WpfDesign.Designer
///
/// Performs a custom hit testing lookup for the specified mouse event args.
///
- 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
/// Performs a hit test on the design surface, raising for each match.
/// Hit testing continues while the callback returns true.
///
- public void HitTest(Point mousePosition, bool testAdorners, bool testDesignSurface, Predicate callback)
+ public void HitTest(Point mousePosition, bool testAdorners, bool testDesignSurface, Predicate 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
bool continueHitTest = true;
+ hitTestElements.Clear();
+
if (testAdorners) {
RunHitTest(
_adornerLayer, mousePosition, FilterHitTestInvisibleElements,
@@ -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
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
}
}
}
-
+
///
/// Enables / Disables the Raster Placement
///
@@ -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
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);
}
}
diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/InPlaceEditorExtension.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/InPlaceEditorExtension.cs
index 744f34e9b3..81a24d77c4 100644
--- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/InPlaceEditorExtension.cs
+++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/InPlaceEditorExtension.cs
@@ -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
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
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);
diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/BoolEditor.xaml b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/BoolEditor.xaml
index f088519992..5c05391fb0 100644
--- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/BoolEditor.xaml
+++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/BoolEditor.xaml
@@ -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"
>
diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/ColorEditor.xaml b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/ColorEditor.xaml
new file mode 100644
index 0000000000..559d1520ca
--- /dev/null
+++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/ColorEditor.xaml
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/ColorEditor.xaml.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/ColorEditor.xaml.cs
new file mode 100644
index 0000000000..033175be75
--- /dev/null
+++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/ColorEditor.xaml.cs
@@ -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();
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/FlatCollectionEditor.xaml.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/FlatCollectionEditor.xaml.cs
index 07f33783f9..bffd2a8f4e 100644
--- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/FlatCollectionEditor.xaml.cs
+++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/FlatCollectionEditor.xaml.cs
@@ -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;
diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/OpenCollectionEditor.xaml b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/OpenCollectionEditor.xaml
new file mode 100644
index 0000000000..346915708c
--- /dev/null
+++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/OpenCollectionEditor.xaml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/OpenCollectionEditor.xaml.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/OpenCollectionEditor.xaml.cs
new file mode 100644
index 0000000000..fcd84591b8
--- /dev/null
+++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/OpenCollectionEditor.xaml.cs
@@ -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();
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/TimeSpanEditor.xaml b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/TimeSpanEditor.xaml
new file mode 100644
index 0000000000..366e444010
--- /dev/null
+++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/TimeSpanEditor.xaml
@@ -0,0 +1,6 @@
+
+
diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/TimeSpanEditor.xaml.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/TimeSpanEditor.xaml.cs
new file mode 100644
index 0000000000..7a35df4b4d
--- /dev/null
+++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/TimeSpanEditor.xaml.cs
@@ -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();
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/CreateComponentTool.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/CreateComponentTool.cs
index 92bc7beb19..c066d06222 100644
--- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/CreateComponentTool.cs
+++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/CreateComponentTool.cs
@@ -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
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();
if (behavior != null) {
diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/MoveLogic.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/MoveLogic.cs
index 539bb05ee3..9e3d6cf180 100644
--- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/MoveLogic.cs
+++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/MoveLogic.cs
@@ -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;
}
diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/PointerTool.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/PointerTool.cs
index 0ec0136f9c..566aabea54 100644
--- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/PointerTool.cs
+++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/PointerTool.cs
@@ -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();
if (b != null) {
diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/WpfDesign.Designer.csproj b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/WpfDesign.Designer.csproj
index 09acd365fa..0cb8629e13 100644
--- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/WpfDesign.Designer.csproj
+++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/WpfDesign.Designer.csproj
@@ -75,6 +75,9 @@
False
3.0
+
+ ..\..\..\..\..\Libraries\WPFExtendedToolkit\Xceed.Wpf.Toolkit.dll
+
@@ -89,10 +92,19 @@
+
+ ColorEditor.xaml
+
FlatCollectionEditor.xaml
Code
+
+ OpenCollectionEditor.xaml
+
+
+ TimeSpanEditor.xaml
+
@@ -251,7 +263,10 @@
+
+
+
{8035765F-D51F-4A0C-A746-2FD100E19419}
diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/HitTestType.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/HitTestType.cs
new file mode 100644
index 0000000000..33d581cc61
--- /dev/null
+++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/HitTestType.cs
@@ -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
+{
+ ///
+ ///
+ ///
+ public enum HitTestType
+ {
+ ///
+ ///
+ ///
+ Default,
+
+ ///
+ ///
+ ///
+ ElementSelection,
+ }
+}
diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/PropertyGrid/EditorManager.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/PropertyGrid/EditorManager.cs
index 31d19f657a..57529eef10 100644
--- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/PropertyGrid/EditorManager.cs
+++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/PropertyGrid/EditorManager.cs
@@ -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) {
diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/PropertyGrid/TypeHelper.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/PropertyGrid/TypeHelper.cs
index 06642fb3f7..252e33aba8 100644
--- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/PropertyGrid/TypeHelper.cs
+++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/PropertyGrid/TypeHelper.cs
@@ -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
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().Count() != 0) continue;
yield return p;
@@ -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().Count()!=0) continue;
yield return p;
}
diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/Tools.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/Tools.cs
index 875dd4ccad..bb23a64926 100644
--- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/Tools.cs
+++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/Tools.cs
@@ -99,14 +99,14 @@ namespace ICSharpCode.WpfDesign
///
/// Performs a hit test on the design surface.
///
- DesignPanelHitTestResult HitTest(Point mousePosition, bool testAdorners, bool testDesignSurface);
-
+ DesignPanelHitTestResult HitTest(Point mousePosition, bool testAdorners, bool testDesignSurface, HitTestType hitTestType);
+
///
/// Performs a hit test on the design surface, raising for each match.
/// Hit testing continues while the callback returns true.
///
- void HitTest(Point mousePosition, bool testAdorners, bool testDesignSurface, Predicate callback);
-
+ void HitTest(Point mousePosition, bool testAdorners, bool testDesignSurface, Predicate callback, HitTestType hitTestType);
+
// The following members were missing in , but
// are supported on the DesignPanel:
diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/WpfDesign.csproj b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/WpfDesign.csproj
index d868d6287a..4d2b74cf43 100644
--- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/WpfDesign.csproj
+++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/WpfDesign.csproj
@@ -74,6 +74,7 @@
+
diff --git a/src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/OutputVisitor/TextWriterOutputFormatter.cs b/src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/OutputVisitor/TextWriterOutputFormatter.cs
index 67c93cdaed..bb9db71277 100644
--- a/src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/OutputVisitor/TextWriterOutputFormatter.cs
+++ b/src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/OutputVisitor/TextWriterOutputFormatter.cs
@@ -333,7 +333,7 @@ namespace ICSharpCode.NRefactory.CSharp
/// Gets the escape sequence for the specified character.
///
/// This method does not convert ' or ".
- public static string ConvertChar(char ch)
+ static string ConvertChar(char ch)
{
switch (ch) {
case '\\':
diff --git a/src/Libraries/WPFExtendedToolkit/Xceed.Wpf.Toolkit.dll b/src/Libraries/WPFExtendedToolkit/Xceed.Wpf.Toolkit.dll
new file mode 100644
index 0000000000..7af68875f9
Binary files /dev/null and b/src/Libraries/WPFExtendedToolkit/Xceed.Wpf.Toolkit.dll differ
diff --git a/src/Main/Base/Project/Editor/DocumentationUIBuilder.cs b/src/Main/Base/Project/Editor/DocumentationUIBuilder.cs
index 4abb77342a..d26efceae3 100644
--- a/src/Main/Base/Project/Editor/DocumentationUIBuilder.cs
+++ b/src/Main/Base/Project/Editor/DocumentationUIBuilder.cs
@@ -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);
diff --git a/src/Main/Base/Project/Src/Services/Tasks/ErrorPainter.cs b/src/Main/Base/Project/Src/Services/Tasks/ErrorPainter.cs
index ffaca4f900..ef7b9289c1 100644
--- a/src/Main/Base/Project/Src/Services/Tasks/ErrorPainter.cs
+++ b/src/Main/Base/Project/Src/Services/Tasks/ErrorPainter.cs
@@ -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);
diff --git a/src/Main/Base/Project/Util/DotnetDetection.cs b/src/Main/Base/Project/Util/DotnetDetection.cs
index e47c5d59fc..9298d9ab52 100644
--- a/src/Main/Base/Project/Util/DotnetDetection.cs
+++ b/src/Main/Base/Project/Util/DotnetDetection.cs
@@ -69,5 +69,16 @@ namespace ICSharpCode.SharpDevelop
}
return null;
}
+
+ ///
+ /// Gets whether the Microsoft Build Tools 2013 (MSBuild 12.0) is installed.
+ ///
+ 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;
+ }
+ }
}
}
diff --git a/src/Main/Base/Project/Util/SharpDevelopExtensions.cs b/src/Main/Base/Project/Util/SharpDevelopExtensions.cs
index 316b857e4b..6f320ecf9f 100644
--- a/src/Main/Base/Project/Util/SharpDevelopExtensions.cs
+++ b/src/Main/Base/Project/Util/SharpDevelopExtensions.cs
@@ -1052,5 +1052,21 @@ namespace ICSharpCode.SharpDevelop
return document.GetLineByOffset(offset);
}
#endregion
+
+ #region IProject extensions
+ ///
+ /// Checks if the project's output is a .NET executable that can be run in a 32-bit process.
+ ///
+ 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
}
}
diff --git a/src/Main/SharpDevelop/Project/Build/MSBuildEngine/MSBuildEngineWorker.cs b/src/Main/SharpDevelop/Project/Build/MSBuildEngine/MSBuildEngineWorker.cs
index 88a221d635..582bff0b94 100644
--- a/src/Main/SharpDevelop/Project/Build/MSBuildEngine/MSBuildEngineWorker.cs
+++ b/src/Main/SharpDevelop/Project/Build/MSBuildEngine/MSBuildEngineWorker.cs
@@ -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;
}