Exemplo n.º 1
0
 void WLControls_CollectionChange(GMCollectionChangeArgs e)
 {
     if (e.Action == GMCollectionChangeAction.AfterInsert)
     {
         WLControlBase ctl = e.Value as WLControlBase;
         if (ctl != null)
             listChildControls.Add(ctl);
     }
     else if (e.Action == GMCollectionChangeAction.AfterRemove)
     {
         WLControlBase ctl = e.Value as WLControlBase;
         if (ctl != null)
             listChildControls.Remove(ctl);
     }
     else if (e.Action == GMCollectionChangeAction.AfterClear)
         listChildControls.Clear();
 }
Exemplo n.º 2
0
 private void Items_CollectionChange(GMCollectionChangeArgs e)
 {
     if (e.Action == GMCollectionChangeAction.AfterInsert)
         DoWhenInsertItem(e.Index, e.Value);
     else if (e.Action == GMCollectionChangeAction.AfterRemove)
         DoWhenRemoveItem(e.Index, e.Value);
     else if (e.Action == GMCollectionChangeAction.AfterClear)
         DoWhenClearItem();
 }