Click here to Skip to main content
15,886,030 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 480.1K   9.7K   219  
A library to add reports to your application.
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace EasiReports
{
	/// <summary>
	/// Summary description for DlgAlgorithmInsert.
	/// </summary>
	internal class CDlgAlgorithmsInsertAlgorithmData : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Button buttonOK;
		private System.Windows.Forms.Button buttonCancel;
		private System.Windows.Forms.Label labelReturnType;
		private System.Windows.Forms.ComboBox comboReturnType;
		private System.Windows.Forms.Label labelAlgorithmName;
		private System.Windows.Forms.TextBox textAlgorithmName;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		private HelpProvider HelpProvider = new HelpProvider();

		private string _ReturnType = null;
		private string _AlgorithmName = null;

		public string ReturnType { get { return _ReturnType; } }
		public string AlgorithmName { get { return _AlgorithmName; } }

		public CDlgAlgorithmsInsertAlgorithmData()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			HelpProvider.HelpNamespace = Glob.HelpNamespace;
			HelpProvider.SetHelpNavigator( this, Glob.HelpNavigator );
			HelpProvider.SetHelpKeyword( this, "EasiReporter.Dialogs.InsertDataAlgorithm.htm" );

			comboReturnType.SelectedItem = "String";
			textAlgorithmName.Text = "DataAlgorithm";
		}

		/// <summary>Clean up any resources being used.</summary>
		/// <param name="disposing"><b>true</b> to release both managed and unmanaged resources; <b>false</b> to release only unmanaged resources.</param>
		/// <remarks>Releases the unmanaged resources and optionally releases the managed resources.</remarks>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(CDlgAlgorithmsInsertAlgorithmData));
			this.buttonOK = new System.Windows.Forms.Button();
			this.buttonCancel = new System.Windows.Forms.Button();
			this.labelReturnType = new System.Windows.Forms.Label();
			this.comboReturnType = new System.Windows.Forms.ComboBox();
			this.labelAlgorithmName = new System.Windows.Forms.Label();
			this.textAlgorithmName = new System.Windows.Forms.TextBox();
			this.SuspendLayout();
			// 
			// buttonOK
			// 
			this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK;
			this.buttonOK.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.buttonOK.Location = new System.Drawing.Point(192, 80);
			this.buttonOK.Name = "buttonOK";
			this.buttonOK.TabIndex = 4;
			this.buttonOK.Text = "OK";
			this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
			// 
			// buttonCancel
			// 
			this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this.buttonCancel.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.buttonCancel.Location = new System.Drawing.Point(288, 80);
			this.buttonCancel.Name = "buttonCancel";
			this.buttonCancel.TabIndex = 5;
			this.buttonCancel.Text = "Cancel";
			// 
			// labelReturnType
			// 
			this.labelReturnType.Location = new System.Drawing.Point(16, 16);
			this.labelReturnType.Name = "labelReturnType";
			this.labelReturnType.TabIndex = 0;
			this.labelReturnType.Text = "Return Type";
			// 
			// comboReturnType
			// 
			this.comboReturnType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
			this.comboReturnType.Items.AddRange(new object[] {
																 "Boolean",
																 "Byte",
																 "Char",
																 "DateTime",
																 "DBNull",
																 "Decimal",
																 "Double",
																 "Guid",
																 "Int16",
																 "Int32",
																 "Int64",
																 "IntPtr",
																 "Object",
																 "SByte",
																 "Single",
																 "String",
																 "TimeSpan",
																 "UInt16",
																 "UInt32",
																 "UInt64",
																 "UIntPtr",
																 "void"});
			this.comboReturnType.Location = new System.Drawing.Point(16, 40);
			this.comboReturnType.Name = "comboReturnType";
			this.comboReturnType.Size = new System.Drawing.Size(121, 21);
			this.comboReturnType.TabIndex = 1;
			// 
			// labelAlgorithmName
			// 
			this.labelAlgorithmName.Location = new System.Drawing.Point(160, 16);
			this.labelAlgorithmName.Name = "labelAlgorithmName";
			this.labelAlgorithmName.TabIndex = 2;
			this.labelAlgorithmName.Text = "Algorithm Name";
			// 
			// textAlgorithmName
			// 
			this.textAlgorithmName.Location = new System.Drawing.Point(160, 40);
			this.textAlgorithmName.Name = "textAlgorithmName";
			this.textAlgorithmName.Size = new System.Drawing.Size(200, 20);
			this.textAlgorithmName.TabIndex = 3;
			this.textAlgorithmName.Text = "";
			// 
			// CDlgAlgorithmsInsertAlgorithmData
			// 
			this.AcceptButton = this.buttonOK;
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.CancelButton = this.buttonCancel;
			this.ClientSize = new System.Drawing.Size(378, 120);
			this.Controls.Add(this.textAlgorithmName);
			this.Controls.Add(this.labelAlgorithmName);
			this.Controls.Add(this.comboReturnType);
			this.Controls.Add(this.labelReturnType);
			this.Controls.Add(this.buttonCancel);
			this.Controls.Add(this.buttonOK);
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
			this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
			this.MaximizeBox = false;
			this.MinimizeBox = false;
			this.Name = "CDlgAlgorithmsInsertAlgorithmData";
			this.ShowInTaskbar = false;
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
			this.Text = "Insert Data Algorithm";
			this.ResumeLayout(false);

		}
		#endregion

		private void buttonOK_Click(object sender, System.EventArgs e)
		{
			_ReturnType    = comboReturnType.Text;
			_AlgorithmName = textAlgorithmName.Text;
		}
	}
}

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