Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/16/10 19:26:24 (14 years ago)
Author:
swagner
Message:

Enabled saving only for some specific items (#1193)

File:
1 edited

Legend:

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

    r3728 r4419  
    3232  [Item("Item", "Base class for all HeuristicLab items.")]
    3333  public abstract class Item : IItem {
    34     private string filename;
    35     public string Filename {
    36       get { return filename; }
    37       set {
    38         if (value == null) throw new ArgumentNullException();
    39         if ((filename == null) || !filename.Equals(value)) {
    40           filename = value;
    41           OnFilenameChanged();
    42         }
    43       }
    44     }
    45 
    4634    public virtual string ItemName {
    4735      get { return ItemAttribute.GetName(this.GetType()); }
     
    5745    }
    5846
    59     protected Item() {
    60       filename = string.Empty;
    61     }
     47    protected Item() { }
    6248    [StorableConstructor]
    63     protected Item(bool deserializing) {
    64       filename = string.Empty;
    65     }
     49    protected Item(bool deserializing) { }
    6650
    6751    public object Clone() {
     
    8266    }
    8367
    84     public event EventHandler FilenameChanged;
    85     protected virtual void OnFilenameChanged() {
    86       EventHandler handler = FilenameChanged;
    87       if (handler != null) handler(this, EventArgs.Empty);
    88     }
    8968    public event EventHandler ItemImageChanged;
    9069    protected virtual void OnItemImageChanged() {
Note: See TracChangeset for help on using the changeset viewer.