Example #1
0
 protected virtual void OnItemAdding(ItemAddingEventArgs e)
 {
     if (this.ItemAdding != null)
     {
         this.ItemAdding(this, e);
     }
 }
Example #2
0
 internal bool AddItemManually()
 {
     ItemAddingEventArgs e = new ItemAddingEventArgs(this.Items.Count);
     this.OnItemAdding(e);
     if ((e.ListItem != null) && !e.Cancel)
     {
         this.Items.Add(e.ListItem);
     }
     return e.Cancel;
 }