/// <summary> /// Adds a path to the path list /// </summary> /// <param name="path">The path to add</param> public void Add(WizardNavigationPath path) { if (this.Contains(path)) throw new ArgumentOutOfRangeException("WizardNavigationPath path", "The path list already contains a path with the same destination"); path.PathSelected += new WizardNavigationPathEventHandler(OnPathSelected); base.InnerList.Add(path); }
/// <summary> /// Removes a path from the path list /// </summary> /// <param name="path">The path to remove</param> public void Remove(WizardNavigationPath path) { if (this.Contains(path)) { path.PathSelected -= new WizardNavigationPathEventHandler(OnPathSelected); base.InnerList.Remove(path); } }
/// <summary> /// Determines if a path already exists by examining the destination locations of existing paths to the destination location of the specified path /// </summary> /// <param name="path">The path to examine and determine if it already exists</param> /// <returns></returns> public bool Contains(WizardNavigationPath path) { if (path == null) throw new ArgumentNullException("WizardNavigationPath path", "The path cannot be null"); foreach(WizardNavigationPath existingPath in base.InnerList) if (string.Compare(existingPath.Name, path.Name, true) == 0) return true; return false; }
/// <summary> /// Adds a path to the path list /// </summary> /// <param name="path">The path to add</param> public void Add(WizardNavigationPath path) { if (this.Contains(path)) { throw new ArgumentOutOfRangeException("WizardNavigationPath path", "The path list already contains a path with the same destination"); } path.PathSelected += new WizardNavigationPathEventHandler(OnPathSelected); base.InnerList.Add(path); }
/// <summary> /// Determines if a path already exists by examining the destination locations of existing paths to the destination location of the specified path /// </summary> /// <param name="path">The path to examine and determine if it already exists</param> /// <returns></returns> public bool Contains(WizardNavigationPath path) { if (path == null) { throw new ArgumentNullException("WizardNavigationPath path", "The path cannot be null"); } foreach (WizardNavigationPath existingPath in base.InnerList) { if (string.Compare(existingPath.Name, path.Name, true) == 0) { return(true); } } return(false); }
public WizardNavigationPathEventArgs(WizardNavigationPath path) : base() { _path = path; }
/// <summary> /// Adds a route from this location to the location defined by the specified path /// </summary> /// <param name="path">The path to follow to reach the specified destination location</param> public void AddRoute(WizardNavigationPath path) { // add this path which describes some route _paths.Add(path); }