Source/DocumentDock/DocumentBaseContainerCollection.cs

(开头部分) 3KB

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

using System;
using System.Collections;

namespace DevComponents.DotNetBar
{
	/// <summary>
	/// Collection of DocumentBaseContainer objects.
	/// </summary>
	public class DocumentBaseContainerCollection:CollectionBase
	{
		#region Private Variables and Events
		public event EventHandler DocumentRemoved;
		public event EventHandler DocumentAdded;
		private DocumentBaseContainer m_Owner=null;
		#endregion

		#region Internal Implementation
		public DocumentBaseContainerCollection()
		{
			//m_Owner=owner;
		}
		/// <summary>
		/// Adds new object to the collection.
		/// </summary>
		/// <param name="tab">Object to add.</param>
		/// <returns>Index of newly added object.</returns>
		public int Add(DocumentBaseContainer tab)
		{
			return List.Add(tab);
		}

		/// <summary>
		/// Adds new objects to the collection.
		/// </summary>
		/// <param name="documents">Array of documents to add.</param>
		public void AddRange(DocumentBaseContainer[] documents)
		{
			foreach(DocumentBaseContainer doc in documents)
				List.Add(doc);
		}

		/// <summary>
		/// Returns reference to the object in collection based on it's index.
		/// </summary>
		public DocumentBaseContainer this[int index]
		{
			get {return (DocumentBaseContainer)(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, DocumentBaseContainer value) 
		{
			List.Insert(index, value);
		}

后面还有 80 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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