Click here to Skip to main content
15,892,253 members
Articles / Programming Languages / C#

EasiReports

Rate me:
Please Sign up or sign in to vote.
4.87/5 (64 votes)
13 Feb 2006CPOL6 min read 481.5K   9.7K   219  
A library to add reports to your application.
using System;
using System.Drawing;
using System.Windows.Forms;
using Puzzle.SourceCode;

namespace Puzzle.Windows.Forms.SyntaxBox
{
	public delegate void RowPaintHandler(object sender, RowPaintEventArgs e);

	public delegate void RowMouseHandler(object sender, RowMouseEventArgs e);

	public delegate void CopyHandler(object sender, CopyEventArgs e);

	public delegate void WordMouseHandler(object sender, ref WordMouseEventArgs e);

	/// <summary>
	/// Event arg for Copy/Cut actions.
	/// </summary>
	public class CopyEventArgs
	{
		/// <summary>
		/// The text copied to the clipboard.
		/// </summary>
		public string Text = "";
	}

	/// <summary>
	/// Event args passed to word mouse events of the syntaxbox
	/// </summary>
	public class WordMouseEventArgs : EventArgs
	{
		/// <summary>
		/// The word where the event was fired
		/// </summary>
		public Word Word;

		/// <summary>
		/// The pattern that triggered the event
		/// </summary>
		public Pattern Pattern;

		/// <summary>
		/// The mouse buttons that was pressed when the event fired
		/// </summary>
		public MouseButtons Button;

		/// <summary>
		/// Reference to a mouse cursor , developers can assign new values here to display new cursors for a given pattern
		/// </summary>
		public Cursor Cursor;
	}

	/// <summary>
	/// Event args for mouse actions on the syntaxbox
	/// </summary>
	public class RowMouseEventArgs : EventArgs
	{
		/// <summary>
		/// The row where the event was fired
		/// </summary>
		public Row Row;

		/// <summary>
		/// The mousebuttons that was pressed when the event was fired
		/// </summary>
		public MouseButtons Button;

		/// <summary>
		/// The X position of the mouse cursor when the event was fired
		/// </summary>
		public int MouseX;

		/// <summary>
		/// The Y position of the mouse cursor when the event was fired
		/// </summary>
		public int MouseY;

		/// <summary>
		/// The area of the row where the event was fired
		/// </summary>
		public RowArea Area;
	}


	/// <summary>
	/// Describes in what area a mouse event occured on a row
	/// </summary>
	public enum RowArea
	{
		/// <summary>
		/// Represents the gutter margin
		/// </summary>
		GutterArea,
		/// <summary>
		/// Represents the LineNumber section
		/// </summary>
		LineNumberArea,
		/// <summary>
		/// Represents the area where the folding symbols are shown
		/// </summary>
		FoldingArea,
		/// <summary>
		/// Represents the actual text part of a row
		/// </summary>
		TextArea,
	}

	/// <summary>
	/// Event args passed to owner draw events of the syntaxbox
	/// </summary>
	public class RowPaintEventArgs : EventArgs
	{
		/// <summary>
		/// The row to draw
		/// </summary>
		public Row Row;

		/// <summary>
		/// The graphics surface to draw on
		/// </summary>
		public Graphics Graphics;

		/// <summary>
		/// the bounds of the row
		/// </summary>
		public Rectangle Bounds;
	}


}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United Kingdom United Kingdom
I discovered C# and .NET 1.0 Beta 1 in late 2000 and loved them immediately.
I have been writing software professionally in C# ever since

In real life, I have spent 3 years travelling abroad,
I have held a UK Private Pilots Licence for 20 years,
and I am a PADI Divemaster.

I now live near idyllic Bournemouth in England.

I can work 'virtually' anywhere!

Comments and Discussions