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

Hello UIPAB

Rate me:
Please Sign up or sign in to vote.
4.76/5 (27 votes)
24 Mar 2005CPOL14 min read 118K   230   84  
A primer to Microsoft's User Interface Process Application Block.
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using Microsoft.ApplicationBlocks.UIProcess;

namespace SimpleWizardUIPAB
{
	/// <summary>
	/// Summary description for View3.
	/// </summary>
	public class View3 : WindowsFormView, IWizardViewTransition
	{
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.ComboBox comboBox1;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public View3()
		{
			//
			// 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.label1 = new System.Windows.Forms.Label();
            this.comboBox1 = new System.Windows.Forms.ComboBox();
            this.SuspendLayout();
            // 
            // label1
            // 
            this.label1.ForeColor = System.Drawing.Color.Maroon;
            this.label1.Location = new System.Drawing.Point(56, 160);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(136, 23);
            this.label1.TabIndex = 1;
            this.label1.Text = "Managed by the UIPAB";
            // 
            // comboBox1
            // 
            this.comboBox1.Items.AddRange(new object[] {
                                                           "one",
                                                           "two",
                                                           "three"});
            this.comboBox1.Location = new System.Drawing.Point(56, 56);
            this.comboBox1.Name = "comboBox1";
            this.comboBox1.Size = new System.Drawing.Size(121, 21);
            this.comboBox1.TabIndex = 2;
            this.comboBox1.Text = "comboBox1";
            // 
            // View3
            // 
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
            this.ClientSize = new System.Drawing.Size(292, 272);
            this.Controls.Add(this.comboBox1);
            this.Controls.Add(this.label1);
            this.Name = "View3";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "UIPAB Wizard: View3";
            this.ResumeLayout(false);

        }
		#endregion
        #region IWizardView Implementation
        public bool DoFinish()
        {
            return true;
        }

        public bool DoCancel()
        {
            return true;
        }

        public bool DoNext()
        {	
            return false;
        }

        public bool SupportsCancel
        {
            get
            {
                return true;
            }
        }

        public bool SupportsFinish
        {
            get
            {
                return true;
            }
        }

        public bool DoBack()
        {
            return true;
        }

        public void WizardActivated()
        {
        }

        #endregion
    }
}

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
Architect
United States United States
Roy is a software developer who digs all aspects of software development, from design and architecture to implementation.

Comments and Discussions