コード例 #1
0
		public void WizardStepCollection_DefaultProperty ()
		{
			Wizard w = new Wizard();
			Assert.AreEqual (typeof (WizardStepCollection), w.WizardSteps.GetType (), "WizardStepCollection");
			Assert.AreEqual (0,w.WizardSteps.Count, "Count");
			Assert.AreEqual (false, w.WizardSteps.IsReadOnly, "IsReadOnly");
			Assert.AreEqual (false, w.WizardSteps.IsSynchronized, "IsSynchronized");
			Assert.AreEqual (w.WizardSteps, w.WizardSteps.SyncRoot, "SyncRoot");
		}
コード例 #2
0
		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");
		}
コード例 #3
0
		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");
		}
コード例 #4
0
		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");
		}
コード例 #5
0
 internal WizardStepCollection(Wizard wizard)
 {
     this.wizard = wizard;
 }
コード例 #6
0
		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");
		}
コード例 #7
0
		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);
		}
コード例 #8
0
		internal WizardStepCollection (Wizard wizard)
		{
			this.wizard = wizard;
		}
コード例 #9
0
ファイル: Wizard.cs プロジェクト: uQr/referencesource
            private NavigationTemplate(Wizard wizard, WizardTemplateType templateType, bool button1CausesValidation,
                String label1ID, String label2ID, String label3ID) {

                _wizard = wizard;
                _button1ID = label1ID;
                _button2ID = label2ID;
                _button3ID = label3ID;

                _templateType = templateType;

                _buttons = new IButtonControl[3][];
                _buttons[0] = new IButtonControl[3];
                _buttons[1] = new IButtonControl[3];
                _buttons[2] = new IButtonControl[3];

                _button1CausesValidation = button1CausesValidation;
            }
コード例 #10
0
		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);
		}
コード例 #11
0
 internal void SetWizard(Wizard w)
 {
     wizard = w;
 }
コード例 #12
0
		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);
		}
コード例 #13
0
ファイル: Wizard.cs プロジェクト: uQr/referencesource
 internal InternalTableCell(Wizard owner) {
     _owner = owner;
 }
コード例 #14
0
ファイル: Wizard.cs プロジェクト: uQr/referencesource
 internal AccessibleTableCell(Wizard owner)
     : base(owner) {
 }
コード例 #15
0
ファイル: Wizard.cs プロジェクト: uQr/referencesource
            internal BlockControl(Wizard owner) {
                Debug.Assert(owner != null);
                _owner = owner;

                _table = new WizardDefaultInnerTable();
                _table.EnableTheming = false;

                Controls.Add(_table);

                TableRow row = new TableRow();
                _table.Controls.Add(row);

                _cell = new TableCell();
                _cell.Height = Unit.Percentage(100);
                _cell.Width = Unit.Percentage(100);
                row.Controls.Add(_cell);

                HandleMacIECellHeight();
                PreventAutoID();
            }
コード例 #16
0
ファイル: Wizard.cs プロジェクト: uQr/referencesource
 internal DefaultSideBarTemplate(Wizard owner) {
     _owner = owner;
 }
コード例 #17
0
ファイル: Wizard.cs プロジェクト: uQr/referencesource
 internal DataListItemTemplate(Wizard owner) {
     _owner = owner;
 }
コード例 #18
0
		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");
		}
コード例 #19
0
		public static void LayoutTemplateRender (Page p)
		{
			var w = new Wizard ();
			w.ID = "MyWizard";
			WebTest curTest = WebTest.CurrentTest;
			string id = (string)curTest.UserData;

			switch (id) {
				case "Empty":
					w.LayoutTemplate = new TestLayoutTemplate ();
					break;

				case "OptionalSideBar_NoSideBar":
					w.LayoutTemplate = new TestLayoutTemplate {
						HasHeaderPlaceHolder = true,
						HasNavigationPlaceHolder = true,
						HasWizardStepPlaceHolder = true
					};
					w.DisplaySideBar = false;
					break;

				case "OptionalSideBar_WithSideBar":
					w.LayoutTemplate = new TestLayoutTemplate {
						HasHeaderPlaceHolder = true,
						HasNavigationPlaceHolder = true,
						HasWizardStepPlaceHolder = true
					};
					w.DisplaySideBar = true;
					break;

				case "RenderSideBar":
					w.LayoutTemplate = new TestLayoutTemplate {
						HasHeaderPlaceHolder = true,
						HasNavigationPlaceHolder = true,
						HasWizardStepPlaceHolder = true,
						HasSideBarPlaceHolder = true
					};
					AddWizardStep (w, "Step", "step1");
					break;

				case "OptionalHeader_NoHeaderTemplate":
					w.LayoutTemplate = new TestLayoutTemplate {
						HasNavigationPlaceHolder = true,
						HasWizardStepPlaceHolder = true
					};
					w.DisplaySideBar = false;
					break;

				case "OptionalHeader_WithHeaderTemplate":
					w.LayoutTemplate = new TestLayoutTemplate {
						HasNavigationPlaceHolder = true,
						HasWizardStepPlaceHolder = true
					};
					w.HeaderTemplate = new TestHeaderTemplate ();
					w.DisplaySideBar = false;
					break;

				case "RenderHeader":
					w.LayoutTemplate = new TestLayoutTemplate {
						HasNavigationPlaceHolder = true,
						HasWizardStepPlaceHolder = true,
						HasHeaderPlaceHolder = true
					};
					w.HeaderTemplate = new TestHeaderTemplate ();
					w.DisplaySideBar = false;
					AddWizardStep (w, "Step", "step1");
					break;

				case "RenderHeader_InSpan":
					w.LayoutTemplate = new TestLayoutTemplate {
						HasNavigationPlaceHolder = true,
						HasWizardStepPlaceHolder = true,
						HasHeaderPlaceHolder = true,
						HeaderPlaceHolderType = typeof (TestHeaderSpan)
					};
					w.HeaderTemplate = new TestHeaderTemplate ();
					w.DisplaySideBar = false;
					AddWizardStep (w, "Step", "step1");
					break;

				case "StepPlaceHolder":
					w.LayoutTemplate = new TestLayoutTemplate {
						HasNavigationPlaceHolder = true,
					};
					w.DisplaySideBar = false;
					break;

				case "NavigationPlaceHolder":
					w.LayoutTemplate = new TestLayoutTemplate {
						HasWizardStepPlaceHolder = true,
					};
					w.DisplaySideBar = false;
					break;

				default:
					throw new InvalidOperationException ("Unknown id '" + id + "'");
			}

			p.Form.Controls.Add (new LiteralControl (HtmlDiff.BEGIN_TAG));
			p.Form.Controls.Add (w);
			p.Form.Controls.Add (new LiteralControl (HtmlDiff.END_TAG));
		}
コード例 #20
0
ファイル: Wizard.cs プロジェクト: uQr/referencesource
 internal BaseContentTemplateContainer(Wizard owner,  bool useInnerTable)
     : base(owner) {
     _useInnerTable = useInnerTable;
     if (useInnerTable) {
         // Set the table width to 100% so the table within each
         // row will have the same width. VSWhidbey 377182
         Table.Width = Unit.Percentage(100);
         Table.Height = Unit.Percentage(100);
     }
     else {
         // remove nested table from Control tree
         Controls.Clear();
     }
 }
コード例 #21
0
ファイル: Wizard.cs プロジェクト: uQr/referencesource
 internal static NavigationTemplate GetDefaultFinishNavigationTemplate(Wizard wizard) {
     return new NavigationTemplate(wizard, WizardTemplateType.FinishNavigationTemplate,
         false, _finishPreviousButtonID, _finishButtonID, _cancelButtonID);
 }
コード例 #22
0
ファイル: Wizard.cs プロジェクト: uQr/referencesource
 internal BaseNavigationTemplateContainer(Wizard owner) {
     _owner = owner;
 }
コード例 #23
0
ファイル: Wizard.cs プロジェクト: uQr/referencesource
 internal FinishNavigationTemplateContainer(Wizard owner)
     : base(owner) {
 }
コード例 #24
0
		public void Wizard_LayoutTemplate ()
		{
			var w = new Wizard ();

			Assert.IsNull (w.LayoutTemplate, "#A1");
		}
コード例 #25
0
ファイル: Wizard.cs プロジェクト: uQr/referencesource
 internal StepNavigationTemplateContainer(Wizard owner)
     : base(owner) {
 }
コード例 #26
0
		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);
		}
コード例 #27
0
ファイル: Wizard.cs プロジェクト: uQr/referencesource
 internal WizardStepCollection(Wizard wizard) {
     this._wizard = wizard;
     wizard.TemplatedSteps.Clear();
 }
コード例 #28
0
		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);
		}
コード例 #29
0
		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");
		}
コード例 #30
0
		public void Wizard_ActiveStepException2 ()
		{
			Wizard wizard = new Wizard ();
			wizard.ActiveStepIndex = -2;
			WizardStepBase step = wizard.ActiveStep;
		}
コード例 #31
0
		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");
		}
コード例 #32
0
			public SideBarLabelTemplate (Wizard wizard)
			{
				this.wizard = wizard;
			}
コード例 #33
0
 internal WizardStepCollection(Wizard wizard)
 {
     this._wizard = wizard;
     wizard.TemplatedSteps.Clear();
 }