Click here to Skip to main content
15,884,472 members
Articles / Programming Languages / C#

TSWizard - A Wizard Framework for .NET

Rate me:
Please Sign up or sign in to vote.
4.86/5 (55 votes)
26 May 2003BSD17 min read 462.4K   4.6K   209  
Provides a framework for creating wizards for use in your .NET applications
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace TSWizardDemo
{
	/// <summary>
	/// Summary description for Form1.
	/// </summary>
	public class Form1 : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Button runWizard;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

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

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		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()
		{
			this.runWizard = new System.Windows.Forms.Button();
			this.SuspendLayout();
			// 
			// runWizard
			// 
			this.runWizard.Anchor = System.Windows.Forms.AnchorStyles.None;
			this.runWizard.Location = new System.Drawing.Point(79, 26);
			this.runWizard.Name = "runWizard";
			this.runWizard.TabIndex = 0;
			this.runWizard.Text = "Run Wizard";
			this.runWizard.Click += new System.EventHandler(this.runWizard_Click);
			// 
			// Form1
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.ClientSize = new System.Drawing.Size(232, 75);
			this.Controls.AddRange(new System.Windows.Forms.Control[] {
																		  this.runWizard});
			this.Name = "Form1";
			this.Text = "Form1";
			this.ResumeLayout(false);

		}
		#endregion

		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main() 
		{
			Application.Run(new Form1());
		}

		private void runWizard_Click(object sender, System.EventArgs e)
		{
			DemoWizard wizard = new DemoWizard();

			wizard.ShowDialog();
		}
	}
}

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 BSD License


Written By
Software Developer (Senior) InfoPlanIT, LLC
United States United States
James has been programming in C/C++ since 1998, and grew fond of databases in 1999. His latest interest has been in C# and .NET where he has been having fun writing code starting when .NET v1.0 was in its first beta.

He is currently a senior developer and consultant for InfoPlanIT, a small international consulting company that focuses on custom solutions and business intelligence applications.

He was previously employed by ComponentOne where he was a Product Manager for the ActiveReports, Data Dynamics Reports, and ActiveAnalysis products.

Code contained in articles where he is the sole author is licensed via the new BSD license.

Comments and Discussions