- Timestamp:
- 09/16/10 19:26:24 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyKeyedItemCollection.cs
r4068 r4419 31 31 [Item("ReadOnlyKeyedItemCollection", "Represents a read-only keyed collection of items.")] 32 32 public class ReadOnlyKeyedItemCollection<TKey, TItem> : ReadOnlyObservableKeyedCollection<TKey, TItem>, IKeyedItemCollection<TKey, TItem> where TItem : class, IItem { 33 private string filename;34 public string Filename {35 get { return filename; }36 set {37 if (value == null) throw new ArgumentNullException();38 if ((filename == null) || !filename.Equals(value)) {39 filename = value;40 OnFilenameChanged();41 }42 }43 }44 45 33 public virtual string ItemName { 46 34 get { return ItemAttribute.GetName(this.GetType()); } … … 76 64 } 77 65 78 public event EventHandler FilenameChanged;79 protected virtual void OnFilenameChanged() {80 EventHandler handler = FilenameChanged;81 if (handler != null) handler(this, EventArgs.Empty);82 }83 66 public event EventHandler ItemImageChanged; 84 67 protected virtual void OnItemImageChanged() {
Note: See TracChangeset
for help on using the changeset viewer.