Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/30/10 10:24:50 (15 years ago)
Author:
gkronber
Message:

Implemented add and insert operations for checked-item-collections. #992

Location:
trunk/sources/HeuristicLab.Core/3.3/Collections
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core/3.3/Collections/CheckedItemCollection.cs

    r3564 r3567  
    7373    }
    7474
     75    public void Add(T item, bool checkedState) {
     76      Add(item);
     77      SetItemCheckedState(item, checkedState);
     78    }
     79
    7580    protected override void OnCollectionReset(IEnumerable<T> items, IEnumerable<T> oldItems) {
    7681      foreach (var oldItem in oldItems)
  • trunk/sources/HeuristicLab.Core/3.3/Collections/CheckedItemList.cs

    r3565 r3567  
    8585    }
    8686
     87    public void Add(T item, bool checkedState) {
     88      Add(item);
     89      SetItemCheckedState(item, checkedState);
     90    }
     91
     92    public void Insert(int index, T item, bool checkedState) {
     93      Insert(index, item);
     94      SetItemCheckedState(item, checkedState);
     95    }
     96
    8797    protected override void OnCollectionReset(IEnumerable<IndexedItem<T>> items, IEnumerable<IndexedItem<T>> oldItems) {
    8898      foreach (var oldIndexedItem in oldItems) {
Note: See TracChangeset for help on using the changeset viewer.