Source/AdvTree/CellCollection.cs

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections;
using System.ComponentModel;

namespace DevComponents.AdvTree
{
	///<summary>
	/// A strongly-typed collection of <see cref="Cell"/> objects.
	///</summary>
	public class CellCollection:CollectionBase 
	{
		#region Private Variables
		private Node m_ParentNode=null;
		#endregion

		#region Internal Implementation
		/// <summary>Creates new instance of the class.</summary>
		public CellCollection()
		{
		}
		/// <summary>
		/// Adds new object to the collection.
		/// </summary>
		/// <param name="cell">Object to add.</param>
		/// <returns>Index of newly added object.</returns>
		public int Add(Cell cell)
		{
			return List.Add(cell);
		}
		/// <summary>
		/// Returns reference to the object in collection based on it's index.
		/// </summary>
		public Cell this[int index]
		{
			get {return (Cell)(List[index]);}
			set {List[index] = value;}
		}

		/// <summary>
		/// Inserts new object into the collection.
		/// </summary>
		/// <param name="index">Position of the object.</param>
		/// <param name="value">Object to insert.</param>
		public void Insert(int index, Cell value) 
		{
			List.Insert(index, value);
		}

		/// <summary>
		/// Returns index of the object inside of the collection.
		/// </summary>
		/// <param name="value">Reference to the object.</param>
		/// <returns>Index of the object.</returns>
		public int IndexOf(Cell value) 
		{
			return List.IndexOf(value);
		}

		/// <summary>
		/// Returns whether collection contains specified object.
后面还有 142 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。