Inheritance: System.Windows.Forms.Panel
Ejemplo n.º 1
0
		/// <summary>
		/// Adds the elements of an array of WizardPage objects to the end of the WizardPagesCollection.  
		/// </summary>
		/// <param name="pages">An array on WizardPage objects to be added.
		/// The array itself cannot be null, but it can contain elements that are null.</param>
		public void AddRange(WizardPage[] pages)
		{
			// Use external to validate and add each entry
			foreach (var page in pages)
			{
				this.Add(page);
			}
		}
Ejemplo n.º 2
0
		/// <summary>
		/// Activates the specified wizard bage.
		/// </summary>
		/// <param name="page">A WizardPage object representing the page to be activated.</param>
		private void ActivatePage(WizardPage page)
		{
			// validate given page
			if (this.pages.Contains(page) == false)
			{
				// filter out
				return;
			}

			// deactivate current page
			if (this._selectedPage != null)
			{
				this._selectedPage.Visible = false;
			}

			// activate new page
			this._selectedPage = page;

			if (this._selectedPage != null)
			{
				//Ensure that this panel displays inside the wizard
				this._selectedPage.Parent = this;
				if (this.Contains(this._selectedPage) == false)
				{
					this.Container.Add(this._selectedPage);
				}

				//Make it fill the space
				this._selectedPage.SetBounds(0, 0, this.Width, this.Height - FOOTER_AREA_HEIGHT);
				this._selectedPage.Visible = true;
				this._selectedPage.BringToFront();
				this.FocusFirstTabIndex(this._selectedPage);
			}

			//Enable navigation buttons
			cmdBack.Enabled = (this.SelectedIndex > 0);
			this.cmdNext.Enabled = (this.SelectedIndex < this.pages.Count - 1);

			// refresh
			if (this._selectedPage != null)
			{
				this._selectedPage.Invalidate();
			}
			else
			{
				this.Invalidate();
			}
		}
Ejemplo n.º 3
0
 /// <summary>
 /// Searches for the specified WizardPage and returns the zero-based index
 /// of the first occurrence in the entire WizardPagesCollection.
 /// </summary>
 /// <param name="value">A WizardPage object to locate in the WizardPagesCollection.
 /// The value can be null.</param>
 /// <returns></returns>
 public int IndexOf(WizardPage value)
 {
     return(List.IndexOf(value));
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Adds an object to the end of the WizardPagesCollection.
        /// </summary>
        /// <param name="value">The WizardPage to be added.
        /// The value can be null.</param>
        /// <returns>An Integer value representing the index at which the value has been added.</returns>
        public int Add(WizardPage value)
        {
            var result = List.Add(value);

            return(result);
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Determines whether an element is in the WizardPagesCollection.
 /// </summary>
 /// <param name="value">The WizardPage object to locate. The value can be null.</param>
 /// <returns>true if item is found in the WizardPagesCollection; otherwise, false.</returns>
 public bool Contains(WizardPage value)
 {
     return(List.Contains(value));
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Removes the first occurrence of a specific object from the WizardPagesCollection.
 /// </summary>
 /// <param name="value">A WizardPage object to remove. The value can be null.</param>
 public void Remove(WizardPage value)
 {
     // remove the item
     List.Remove(value);
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Inserts an element into the WizardPagesCollection at the specified index.
 /// </summary>
 /// <param name="index">An Integer value representing the zero-based index at which value should be inserted.</param>
 /// <param name="value">A WizardPage object to insert. The value can be null.</param>
 public void Insert(int index, WizardPage value)
 {
     // insert the item
     List.Insert(index, value);
 }
Ejemplo n.º 8
0
		/// <summary>
		/// Searches for the specified WizardPage and returns the zero-based index
		/// of the first occurrence in the entire WizardPagesCollection.
		/// </summary>
		/// <param name="value">A WizardPage object to locate in the WizardPagesCollection.
		/// The value can be null.</param>
		/// <returns></returns>
		public int IndexOf(WizardPage value)
		{
			return List.IndexOf(value);
		}
Ejemplo n.º 9
0
		/// <summary>
		/// Adds an object to the end of the WizardPagesCollection.
		/// </summary>
		/// <param name="value">The WizardPage to be added.
		/// The value can be null.</param>
		/// <returns>An Integer value representing the index at which the value has been added.</returns>
		public int Add(WizardPage value)
		{
			var result = List.Add(value);
			return result;
		}
Ejemplo n.º 10
0
		/// <summary>
		/// Determines whether an element is in the WizardPagesCollection.  
		/// </summary>
		/// <param name="value">The WizardPage object to locate. The value can be null.</param>
		/// <returns>true if item is found in the WizardPagesCollection; otherwise, false.</returns>
		public bool Contains(WizardPage value)
		{
			return List.Contains(value);
		}
Ejemplo n.º 11
0
		/// <summary>
		/// Removes the first occurrence of a specific object from the WizardPagesCollection.
		/// </summary>
		/// <param name="value">A WizardPage object to remove. The value can be null.</param>
		public void Remove(WizardPage value)
		{
			// remove the item
			List.Remove(value);
		}
Ejemplo n.º 12
0
		/// <summary>
		/// Inserts an element into the WizardPagesCollection at the specified index.
		/// </summary>
		/// <param name="index">An Integer value representing the zero-based index at which value should be inserted.</param>
		/// <param name="value">A WizardPage object to insert. The value can be null.</param>
		public void Insert(int index, WizardPage value)
		{
			// insert the item
			List.Insert(index, value);
		}