コード例 #1
0
		/// <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);
		}
コード例 #2
0
		/// <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);
			}
		}
コード例 #3
0
 /// <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);
     }
 }
コード例 #4
0
		/// <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;
		}		
コード例 #5
0
        /// <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);
        }
コード例 #6
0
        /// <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);
        }
コード例 #7
0
		public WizardNavigationPathEventArgs(WizardNavigationPath path) : base()
		{
			_path = path;
		}
コード例 #8
0
		/// <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);			
		}
コード例 #9
0
 public WizardNavigationPathEventArgs(WizardNavigationPath path) : base()
 {
     _path = path;
 }
コード例 #10
0
 /// <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);
 }