예제 #1
0
        public void RemoveAt(int index)
        {
            CControlBase cControl = this.list[index];

            this.list.RemoveAt(index);
            this._cControlBase.OnControlRemoved(new ControlEventArgs(cControl));
        }
예제 #2
0
 public void Insert(int index, CControlBase cControl)
 {
     if (!this.list.Contains(cControl))
     {
         this.list.Insert(index, cControl);
         this._cControlBase.OnControlAdded(new ControlEventArgs(cControl));
     }
 }
예제 #3
0
 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));
     }
 }
예제 #4
0
 public void Remove(CControlBase value)
 {
     this.list.Remove(value);
     this._cControlBase.OnControlRemoved(new ControlEventArgs(value));
 }
예제 #5
0
 public int IndexOf(CControlBase value) =>
 this.list.IndexOf(value);
예제 #6
0
 public bool Contains(CControlBase value) =>
 this.list.Contains(value);
예제 #7
0
 public ControlBaseCollection(CControlBase owner)
 {
     this.list          = new List <CControlBase>();
     this._cControlBase = owner;
 }