⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tablerow.cs

📁 不错的人事管理系统
💻 CS
字号:
using System;
using System.Web.UI;

namespace System.Web.UI.WebControls
{
	/// <summary>
	/// Summary description for TableRow.
	/// </summary>
	public class TableRow : WebControl
	{
		protected class CellControlCollection : ControlCollection
		{
			
			internal CellControlCollection(Control owner) : base(owner) 
			{
			}

			public virtual void Add(Control child) 
			{
				if (child as TableCell != null) 
				{
					this.Add(child);
					return;
				}
				throw new ArgumentException(System.Web.HttpRuntime.FormatResourceString("Cannot_Have_Children_Of_Type", "TableRow", child.GetType().Name.ToString()));
			}

			public virtual void AddAt(int index, Control child) 
			{
				if (child as TableCell != null) 
				{
					this.AddAt(index, child);
					return;
				}
				throw new ArgumentException(System.Web.HttpRuntime.FormatResourceString("Cannot_Have_Children_Of_Type", "TableRow", child.GetType().Name.ToString()));
			}

		}
		private System.Web.UI.WebControls.TableCellCollection cells;

		public TableRow() : base(HtmlTextWriterTag.Tr) 
		{
			this.PreventAutoID();
		}

		protected virtual ControlCollection CreateControlCollection() 
		{
			return new CellControlCollection(this);
		}

		protected virtual Style CreateControlStyle() 
		{
			return new TableItemStyle(this.ViewState);
		}

		public virtual TableCellCollection Cells 
		{
			get
			{
				if (this.cells == null)
				{
//					this.cells = new TableCellCollection(this);
				}
				return this.cells;
			}
		}

		public virtual HorizontalAlign HorizontalAlign 
		{
			get
			{
				if (!(this.ControlStyleCreated))
					return 0;
				return ((TableItemStyle) this.ControlStyle).HorizontalAlign;
			}
			set
			{
				((TableItemStyle) this.ControlStyle).HorizontalAlign = value;
			}
		}

		public virtual VerticalAlign VerticalAlign 
		{
			get
			{
				if (!(this.ControlStyleCreated))
					return 0;
				return ((TableItemStyle) this.ControlStyle).VerticalAlign;
			}
			set
			{
				((TableItemStyle) this.ControlStyle).VerticalAlign = value;
			}
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -