Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5692 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61pull/1/head
47 changed files with 1723 additions and 1207 deletions
@ -0,0 +1,292 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<ReportModel> |
||||||
|
<ReportSettings> |
||||||
|
<ReportSettings> |
||||||
|
<DefaultFont>Microsoft Sans Serif, 10pt</DefaultFont> |
||||||
|
<DataModel>PushData</DataModel> |
||||||
|
<RightMargin>50</RightMargin> |
||||||
|
<UseStandardPrinter>True</UseStandardPrinter> |
||||||
|
<SortColumnCollection /> |
||||||
|
<AvailableFieldsCollection /> |
||||||
|
<NoDataMessage>No Data for this Report</NoDataMessage> |
||||||
|
<LeftMargin>50</LeftMargin> |
||||||
|
<PageSize>827, 1169</PageSize> |
||||||
|
<Padding>5, 5, 5, 5</Padding> |
||||||
|
<BottomMargin>50</BottomMargin> |
||||||
|
<CommandType>Text</CommandType> |
||||||
|
<ParameterCollection /> |
||||||
|
<Landscape>False</Landscape> |
||||||
|
<ReportName>Customized</ReportName> |
||||||
|
<TopMargin>50</TopMargin> |
||||||
|
<GroupColumnsCollection /> |
||||||
|
<GraphicsUnit>Pixel</GraphicsUnit> |
||||||
|
<CommandText /> |
||||||
|
<ReportType>DataReport</ReportType> |
||||||
|
<ConnectionString /> |
||||||
|
</ReportSettings> |
||||||
|
</ReportSettings> |
||||||
|
<SectionCollection> |
||||||
|
<BaseSection> |
||||||
|
<Size>727, 91</Size> |
||||||
|
<Name>ReportHeader</Name> |
||||||
|
<PageBreakAfter>False</PageBreakAfter> |
||||||
|
<SectionMargin>0</SectionMargin> |
||||||
|
<SectionOffset>0</SectionOffset> |
||||||
|
<BackColor>White</BackColor> |
||||||
|
<Items> |
||||||
|
<BaseImageItem> |
||||||
|
<ImageSource>File</ImageSource> |
||||||
|
<Location>83, 13</Location> |
||||||
|
<Name>BaseImageItem2</Name> |
||||||
|
<Size>568, 36</Size> |
||||||
|
<ScaleImageToSize>False</ScaleImageToSize> |
||||||
|
<BackColor>White</BackColor> |
||||||
|
<RelativeFileName>..\Logos\Bannerbeige2.gif</RelativeFileName> |
||||||
|
<ImageFileName>D:\SharpDevelop3.0_WorkingCopy\SharpDevelop\samples\SharpDevelopReports\SampleReports\Logos\Bannerbeige2.gif</ImageFileName> |
||||||
|
</BaseImageItem> |
||||||
|
<BaseTextItem> |
||||||
|
<BackColor>Silver</BackColor> |
||||||
|
<CanShrink>False</CanShrink> |
||||||
|
<StringTrimming>None</StringTrimming> |
||||||
|
<Text>System - Eventlog</Text> |
||||||
|
<Location>83, 55</Location> |
||||||
|
<ContentAlignment>TopCenter</ContentAlignment> |
||||||
|
<Visible>True</Visible> |
||||||
|
<DrawBorder>False</DrawBorder> |
||||||
|
<Font>Microsoft Sans Serif, 15pt</Font> |
||||||
|
<CanGrow>False</CanGrow> |
||||||
|
<FormatString /> |
||||||
|
<Name>BaseTextItem2147483643</Name> |
||||||
|
<FrameColor>White</FrameColor> |
||||||
|
<Size>568, 33</Size> |
||||||
|
<ForeColor>ControlText</ForeColor> |
||||||
|
</BaseTextItem> |
||||||
|
</Items> |
||||||
|
<Location>50, 50</Location> |
||||||
|
<DrawBorder>False</DrawBorder> |
||||||
|
</BaseSection> |
||||||
|
<BaseSection> |
||||||
|
<Size>727, 60</Size> |
||||||
|
<Name>ReportPageHeader</Name> |
||||||
|
<PageBreakAfter>False</PageBreakAfter> |
||||||
|
<SectionMargin>0</SectionMargin> |
||||||
|
<SectionOffset>0</SectionOffset> |
||||||
|
<BackColor>White</BackColor> |
||||||
|
<Items> |
||||||
|
<BaseRowItem> |
||||||
|
<Location>12, 3</Location> |
||||||
|
<AlternateBackColor /> |
||||||
|
<Name>BaseRowItem2</Name> |
||||||
|
<Items> |
||||||
|
<BaseTextItem> |
||||||
|
<BackColor>White</BackColor> |
||||||
|
<CanShrink>False</CanShrink> |
||||||
|
<StringTrimming>None</StringTrimming> |
||||||
|
<Text>Image</Text> |
||||||
|
<Location>20, 7</Location> |
||||||
|
<ContentAlignment>TopCenter</ContentAlignment> |
||||||
|
<Visible>True</Visible> |
||||||
|
<DrawBorder>False</DrawBorder> |
||||||
|
<Font>Microsoft Sans Serif, 12pt</Font> |
||||||
|
<CanGrow>False</CanGrow> |
||||||
|
<FormatString /> |
||||||
|
<Name>BaseTextItem2147483642</Name> |
||||||
|
<FrameColor>White</FrameColor> |
||||||
|
<Size>100, 20</Size> |
||||||
|
<ForeColor>ControlText</ForeColor> |
||||||
|
</BaseTextItem> |
||||||
|
<BaseTextItem> |
||||||
|
<BackColor>White</BackColor> |
||||||
|
<CanShrink>False</CanShrink> |
||||||
|
<StringTrimming>None</StringTrimming> |
||||||
|
<Text>EntryType</Text> |
||||||
|
<Location>135, 7</Location> |
||||||
|
<ContentAlignment>TopCenter</ContentAlignment> |
||||||
|
<Visible>True</Visible> |
||||||
|
<DrawBorder>False</DrawBorder> |
||||||
|
<Font>Microsoft Sans Serif, 12pt</Font> |
||||||
|
<CanGrow>False</CanGrow> |
||||||
|
<FormatString /> |
||||||
|
<Name>BaseTextItem2147483644</Name> |
||||||
|
<FrameColor>White</FrameColor> |
||||||
|
<Size>100, 20</Size> |
||||||
|
<ForeColor>ControlText</ForeColor> |
||||||
|
</BaseTextItem> |
||||||
|
<BaseTextItem> |
||||||
|
<BackColor>White</BackColor> |
||||||
|
<CanShrink>False</CanShrink> |
||||||
|
<StringTrimming>None</StringTrimming> |
||||||
|
<Text>DateWritten</Text> |
||||||
|
<Location>261, 7</Location> |
||||||
|
<ContentAlignment>TopCenter</ContentAlignment> |
||||||
|
<Visible>True</Visible> |
||||||
|
<DrawBorder>False</DrawBorder> |
||||||
|
<Font>Microsoft Sans Serif, 12pt</Font> |
||||||
|
<CanGrow>False</CanGrow> |
||||||
|
<FormatString /> |
||||||
|
<Name>BaseTextItem2147483645</Name> |
||||||
|
<FrameColor>White</FrameColor> |
||||||
|
<Size>100, 20</Size> |
||||||
|
<ForeColor>ControlText</ForeColor> |
||||||
|
</BaseTextItem> |
||||||
|
<BaseTextItem> |
||||||
|
<BackColor>White</BackColor> |
||||||
|
<CanShrink>False</CanShrink> |
||||||
|
<StringTrimming>None</StringTrimming> |
||||||
|
<Text>Message</Text> |
||||||
|
<Location>391, 7</Location> |
||||||
|
<ContentAlignment>TopLeft</ContentAlignment> |
||||||
|
<Visible>True</Visible> |
||||||
|
<DrawBorder>False</DrawBorder> |
||||||
|
<Font>Microsoft Sans Serif, 12pt</Font> |
||||||
|
<CanGrow>False</CanGrow> |
||||||
|
<FormatString /> |
||||||
|
<Name>BaseTextItem2147483646</Name> |
||||||
|
<FrameColor>White</FrameColor> |
||||||
|
<Size>248, 20</Size> |
||||||
|
<ForeColor>ControlText</ForeColor> |
||||||
|
</BaseTextItem> |
||||||
|
</Items> |
||||||
|
<DrawBorder>False</DrawBorder> |
||||||
|
<ChangeBackColorEveryNRow>0</ChangeBackColorEveryNRow> |
||||||
|
<FrameColor>White</FrameColor> |
||||||
|
<Size>697, 44</Size> |
||||||
|
<BackColor>White</BackColor> |
||||||
|
<Visible>True</Visible> |
||||||
|
<ForeColor>Black</ForeColor> |
||||||
|
</BaseRowItem> |
||||||
|
</Items> |
||||||
|
<Location>50, 156</Location> |
||||||
|
<DrawBorder>False</DrawBorder> |
||||||
|
</BaseSection> |
||||||
|
<BaseSection> |
||||||
|
<Size>727, 90</Size> |
||||||
|
<Name>ReportDetail</Name> |
||||||
|
<PageBreakAfter>False</PageBreakAfter> |
||||||
|
<SectionMargin>0</SectionMargin> |
||||||
|
<SectionOffset>0</SectionOffset> |
||||||
|
<BackColor>White</BackColor> |
||||||
|
<Items> |
||||||
|
<BaseRowItem> |
||||||
|
<Location>12, 14</Location> |
||||||
|
<AlternateBackColor /> |
||||||
|
<Name>BaseRowItem1</Name> |
||||||
|
<Items> |
||||||
|
<BaseImageItem> |
||||||
|
<ImageSource>Database</ImageSource> |
||||||
|
<Location>20, 7</Location> |
||||||
|
<Name>BaseImageItem1</Name> |
||||||
|
<Size>30, 30</Size> |
||||||
|
<ScaleImageToSize>False</ScaleImageToSize> |
||||||
|
<BackColor>White</BackColor> |
||||||
|
<ColumnName>Image</ColumnName> |
||||||
|
</BaseImageItem> |
||||||
|
<BaseDataItem> |
||||||
|
<Text>EntryType</Text> |
||||||
|
<Font>Microsoft Sans Serif, 8.25pt</Font> |
||||||
|
<Location>135, 7</Location> |
||||||
|
<CanGrow>False</CanGrow> |
||||||
|
<ForeColor>Black</ForeColor> |
||||||
|
<StringTrimming>None</StringTrimming> |
||||||
|
<ColumnName>EntryType</ColumnName> |
||||||
|
<DrawBorder>False</DrawBorder> |
||||||
|
<CanShrink>False</CanShrink> |
||||||
|
<ContentAlignment>TopLeft</ContentAlignment> |
||||||
|
<BackColor>White</BackColor> |
||||||
|
<FormatString /> |
||||||
|
<Name>EntryType</Name> |
||||||
|
<Visible>True</Visible> |
||||||
|
<Size>100, 20</Size> |
||||||
|
<FrameColor>White</FrameColor> |
||||||
|
</BaseDataItem> |
||||||
|
<BaseDataItem> |
||||||
|
<Text>Message</Text> |
||||||
|
<Font>Microsoft Sans Serif, 8.25pt</Font> |
||||||
|
<Location>391, 7</Location> |
||||||
|
<CanGrow>False</CanGrow> |
||||||
|
<ForeColor>Black</ForeColor> |
||||||
|
<StringTrimming>None</StringTrimming> |
||||||
|
<ColumnName>Message</ColumnName> |
||||||
|
<DrawBorder>False</DrawBorder> |
||||||
|
<CanShrink>False</CanShrink> |
||||||
|
<ContentAlignment>TopLeft</ContentAlignment> |
||||||
|
<BackColor>White</BackColor> |
||||||
|
<FormatString /> |
||||||
|
<Name>Message</Name> |
||||||
|
<Visible>True</Visible> |
||||||
|
<Size>248, 20</Size> |
||||||
|
<FrameColor>White</FrameColor> |
||||||
|
</BaseDataItem> |
||||||
|
<BaseDataItem> |
||||||
|
<Text>TimeWritten</Text> |
||||||
|
<Font>Microsoft Sans Serif, 10pt</Font> |
||||||
|
<Location>261, 7</Location> |
||||||
|
<CanGrow>False</CanGrow> |
||||||
|
<ForeColor>Black</ForeColor> |
||||||
|
<StringTrimming>None</StringTrimming> |
||||||
|
<ColumnName>TimeWritten</ColumnName> |
||||||
|
<DrawBorder>False</DrawBorder> |
||||||
|
<CanShrink>False</CanShrink> |
||||||
|
<ContentAlignment>TopLeft</ContentAlignment> |
||||||
|
<BackColor>White</BackColor> |
||||||
|
<FormatString /> |
||||||
|
<Name>BaseDataItem1</Name> |
||||||
|
<Visible>True</Visible> |
||||||
|
<Size>100, 20</Size> |
||||||
|
<FrameColor>White</FrameColor> |
||||||
|
</BaseDataItem> |
||||||
|
</Items> |
||||||
|
<DrawBorder>False</DrawBorder> |
||||||
|
<ChangeBackColorEveryNRow>0</ChangeBackColorEveryNRow> |
||||||
|
<FrameColor>White</FrameColor> |
||||||
|
<Size>697, 63</Size> |
||||||
|
<BackColor>White</BackColor> |
||||||
|
<Visible>True</Visible> |
||||||
|
<ForeColor>Black</ForeColor> |
||||||
|
</BaseRowItem> |
||||||
|
</Items> |
||||||
|
<Location>50, 231</Location> |
||||||
|
<DrawBorder>False</DrawBorder> |
||||||
|
</BaseSection> |
||||||
|
<BaseSection> |
||||||
|
<Size>727, 60</Size> |
||||||
|
<Name>ReportPageFooter</Name> |
||||||
|
<PageBreakAfter>False</PageBreakAfter> |
||||||
|
<SectionMargin>0</SectionMargin> |
||||||
|
<SectionOffset>0</SectionOffset> |
||||||
|
<BackColor>White</BackColor> |
||||||
|
<Items> |
||||||
|
<BaseTextItem> |
||||||
|
<BackColor>White</BackColor> |
||||||
|
<CanShrink>False</CanShrink> |
||||||
|
<StringTrimming>None</StringTrimming> |
||||||
|
<Text>='Page (' + Globals!PageNumber + ') of ( ' + Globals!TotalPages + ' ) Pages'</Text> |
||||||
|
<Location>403, 21</Location> |
||||||
|
<ContentAlignment>TopLeft</ContentAlignment> |
||||||
|
<Visible>True</Visible> |
||||||
|
<DrawBorder>False</DrawBorder> |
||||||
|
<Font>Microsoft Sans Serif, 8.25pt</Font> |
||||||
|
<CanGrow>False</CanGrow> |
||||||
|
<FormatString /> |
||||||
|
<Name>='Page ' + Global!PageNumber + 'of ' + Global!Pages + 'Pages'</Name> |
||||||
|
<FrameColor>White</FrameColor> |
||||||
|
<Size>166, 20</Size> |
||||||
|
<ForeColor>ControlText</ForeColor> |
||||||
|
</BaseTextItem> |
||||||
|
</Items> |
||||||
|
<Location>50, 336</Location> |
||||||
|
<DrawBorder>False</DrawBorder> |
||||||
|
</BaseSection> |
||||||
|
<BaseSection> |
||||||
|
<Size>727, 60</Size> |
||||||
|
<Name>ReportFooter</Name> |
||||||
|
<PageBreakAfter>False</PageBreakAfter> |
||||||
|
<SectionMargin>0</SectionMargin> |
||||||
|
<SectionOffset>0</SectionOffset> |
||||||
|
<BackColor>White</BackColor> |
||||||
|
<Items /> |
||||||
|
<Location>50, 411</Location> |
||||||
|
<DrawBorder>False</DrawBorder> |
||||||
|
</BaseSection> |
||||||
|
</SectionCollection> |
||||||
|
</ReportModel> |
@ -0,0 +1,94 @@ |
|||||||
|
/* |
||||||
|
* Erstellt mit SharpDevelop. |
||||||
|
* Benutzer: Peter Forstmeier |
||||||
|
* Datum: 24.03.2010 |
||||||
|
* Zeit: 19:45 |
||||||
|
* |
||||||
|
* Sie können diese Vorlage unter Extras > Optionen > Codeerstellung > Standardheader ändern. |
||||||
|
*/ |
||||||
|
using System; |
||||||
|
using System.Collections; |
||||||
|
using System.Diagnostics; |
||||||
|
using System.Drawing; |
||||||
|
using System.IO; |
||||||
|
using System.Reflection; |
||||||
|
using System.Windows.Forms; |
||||||
|
|
||||||
|
namespace SharpReportSamples |
||||||
|
{ |
||||||
|
/// <summary>
|
||||||
|
/// Description of EventLogger.
|
||||||
|
/// </summary>
|
||||||
|
public class EventLogger |
||||||
|
{ |
||||||
|
ImageList imageList ; |
||||||
|
string fileName; |
||||||
|
|
||||||
|
public EventLogger(string fileName) |
||||||
|
{ |
||||||
|
this.fileName = fileName; |
||||||
|
this.Run(); |
||||||
|
} |
||||||
|
|
||||||
|
private void Run() { |
||||||
|
|
||||||
|
EventLog ev = new EventLog(); |
||||||
|
ev.Log = "System"; |
||||||
|
ev.MachineName = "."; // Lokale Maschine
|
||||||
|
FillImageList(); |
||||||
|
ArrayList ar = new ArrayList(); |
||||||
|
foreach (System.Diagnostics.EventLogEntry entry in ev.Entries) |
||||||
|
{ |
||||||
|
if (entry.TimeWritten > DateTime.Now.AddDays(-1)) |
||||||
|
{ |
||||||
|
ar.Add(entry); |
||||||
|
} |
||||||
|
} |
||||||
|
this.EventLog = ar; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// using (var provider = ProfilingDataSQLiteProvider.FromFile("ProfilingSession.sdps"))
|
||||||
|
// var functions = provider.GetFunctions(0, provider.DataSets.Count - 1);
|
||||||
|
// foreach (CallTreeNode n in functions) Console.WriteLine("{0}: {1} calls, {2:f2}ms", n.Name, n.CallCount, n.TimeSpent);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void FillImageList() { |
||||||
|
string ns = this.GetType().Namespace; |
||||||
|
|
||||||
|
// System.Console.WriteLine("{0}",ns);
|
||||||
|
|
||||||
|
Assembly a = Assembly.GetExecutingAssembly(); |
||||||
|
string [] resNames = a.GetManifestResourceNames(); |
||||||
|
// foreach(string s in resNames)
|
||||||
|
// {
|
||||||
|
// System.Console.WriteLine("{0}",s);
|
||||||
|
// }
|
||||||
|
|
||||||
|
this.imageList = new ImageList(); |
||||||
|
Stream imgStream = a.GetManifestResourceStream("SharpReportSamples.Resources.error.ico"); |
||||||
|
// Stream imgStream = a.GetManifestResourceStream("SharpReportSamples.Resources.Error.png");
|
||||||
|
this.imageList.Images.Add(Image.FromStream(imgStream)); |
||||||
|
|
||||||
|
imgStream = a.GetManifestResourceStream("SharpReportSamples.Resources.Info.png"); |
||||||
|
this.imageList.Images.Add(Image.FromStream(imgStream)); |
||||||
|
imgStream = a.GetManifestResourceStream("SharpReportSamples.Resources.warning.ico"); |
||||||
|
// imgStream = a.GetManifestResourceStream("SharpReportSamples.Resources.Warning.png");
|
||||||
|
this.imageList.Images.Add(Image.FromStream(imgStream)); |
||||||
|
|
||||||
|
// System.Console.WriteLine("imagelist contains {0} images",this.imageList.Images.Count);
|
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
public ArrayList EventLog {get;set;} |
||||||
|
|
||||||
|
|
||||||
|
public ImageList Images |
||||||
|
{ |
||||||
|
get {return this.imageList;} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.7 KiB |
@ -0,0 +1,52 @@ |
|||||||
|
// SharpDevelop samples
|
||||||
|
// Copyright (c) 2010, AlphaSierraPapa
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
// permitted provided that the following conditions are met:
|
||||||
|
//
|
||||||
|
// - Redistributions of source code must retain the above copyright notice, this list
|
||||||
|
// of conditions and the following disclaimer.
|
||||||
|
//
|
||||||
|
// - Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
// of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
// provided with the distribution.
|
||||||
|
//
|
||||||
|
// - Neither the name of the SharpDevelop team nor the names of its contributors may be used to
|
||||||
|
// endorse or promote products derived from this software without specific prior written
|
||||||
|
// permission.
|
||||||
|
//
|
||||||
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &AS IS& AND ANY EXPRESS
|
||||||
|
// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||||
|
// AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||||
|
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||||
|
// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||||
|
// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
using System; |
||||||
|
using ICSharpCode.SharpDevelop; |
||||||
|
using ICSharpCode.SharpDevelop.Gui; |
||||||
|
using ICSharpCode.SharpSnippetCompiler.Core; |
||||||
|
|
||||||
|
namespace ICSharpCode.SharpSnippetCompiler |
||||||
|
{ |
||||||
|
public class TextEditorDisplayBinding : IDisplayBinding |
||||||
|
{ |
||||||
|
public TextEditorDisplayBinding() |
||||||
|
{ |
||||||
|
} |
||||||
|
|
||||||
|
public bool CanCreateContentForFile(string fileName) |
||||||
|
{ |
||||||
|
return true; |
||||||
|
} |
||||||
|
|
||||||
|
public IViewContent CreateContentForFile(OpenedFile file) |
||||||
|
{ |
||||||
|
MainForm form = WorkbenchSingleton.MainForm as MainForm; |
||||||
|
return form.LoadFile(file.FileName); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue