Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/22/10 05:14:39 (14 years ago)
Author:
swagner
Message:

Worked on the refactoring of saving and loading items (#990)

File:
1 edited

Legend:

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

    r3431 r3483  
    3333  [Item("ReadOnlyItemDictionary<TKey, TValue>", "Represents a read-only dictionary of items.")]
    3434  public class ReadOnlyItemDictionary<TKey, TValue> : ReadOnlyObservableDictionary<TKey, TValue>, IItemDictionary<TKey, TValue> where TKey : class, IItem where TValue : class, IItem {
     35    private string filename;
     36    public string Filename {
     37      get { return filename; }
     38      set {
     39        if (!filename.Equals(value)) {
     40          filename = value;
     41          OnFilenameChanged();
     42        }
     43      }
     44    }
     45
    3546    public virtual string ItemName {
    3647      get { return ItemAttribute.GetName(this.GetType()); }
     
    7485    }
    7586
     87    public event EventHandler FilenameChanged;
     88    protected virtual void OnFilenameChanged() {
     89      EventHandler handler = FilenameChanged;
     90      if (handler != null) handler(this, EventArgs.Empty);
     91    }
    7692    public event EventHandler ItemImageChanged;
    7793    protected virtual void OnItemImageChanged() {
Note: See TracChangeset for help on using the changeset viewer.