public void RemoveAt(int index) { CControlBase cControl = this.list[index]; this.list.RemoveAt(index); this._cControlBase.OnControlRemoved(new ControlEventArgs(cControl)); }
public void Insert(int index, CControlBase cControl) { if (!this.list.Contains(cControl)) { this.list.Insert(index, cControl); this._cControlBase.OnControlAdded(new ControlEventArgs(cControl)); } }
public void Add(CControlBase cControl) { if (cControl == null) { throw new ArgumentNullException("不能添加Null"); } if (this.IndexOf(cControl) < 0) { this.list.Add(cControl); this._cControlBase.OnControlAdded(new ControlEventArgs(cControl)); } }
public void Remove(CControlBase value) { this.list.Remove(value); this._cControlBase.OnControlRemoved(new ControlEventArgs(value)); }
public int IndexOf(CControlBase value) => this.list.IndexOf(value);
public bool Contains(CControlBase value) => this.list.Contains(value);
public ControlBaseCollection(CControlBase owner) { this.list = new List <CControlBase>(); this._cControlBase = owner; }