public void WizardStepCollection_Add ()
		{
			Wizard w = new Wizard ();
			WizardStep step1 = new WizardStep ();
			try {
				w.WizardSteps.Add (step1);
			}
			catch (Exception e) {
				Assert.Fail (e.Message);
			}
			Assert.AreEqual (1, w.WizardSteps.Count, "Add step fail");
		}
		public void WizardStepCollection_AddAt ()
		{
			Wizard w = new Wizard ();
			WizardStep step1 = new WizardStep ();
			WizardStep step2 = new WizardStep ();

			try {
				w.WizardSteps.Add (step1);
				w.WizardSteps.AddAt (0, step2);
			}
			catch (Exception e) {
				Assert.Fail (e.Message);
			}
			Assert.AreEqual (2, w.WizardSteps.Count, "Step count fail");
			Assert.AreEqual (step2, w.WizardSteps[0], "Step index fail");
		}
            protected override void CreateWizardSteps() {
                // The WizardSteps should be empty when this is called
                Debug.Assert(WizardSteps.Count == 0);

                WizardStep s = new WizardStep();

                _fieldName = new DropDownList();
                _fieldName.ID = fieldNameID;
                if (OldProviderNames != null) {
                    for (int i=0; i < OldProviderNames.Length / 2; i++) {
                        ListItem item = new ListItem(OldProviderNames[2*i], OldProviderNames[2*i + 1]);
                        // Ignore case when setting selected value, since we ignore case when
                        // returing the connection data. (VSWhidbey 434566)
                        if (String.Equals(item.Value, _owner.FieldName, StringComparison.OrdinalIgnoreCase)) {
                            item.Selected = true;
                        }
                        _fieldName.Items.Add(item);
                    }
                }
                else {
                    _fieldName.Items.Add(new ListItem(SR.GetString(SR.RowToFieldTransformer_NoProviderSchema)));
                    _fieldName.Enabled = false;
                }

                Label fieldNameLabel = new Label();
                fieldNameLabel.Text = SR.GetString(SR.RowToFieldTransformer_FieldName);
                fieldNameLabel.AssociatedControlID = _fieldName.ID;

                s.Controls.Add(fieldNameLabel);
                s.Controls.Add(new LiteralControl(" "));
                s.Controls.Add(_fieldName);

                WizardSteps.Add(s);
            }
		public static void _StepTypeRendering (Page p)
		{
			LiteralControl lcb = new LiteralControl (HtmlDiff.BEGIN_TAG);
			LiteralControl lce = new LiteralControl (HtmlDiff.END_TAG);
			PokerWizard w = new PokerWizard ();
			WizardStep ws1 = new WizardStep ();
			WizardStep ws2 = new WizardStep ();
			WizardStep ws3 = new WizardStep ();

			ws1.ID = "step1";
			ws1.StepType = WizardStepType.Start;
			ws1.Controls.Add (new LiteralControl ("Step1"));

			ws2.ID = "step2";
			ws2.StepType = WizardStepType.Step;
			ws2.Controls.Add (new LiteralControl ("Step2"));

			ws3.ID = "step3";
			ws3.StepType = WizardStepType.Finish;
			ws3.Controls.Add (new LiteralControl ("Step3"));

			w.StepNextButtonImageUrl = "http://StepNextButtonImageUrl";
			w.StepNextButtonStyle.BackColor = Color.Red;
			w.StepNextButtonText = "StepNextButtonText";
			w.StepNextButtonType = ButtonType.Image;
			w.StepPreviousButtonImageUrl = "http://StepPreviousButtonImageUrl";
			w.StepPreviousButtonStyle.BackColor = Color.Red;
			w.StepPreviousButtonText = "StepPreviousButtonText";
			w.StepPreviousButtonType = ButtonType.Link;
			w.StepStyle.BackColor = Color.Red;
			
			w.WizardSteps.Add (ws1);
			w.WizardSteps.Add (ws2);
			w.WizardSteps.Add (ws3);
			w.MoveTo (ws2);

			p.Controls.Add (lcb);
			p.Controls.Add (w);
			p.Controls.Add (lce);
		}
		public static void _NavigationRendering (Page p)
		{
			LiteralControl lcb = new LiteralControl (HtmlDiff.BEGIN_TAG);
			LiteralControl lce = new LiteralControl (HtmlDiff.END_TAG);
			PokerWizard w = new PokerWizard ();
			WizardStep ws1 = new WizardStep ();
			WizardStep ws2 = new WizardStep ();
			
			ws1.ID = "step1";
			ws1.StepType = WizardStepType.Start;
			ws1.Controls.Add (new LiteralControl ("Start"));

			ws2.ID = "step2";
			ws2.StepType = WizardStepType.Start;
			ws2.Controls.Add (new LiteralControl ("Finish"));
			
			w.NavigationButtonStyle.BackColor = Color.Red;
			w.NavigationStyle.BackColor = Color.Yellow;
			
			w.WizardSteps.Add (ws1);
			w.WizardSteps.Add (ws2);
			p.Controls.Add (lcb);
			p.Controls.Add (w);
			p.Controls.Add (lce);
		}
		public static void _HeaderRendering (Page p)
		{
			LiteralControl lcb = new LiteralControl (HtmlDiff.BEGIN_TAG);
			LiteralControl lce = new LiteralControl (HtmlDiff.END_TAG);
			PokerWizard w = new PokerWizard ();
			w.HeaderStyle.BackColor = Color.Red;
			w.HeaderTemplate = new CompiledTemplateBuilder (_BuildHeader);
			w.HeaderText = "test";

			WizardStep ws0 = new WizardStep ();
			ws0.ID = "step0";
			ws0.StepType = WizardStepType.Start;
			ws0.Controls.Add (new LiteralControl ("Start"));
			
			WizardStep ws1 = new WizardStep ();
			ws1.ID = "step1";
			ws1.StepType = WizardStepType.Finish;
			ws1.Controls.Add (new LiteralControl ("Finish"));
			
			w.DisplaySideBar = false;
			w.WizardSteps.Add (ws0);
			w.WizardSteps.Add (ws1);
			w.MoveTo (ws1);
			p.Controls.Add (lcb);
			p.Controls.Add (w);
			p.Controls.Add (lce);
		}
		public static void _CancelButtonPropertyRendering (Page p)
		{
			LiteralControl lcb = new LiteralControl (HtmlDiff.BEGIN_TAG);
			LiteralControl lce = new LiteralControl (HtmlDiff.END_TAG);
			PokerWizard w = new PokerWizard ();
			w.CancelButtonStyle.BorderColor = Color.Red;
			w.CancelButtonImageUrl = "CancelButtonImageUrl";
			w.CancelDestinationPageUrl = "CancelDestinationPageUrl";
			w.CancelButtonText = "CancelButtonText";
			w.CancelButtonType = ButtonType.Button;
			w.DisplayCancelButton = true;
			
			WizardStep ws1 = new WizardStep ();
			ws1.ID = "step1";
			ws1.StepType = WizardStepType.Start;
			ws1.Controls.Add (new LiteralControl ("Start"));

			WizardStep ws2 = new WizardStep ();
			ws2.ID = "step2";
			ws2.StepType = WizardStepType.Finish;
			ws2.Controls.Add (new LiteralControl ("Finish"));

			w.DisplaySideBar = false;
			w.WizardSteps.Add (ws1);
			w.WizardSteps.Add (ws2);
			p.Controls.Add(lcb);
			p.Controls.Add (w);
			p.Controls.Add (lce);
		}
		public static void _postbackEvents (Page p)
		{
			p.EnableEventValidation = false;
			Wizard w = new Wizard ();
			w.DisplayCancelButton = true;
			w.DisplaySideBar = true;
			
			w.CancelButtonClick += new EventHandler (w_CancelButtonClick);
			w.FinishButtonClick += new WizardNavigationEventHandler (w_FinishButtonClick);
			w.NextButtonClick += new WizardNavigationEventHandler (w_NextButtonClick);
			w.PreviousButtonClick += new WizardNavigationEventHandler (w_PreviousButtonClick);
			w.SideBarButtonClick += new WizardNavigationEventHandler (w_SideBarButtonClick);
			w.ID = "Wizard1";

			WizardStep ws = new WizardStep ();
			ws.ID = "step";
			ws.StepType = WizardStepType.Start;
			ws.Controls.Add (new LiteralControl ("StartType"));

			WizardStep ws2 = new WizardStep ();
			ws2.ID = "step2";
			ws2.StepType = WizardStepType.Finish;
			ws2.Controls.Add (new LiteralControl ("FinishType"));

			WizardStep ws3 = new WizardStep ();
			ws3.ID = "step3";
			ws3.StepType = WizardStepType.Complete;
			ws3.Controls.Add (new LiteralControl ("CompleteType"));

			w.DisplaySideBar = true;
			w.WizardSteps.Add (ws);
			w.WizardSteps.Add (ws2);
			w.WizardSteps.Add (ws3);
			p.Controls.Add (w);
		}
		static void AddWizardStep (Wizard w, string stepText, string stepID, WizardStepType type = WizardStepType.Step)
		{
			var ws = new WizardStep ();
			ws.ID = stepID;
			ws.StepType = type;
			ws.Controls.Add (new LiteralControl (stepText));

			w.WizardSteps.Add (ws);
		}
		public void WizardStepCollection_Remove ()
		{
			Wizard w = new Wizard ();
			WizardStep step1 = new WizardStep ();
			WizardStep step2 = new WizardStep ();

			try {
				w.WizardSteps.Add (step1);
				w.WizardSteps.Add (step2);
			}
			catch (Exception e) {
				Assert.Fail (e.Message);
			}
			Assert.AreEqual (2, w.WizardSteps.Count, "Step count before remove fail");
			try {
				w.WizardSteps.Remove (step1);
				w.WizardSteps.Remove (step2);
			}
			catch (Exception e) {
				Assert.Fail (e.Message);
			}
			Assert.AreEqual (0, w.WizardSteps.Count, "Step count after remove fail");
		}
		public void WizardStepCollection_RemoveAt ()
		{
			Wizard w = new Wizard ();
			WizardStep step1 = new WizardStep ();
			WizardStep step2 = new WizardStep ();

			try {
				w.WizardSteps.Add (step1);
				w.WizardSteps.Add (step2);
			}
			catch (Exception e) {
				Assert.Fail (e.Message);
			}
			Assert.AreEqual (2, w.WizardSteps.Count, "Step count before removeat fail");
			try {
				w.WizardSteps.RemoveAt (0);
				
			}
			catch (Exception e) {
				Assert.Fail (e.Message);
			}
			Assert.AreEqual (1, w.WizardSteps.Count, "Step count after removeat fail");
			Assert.AreEqual (step2, w.WizardSteps[0], "Item value after remove");
		}
		public void WizardStepCollection_GetEnumerator ()
		{
			Wizard w = new Wizard ();
			WizardStep step1 = new WizardStep ();
			WizardStep step2 = new WizardStep ();


			try {
				w.WizardSteps.Add (step1);
				w.WizardSteps.Add (step2);
			}
			catch (Exception e) {
				Assert.Fail (e.Message);
			}
			Assert.AreEqual (2, w.WizardSteps.Count, "Step count fail");
			IEnumerator numerator = w.WizardSteps.GetEnumerator ();
			numerator.Reset();
			numerator.MoveNext ();
			Assert.AreEqual (step1, numerator.Current, "Enumerator item value#1");
			numerator.MoveNext ();
			Assert.AreEqual (step2, numerator.Current, "Enumerator item value#2");
		}
		public void WizardStepCollection_CopyTo ()
		{
			Wizard w = new Wizard ();
			WizardStep step1 = new WizardStep ();
			WizardStep step2 = new WizardStep ();
			

			try {
				w.WizardSteps.Add (step1);
				w.WizardSteps.Add (step2);
			}
			catch (Exception e) {
				Assert.Fail (e.Message);
			}
			Assert.AreEqual (2, w.WizardSteps.Count, "Step count fail");
			WizardStep[] steps = new WizardStep [w.WizardSteps.Count] ;
			w.WizardSteps.CopyTo (steps, 0);
			Assert.AreEqual (2, steps.GetLength (0), "Copyto elements count");
			Assert.AreEqual (step1, steps[0], "Copyto elements equal#1");
			Assert.AreEqual (step2, steps[1], "Copyto elements equal#2");
		}
		public void WizardStepCollection_Contains ()
		{
			Wizard w = new Wizard ();
			WizardStep step1 = new WizardStep ();
			WizardStep step2 = new WizardStep ();

			try {
				w.WizardSteps.Add (step1);
			}
			catch (Exception e) {
				Assert.Fail (e.Message);
			}
			Assert.AreEqual (1, w.WizardSteps.Count, "Step count fail");
			Assert.AreEqual (true, w.WizardSteps.Contains (step1), "Step contains fail#1");
			Assert.AreEqual (false, w.WizardSteps.Contains (step2), "Step contains fail#2");
		}
		public void Wizard_BubbleEvent_MoveTo ()
		{
			PokerWizard wizard = new PokerWizard ();
			WizardStep step1 = new WizardStep ();
			step1.ID = "step1";
			step1.StepType = WizardStepType.Start;
			WizardStep step2 = new WizardStep ();
			step2.ID = "step2";
			step2.StepType = WizardStepType.Finish;
			wizard.WizardSteps.Add (step1);
			wizard.WizardSteps.Add (step2);
			wizard.ActiveStepIndex = 0;
			CommandEventArgs e = new CommandEventArgs (Wizard.MoveToCommandName, "1");
			bool result = wizard.DoBubbleEvent (null, e);
			Assert.AreEqual (true, result, "MoveToEventCommand");
			Assert.AreEqual (1, wizard.ActiveStepIndex, "ActiveStepIndexAfterMoveToBubble");
		}
		public void Wizard_GetHistory ()
		{
			PokerWizard wizard = new PokerWizard ();
			WizardStep step1 = new WizardStep ();
			step1.ID = "step1";
			step1.StepType = WizardStepType.Start;
			WizardStep step2 = new WizardStep ();
			step2.ID = "step2";
			step2.StepType = WizardStepType.Step;
			WizardStep step3 = new WizardStep ();
			step3.ID = "step3";
			step3.StepType = WizardStepType.Finish;
			wizard.WizardSteps.Add (step1);
			wizard.WizardSteps.Add (step2);
			wizard.WizardSteps.Add (step3);
			wizard.ActiveStepIndex = 0;
			wizard.MoveTo (step3);
			object o = wizard.PokerSaveControlState ();
			wizard.PokerLoadControlState (o);
			wizard.MoveTo (step2);
			o = wizard.PokerSaveControlState ();
			wizard.PokerLoadControlState (o);
			wizard.MoveTo (step3);
			o = wizard.PokerSaveControlState ();
			wizard.PokerLoadControlState (o);
			ArrayList collection = (ArrayList) wizard.GetHistory ();
			Assert.AreEqual (3, collection.Count, "GetHistoryCount");
		}
		public static void WizardPreInit (Page p)
		{
			LiteralControl lcb = new LiteralControl (HtmlDiff.BEGIN_TAG);
			LiteralControl lce = new LiteralControl (HtmlDiff.END_TAG);

			Wizard w = new Wizard ();
			WizardStep ws = new WizardStep ();
			ws.Controls.Add (new LiteralControl ("123"));
			try {
				w.SkipLinkText = "";
			}
			catch (Exception) { }
			w.DisplaySideBar = false;
			w.WizardSteps.Add (ws);
			p.Controls.Add (lcb);
			p.Controls.Add (w);
			p.Controls.Add (lce);
		}
		public void Wizard_GetStepType ()
		{
			PokerWizard wizard = new PokerWizard ();
			WizardStep step1 = new WizardStep ();
			step1.ID = "step1";
			step1.StepType = WizardStepType.Start;
			wizard.WizardSteps.Add (step1);
			wizard.ActiveStepIndex = 0;
			WizardStepType result = wizard.GetStepType (wizard.ActiveStep, wizard.ActiveStepIndex);
			Assert.AreEqual (WizardStepType.Start, result, "GetStepType");
		}
		public static void _renderingWizard (Page p)
		{
			Wizard w = new Wizard ();
			w.ID = "Wizard";

			WizardStep ws = new WizardStep ();
			ws.ID = "step";
			ws.StepType = WizardStepType.Start;
			ws.Controls.Add (new LiteralControl ("Start"));

			WizardStep ws1 = new WizardStep ();
			ws1.ID = "step1";
			ws1.StepType = WizardStepType.Step;
			ws1.Controls.Add (new LiteralControl ("Step"));

			WizardStep ws2 = new WizardStep ();
			ws2.ID = "step2";
			ws2.StepType = WizardStepType.Auto;
			ws2.Controls.Add (new LiteralControl ("Auto"));

			WizardStep ws3 = new WizardStep ();
			ws3.ID = "step3";
			ws3.StepType = WizardStepType.Finish;
			ws3.Controls.Add (new LiteralControl ("FinishText"));

			WizardStep ws4 = new WizardStep ();
			ws4.ID = "step4";
			ws4.StepType = WizardStepType.Complete;
			ws4.Controls.Add (new LiteralControl ("Complete"));

			w.DisplaySideBar = false;
			w.WizardSteps.Add (ws);
			w.WizardSteps.Add (ws1);
			w.WizardSteps.Add (ws2);
			w.WizardSteps.Add (ws3);
			w.WizardSteps.Add (ws4);
			w.ActiveStepIndex = (int) WebTest.CurrentTest.UserData;

			p.Controls.Add (w);
		}
		public void Wizard_MoveTo ()
		{
			PokerWizard wizard = new PokerWizard ();
			WizardStep step1 = new WizardStep ();
			step1.ID = "step1";
			step1.StepType = WizardStepType.Start;
			WizardStep step2 = new WizardStep ();
			step2.ID = "step2";
			step2.StepType = WizardStepType.Step;
			WizardStep step3 = new WizardStep ();
			step3.ID = "step3";
			step3.StepType = WizardStepType.Finish;
			wizard.WizardSteps.Add (step1);
			wizard.WizardSteps.Add (step2);
			wizard.WizardSteps.Add (step3);
			wizard.ActiveStepIndex = 0;
			wizard.MoveTo (step3);
			Assert.AreEqual (2, wizard.ActiveStepIndex, "MoveToStep3");
			wizard.MoveTo (step2);
			Assert.AreEqual (1, wizard.ActiveStepIndex, "MoveToStep2");
			wizard.MoveTo (step1);
			Assert.AreEqual (0, wizard.ActiveStepIndex, "MoveToStep1");
		}
		public static void _postback (Page p)
		{
			p.EnableEventValidation = false;
			Wizard w = new Wizard ();
			w.ID = "Wizard";
			
			WizardStep ws = new WizardStep ();
			ws.ID = "step";
			ws.StepType = WizardStepType.Start;
			ws.Controls.Add (new LiteralControl ("StartType"));

			WizardStep ws1 = new WizardStep ();
			ws1.ID = "step1";
			ws1.StepType = WizardStepType.Step;
			ws1.Controls.Add (new LiteralControl ("StepType"));

			WizardStep ws2 = new WizardStep ();
			ws2.ID = "step2";
			ws2.StepType = WizardStepType.Auto;
			ws2.Controls.Add (new LiteralControl ("AutoType"));

			WizardStep ws3 = new WizardStep ();
			ws3.ID = "step3";
			ws3.StepType = WizardStepType.Finish;
			ws3.Controls.Add (new LiteralControl ("FinishType"));

			WizardStep ws4 = new WizardStep ();
			ws4.ID = "step4";
			ws4.StepType = WizardStepType.Complete;
			ws4.Controls.Add (new LiteralControl ("CompleteType"));

			w.DisplaySideBar = true;
			w.WizardSteps.Add (ws);
			w.WizardSteps.Add (ws1);
			w.WizardSteps.Add (ws2);
			w.WizardSteps.Add (ws3);
			w.WizardSteps.Add (ws4);

			p.Controls.Add (w);
		}
		public void Wizard_AllowNavigationToStep ()
		{
			PokerWizard wizard = new PokerWizard ();
			WizardStep step1 = new WizardStep ();
			step1.ID = "step1";
			step1.StepType = WizardStepType.Start;
			WizardStep step2 = new WizardStep ();
			step2.ID = "step2";
			step2.StepType = WizardStepType.Step;
			WizardStep step3 = new WizardStep ();
			step3.ID = "step3";
			step3.StepType = WizardStepType.Finish;
			wizard.WizardSteps.Add (step1);
			wizard.WizardSteps.Add (step2);
			wizard.WizardSteps.Add (step3);
			wizard.ActiveStepIndex = 0;
			wizard.MoveTo (step3);
			object o = wizard.PokerSaveControlState ();
			wizard.PokerLoadControlState (o);
			bool result = wizard.PokerAllowNavigationToStep (2);
			Assert.AreEqual (true, result, "AllowNavigationToStep#1");
			step3.AllowReturn = false;
			result = wizard.PokerAllowNavigationToStep (2);
			Assert.AreEqual (false, result, "AllowNavigationToStep#2");
		}
		public static void _FinishButtonPropertyRendering (Page p)
		{
			LiteralControl lcb = new LiteralControl (HtmlDiff.BEGIN_TAG);
			LiteralControl lce = new LiteralControl (HtmlDiff.END_TAG);
			PokerWizard w = new PokerWizard ();
			w.FinishCompleteButtonStyle.BorderColor = Color.Red;
			w.FinishCompleteButtonImageUrl = "http://FinishCompleteButtonImageUrl";
			w.FinishDestinationPageUrl = "FinishDestinationPageUrl";
			w.FinishCompleteButtonText = "FinishCompleteButtonText";
			w.FinishCompleteButtonType = ButtonType.Link;
			w.FinishPreviousButtonImageUrl = "http://FinishPreviousButtonImageUrl";
			w.FinishPreviousButtonStyle.BackColor = Color.Red;
			w.FinishPreviousButtonText = "FinishPreviousButtonText";
			w.FinishPreviousButtonType = ButtonType.Image;

			WizardStep ws0 = new WizardStep ();
			ws0.ID = "step0";
			ws0.StepType = WizardStepType.Start;
			ws0.Controls.Add (new LiteralControl ("Finish"));
			
			WizardStep ws1 = new WizardStep ();
			ws1.ID = "step1";
			ws1.StepType = WizardStepType.Finish;
			ws1.Controls.Add (new LiteralControl ("Finish"));
			
			w.DisplaySideBar = false;
			w.WizardSteps.Add (ws0);
			w.WizardSteps.Add (ws1);
			w.MoveTo (ws1);
			p.Controls.Add (lcb);
			p.Controls.Add (w);
			p.Controls.Add (lce);
		}
		public void Wizard_ControlState ()
		{
			PokerWizard wizard = new PokerWizard ();
			WizardStep step1 = new WizardStep ();
			step1.ID = "step1";
			step1.StepType = WizardStepType.Start;
			WizardStep step3 = new WizardStep ();
			step3.ID = "step3";
			step3.StepType = WizardStepType.Finish;
			wizard.WizardSteps.Add (step1);
			wizard.WizardSteps.Add (step3);
			wizard.ActiveStepIndex = 0;
			wizard.MoveTo (step3);
			// LAMESPEC: history updated when SaveControlState occured
			Assert.AreEqual (0, ((ArrayList) wizard.GetHistory ()).Count, "ControlState#1");
			object o = wizard.PokerSaveControlState ();
			wizard.PokerLoadControlState (o);
			wizard.MoveTo (step1);
			Assert.AreEqual (0, wizard.ActiveStepIndex, "ControlState#2");
			wizard.PokerLoadControlState (o);
			Assert.AreEqual (1, wizard.ActiveStepIndex, "ControlState#3");
			Assert.AreEqual (1, ((ArrayList) wizard.GetHistory ()).Count, "ControlState#4");
		}
		public static void _SideBarRendering (Page p)
		{
			LiteralControl lcb = new LiteralControl (HtmlDiff.BEGIN_TAG);
			LiteralControl lce = new LiteralControl (HtmlDiff.END_TAG);
			PokerWizard w = new PokerWizard ();
			
			w.SideBarButtonStyle.BackColor = Color.Red;
			w.SideBarStyle.BackColor = Color.Red;
			w.SideBarTemplate = new CompiledTemplateBuilder (_SideBarTemplate);

			WizardStep ws1 = new WizardStep ();
			ws1.ID = "step1";
			ws1.StepType = WizardStepType.Auto;
			ws1.Controls.Add (new LiteralControl ("Step 1"));

			WizardStep ws2 = new WizardStep ();
			ws2.ID = "step2";
			ws2.StepType = WizardStepType.Auto;
			ws2.Controls.Add (new LiteralControl ("Step 2"));

			w.WizardSteps.Add (ws1);
			w.WizardSteps.Add (ws2);
			p.Controls.Add (lcb);
			p.Controls.Add (w);
			p.Controls.Add (lce);
		}
		public void Wizard_BubbleEvent_CancelEvent ()
		{
			PokerWizard wizard = new PokerWizard ();
			wizard.CancelButtonClick += new EventHandler (wizard_handler);
			WizardStep step1 = new WizardStep ();
			step1.ID = "step1";
			step1.StepType = WizardStepType.Start;
			WizardStep step3 = new WizardStep ();
			step3.ID = "step3";
			step3.StepType = WizardStepType.Finish;
			wizard.WizardSteps.Add (step1);
			wizard.WizardSteps.Add (step3);
			wizard.ActiveStepIndex = 0;
			CommandEventArgs e = new CommandEventArgs (Wizard.CancelCommandName, null);
			bool result = wizard.DoBubbleEvent (null, e);
			Assert.AreEqual (true, result, "CancelButtonBubbleEventCommand");
			eventassert ("OnCancelButtonClick");
		}
		public static void _StartTypeRendering (Page p)
		{
			LiteralControl lcb = new LiteralControl (HtmlDiff.BEGIN_TAG);
			LiteralControl lce = new LiteralControl (HtmlDiff.END_TAG);
			PokerWizard w = new PokerWizard ();
			WizardStep ws1 = new WizardStep ();
			WizardStep ws2 = new WizardStep ();

			ws1.ID = "step1";
			ws1.StepType = WizardStepType.Start;
			ws1.Controls.Add (new LiteralControl ("Start"));

			ws2.ID = "step2";
			ws2.StepType = WizardStepType.Finish;
			ws2.Controls.Add (new LiteralControl ("Finish"));
			
			w.StartNextButtonImageUrl = "StartNextButtonImageUrl";
			w.StartNextButtonStyle.BackColor = Color.Red;
			w.StartNextButtonText = "StartNextButtonText";
			w.StartNextButtonType = ButtonType.Button;

			w.WizardSteps.Add (ws1);
			w.WizardSteps.Add (ws2);
			p.Controls.Add (lcb);
			p.Controls.Add (w);
			p.Controls.Add (lce);
		}
		public void Wizard_BubbleEvent_MoveComplete ()
		{
			PokerWizard wizard = new PokerWizard ();
			wizard.FinishButtonClick += new WizardNavigationEventHandler (wizard_handler);
			WizardStep step1 = new WizardStep ();
			step1.ID = "step1";
			step1.StepType = WizardStepType.Start;
			WizardStep step2 = new WizardStep ();
			step2.ID = "step2";
			step2.StepType = WizardStepType.Finish;
			WizardStep step3 = new WizardStep ();
			step3.ID = "step2";
			step3.StepType = WizardStepType.Complete;
			wizard.WizardSteps.Add (step1);
			wizard.WizardSteps.Add (step2);
			wizard.WizardSteps.Add (step3);
			wizard.ActiveStepIndex = 1;
			CommandEventArgs e = new CommandEventArgs (Wizard.MoveCompleteCommandName, null);
			bool result = wizard.DoBubbleEvent (null, e);
			Assert.AreEqual (true, result, "MoveCompleteEventCommand");
			eventassert ("MoveCompleteBubbleEvent");
		}
		public static void _StepNavigationTemplate (Page p)
		{
			LiteralControl lcb = new LiteralControl (HtmlDiff.BEGIN_TAG);
			LiteralControl lce = new LiteralControl (HtmlDiff.END_TAG);
			PokerWizard w = new PokerWizard ();
			WizardStep ws1 = new WizardStep ();
			WizardStep ws2 = new WizardStep ();

			ws1.ID = "step1";
			ws1.StepType = WizardStepType.Step;
			ws1.Controls.Add (new LiteralControl ("Step1"));

			ws2.ID = "step2";
			ws2.StepType = WizardStepType.Step;
			ws2.Controls.Add (new LiteralControl ("Step2"));

			w.StepNavigationTemplate = new CompiledTemplateBuilder (_StepNavigationTemplateCreator);

			w.WizardSteps.Add (ws1);
			w.WizardSteps.Add (ws2);
			p.Controls.Add (lcb);
			p.Controls.Add (w);
			p.Controls.Add (lce);
		}
 protected override void CreateWizardSteps()
 {
     int num = (base.OldProviderNames != null) ? base.OldProviderNames.Length : 0;
     if (num > 0)
     {
         this._consumerFieldNames = new DropDownList[num / 2];
         ListItem[] itemArray = null;
         int num2 = (base.OldConsumerNames != null) ? base.OldConsumerNames.Length : 0;
         if (num2 > 0)
         {
             itemArray = new ListItem[num2 / 2];
             for (int j = 0; j < (num2 / 2); j++)
             {
                 itemArray[j] = new ListItem(base.OldConsumerNames[2 * j], base.OldConsumerNames[(2 * j) + 1]);
             }
         }
         for (int i = 0; i < (num / 2); i++)
         {
             WizardStep wizardStep = new WizardStep();
             wizardStep.Controls.Add(new LiteralControl(System.Web.SR.GetString("RowToParametersTransformer_ProviderFieldName") + " "));
             Label child = new Label {
                 Text = HttpUtility.HtmlEncode(base.OldProviderNames[2 * i])
             };
             child.Font.Bold = true;
             wizardStep.Controls.Add(child);
             wizardStep.Controls.Add(new LiteralControl("<br />"));
             DropDownList list = new DropDownList {
                 ID = "ConsumerFieldName" + i
             };
             if (itemArray != null)
             {
                 list.Items.Add(new ListItem());
                 string[] strArray = this._owner._providerFieldNames;
                 string[] strArray2 = this._owner._consumerFieldNames;
                 string b = base.OldProviderNames[(2 * i) + 1];
                 string str2 = null;
                 if (strArray != null)
                 {
                     for (int k = 0; k < strArray.Length; k++)
                     {
                         if ((string.Equals(strArray[k], b, StringComparison.OrdinalIgnoreCase) && (strArray2 != null)) && (strArray2.Length > k))
                         {
                             str2 = strArray2[k];
                             break;
                         }
                     }
                 }
                 foreach (ListItem item in itemArray)
                 {
                     ListItem item2 = new ListItem(item.Text, item.Value);
                     if (string.Equals(item2.Value, str2, StringComparison.OrdinalIgnoreCase))
                     {
                         item2.Selected = true;
                     }
                     list.Items.Add(item2);
                 }
             }
             else
             {
                 list.Items.Add(new ListItem(System.Web.SR.GetString("RowToParametersTransformer_NoConsumerSchema")));
                 list.Enabled = false;
             }
             this._consumerFieldNames[i] = list;
             Label label2 = new Label {
                 Text = System.Web.SR.GetString("RowToParametersTransformer_ConsumerFieldName"),
                 AssociatedControlID = list.ID
             };
             wizardStep.Controls.Add(label2);
             wizardStep.Controls.Add(new LiteralControl(" "));
             wizardStep.Controls.Add(list);
             this.WizardSteps.Add(wizardStep);
         }
     }
     else
     {
         WizardStep step2 = new WizardStep();
         step2.Controls.Add(new LiteralControl(System.Web.SR.GetString("RowToParametersTransformer_NoProviderSchema")));
         this.WizardSteps.Add(step2);
     }
 }