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)

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

Legend:

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

    r4068 r4419  
    3333  [Item("ItemArray", "Represents an array of items.")]
    3434  public class ItemArray<T> : ObservableArray<T>, IItemArray<T> where T : class, IItem {
    35     private string filename;
    36     public string Filename {
    37       get { return filename; }
    38       set {
    39         if (value == null) throw new ArgumentNullException();
    40         if ((filename == null) || !filename.Equals(value)) {
    41           filename = value;
    42           OnFilenameChanged();
    43         }
    44       }
    45     }
    46 
    4735    public virtual string ItemName {
    4836      get { return ItemAttribute.GetName(this.GetType()); }
     
    8371    }
    8472
    85     public event EventHandler FilenameChanged;
    86     protected virtual void OnFilenameChanged() {
    87       EventHandler handler = FilenameChanged;
    88       if (handler != null) handler(this, EventArgs.Empty);
    89     }
    9073    public event EventHandler ItemImageChanged;
    9174    protected virtual void OnItemImageChanged() {
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ItemCollection.cs

    r3822 r4419  
    3333  [Item("ItemCollection", "Represents a collection of items.")]
    3434  public class ItemCollection<T> : ObservableCollection<T>, IItemCollection<T> where T : class, IItem {
    35     private string filename;
    36     public string Filename {
    37       get { return filename; }
    38       set {
    39         if (value == null) throw new ArgumentNullException();
    40         if ((filename == null) || !filename.Equals(value)) {
    41           filename = value;
    42           OnFilenameChanged();
    43         }
    44       }
    45     }
    46 
    4735    public virtual string ItemName {
    4836      get { return ItemAttribute.GetName(this.GetType()); }
     
    8270    }
    8371
    84     public event EventHandler FilenameChanged;
    85     protected virtual void OnFilenameChanged() {
    86       EventHandler handler = FilenameChanged;
    87       if (handler != null) handler(this, EventArgs.Empty);
    88     }
    8972    public event EventHandler ItemImageChanged;
    9073    protected virtual void OnItemImageChanged() {
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ItemDictionary.cs

    r4068 r4419  
    3434    where TKey : class, IItem
    3535    where TValue : class, IItem {
    36     private string filename;
    37     public string Filename {
    38       get { return filename; }
    39       set {
    40         if (value == null) throw new ArgumentNullException();
    41         if ((filename == null) || !filename.Equals(value)) {
    42           filename = value;
    43           OnFilenameChanged();
    44         }
    45       }
    46     }
    4736
    4837    public virtual string ItemName {
     
    8473    }
    8574
    86     public event EventHandler FilenameChanged;
    87     protected virtual void OnFilenameChanged() {
    88       EventHandler handler = FilenameChanged;
    89       if (handler != null) handler(this, EventArgs.Empty);
    90     }
    9175    public event EventHandler ItemImageChanged;
    9276    protected virtual void OnItemImageChanged() {
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ItemList.cs

    r4068 r4419  
    3333  [Item("ItemList", "Represents a list of items.")]
    3434  public class ItemList<T> : ObservableList<T>, IItemList<T> where T : class, IItem {
    35     private string filename;
    36     public string Filename {
    37       get { return filename; }
    38       set {
    39         if (value == null) throw new ArgumentNullException();
    40         if ((filename == null) || !filename.Equals(value)) {
    41           filename = value;
    42           OnFilenameChanged();
    43         }
    44       }
    45     }
    46 
    4735    public virtual string ItemName {
    4836      get { return ItemAttribute.GetName(this.GetType()); }
     
    8270    }
    8371
    84     public event EventHandler FilenameChanged;
    85     protected virtual void OnFilenameChanged() {
    86       EventHandler handler = FilenameChanged;
    87       if (handler != null) handler(this, EventArgs.Empty);
    88     }
    8972    public event EventHandler ItemImageChanged;
    9073    protected virtual void OnItemImageChanged() {
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ItemSet.cs

    r4068 r4419  
    3333  [Item("ItemSet", "Represents a set of items.")]
    3434  public class ItemSet<T> : ObservableSet<T>, IItemSet<T> where T : class, IItem {
    35     private string filename;
    36     public string Filename {
    37       get { return filename; }
    38       set {
    39         if (value == null) throw new ArgumentNullException();
    40         if ((filename == null) || !filename.Equals(value)) {
    41           filename = value;
    42           OnFilenameChanged();
    43         }
    44       }
    45     }
    46 
    4735    public virtual string ItemName {
    4836      get { return ItemAttribute.GetName(this.GetType()); }
     
    8169    }
    8270
    83     public event EventHandler FilenameChanged;
    84     protected virtual void OnFilenameChanged() {
    85       EventHandler handler = FilenameChanged;
    86       if (handler != null) handler(this, EventArgs.Empty);
    87     }
    8871    public event EventHandler ItemImageChanged;
    8972    protected virtual void OnItemImageChanged() {
  • trunk/sources/HeuristicLab.Core/3.3/Collections/KeyedItemCollection.cs

    r4068 r4419  
    3131  [StorableClass]
    3232  public abstract class KeyedItemCollection<TKey, TItem> : ObservableKeyedCollection<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 
    4533    public virtual string ItemName {
    4634      get { return ItemAttribute.GetName(this.GetType()); }
     
    8371    }
    8472
    85     public event EventHandler FilenameChanged;
    86     protected virtual void OnFilenameChanged() {
    87       EventHandler handler = FilenameChanged;
    88       if (handler != null) handler(this, EventArgs.Empty);
    89     }
    9073    public event EventHandler ItemImageChanged;
    9174    protected virtual void OnItemImageChanged() {
  • trunk/sources/HeuristicLab.Core/3.3/Collections/OperatorCollection.cs

    r4068 r4419  
    2525namespace HeuristicLab.Core {
    2626  [StorableClass]
    27   [Creatable("Algorithm Design")]
    2827  [Item("Operator Collection", "Represents a collection of operators.")]
    2928  public class OperatorCollection : ItemCollection<IOperator> {
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemArray.cs

    r4068 r4419  
    3131  [Item("ReadOnlyItemArray", "Represents a read-only array of items.")]
    3232  public class ReadOnlyItemArray<T> : ReadOnlyObservableArray<T>, IItemArray<T> where T : 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 
    4533    public virtual string ItemName {
    4634      get { return ItemAttribute.GetName(this.GetType()); }
     
    7664    }
    7765
    78     public event EventHandler FilenameChanged;
    79     protected virtual void OnFilenameChanged() {
    80       EventHandler handler = FilenameChanged;
    81       if (handler != null) handler(this, EventArgs.Empty);
    82     }
    8366    public event EventHandler ItemImageChanged;
    8467    protected virtual void OnItemImageChanged() {
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemCollection.cs

    r4068 r4419  
    3131  [Item("ReadOnlyItemCollection", "Represents a read-only collection of items.")]
    3232  public class ReadOnlyItemCollection<T> : ReadOnlyObservableCollection<T>, IItemCollection<T> where T : 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 
    4533    public virtual string ItemName {
    4634      get { return ItemAttribute.GetName(this.GetType()); }
     
    7664    }
    7765
    78     public event EventHandler FilenameChanged;
    79     protected virtual void OnFilenameChanged() {
    80       EventHandler handler = FilenameChanged;
    81       if (handler != null) handler(this, EventArgs.Empty);
    82     }
    8366    public event EventHandler ItemImageChanged;
    8467    protected virtual void OnItemImageChanged() {
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemDictionary.cs

    r4068 r4419  
    3333    where TKey : class, IItem
    3434    where TValue : class, IItem {
    35     private string filename;
    36     public string Filename {
    37       get { return filename; }
    38       set {
    39         if (value == null) throw new ArgumentNullException();
    40         if ((filename == null) || !filename.Equals(value)) {
    41           filename = value;
    42           OnFilenameChanged();
    43         }
    44       }
    45     }
    4635
    4736    public virtual string ItemName {
     
    7867    }
    7968
    80     public event EventHandler FilenameChanged;
    81     protected virtual void OnFilenameChanged() {
    82       EventHandler handler = FilenameChanged;
    83       if (handler != null) handler(this, EventArgs.Empty);
    84     }
    8569    public event EventHandler ItemImageChanged;
    8670    protected virtual void OnItemImageChanged() {
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemList.cs

    r4068 r4419  
    3131  [Item("ReadOnlyItemList", "Represents a read-only list of items.")]
    3232  public class ReadOnlyItemList<T> : ReadOnlyObservableList<T>, IItemList<T> where T : 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 
    4533    public virtual string ItemName {
    4634      get { return ItemAttribute.GetName(this.GetType()); }
     
    7664    }
    7765
    78     public event EventHandler FilenameChanged;
    79     protected virtual void OnFilenameChanged() {
    80       EventHandler handler = FilenameChanged;
    81       if (handler != null) handler(this, EventArgs.Empty);
    82     }
    8366    public event EventHandler ItemImageChanged;
    8467    protected virtual void OnItemImageChanged() {
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemSet.cs

    r4068 r4419  
    3131  [Item("ReadOnlyItemSet", "Represents a read-only set of items.")]
    3232  public class ReadOnlyItemSet<T> : ReadOnlyObservableSet<T>, IItemSet<T> where T : 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 
    4533    public virtual string ItemName {
    4634      get { return ItemAttribute.GetName(this.GetType()); }
     
    7664    }
    7765
    78     public event EventHandler FilenameChanged;
    79     protected virtual void OnFilenameChanged() {
    80       EventHandler handler = FilenameChanged;
    81       if (handler != null) handler(this, EventArgs.Empty);
    82     }
    8366    public event EventHandler ItemImageChanged;
    8467    protected virtual void OnItemImageChanged() {
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyKeyedItemCollection.cs

    r4068 r4419  
    3131  [Item("ReadOnlyKeyedItemCollection", "Represents a read-only keyed collection of items.")]
    3232  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 
    4533    public virtual string ItemName {
    4634      get { return ItemAttribute.GetName(this.GetType()); }
     
    7664    }
    7765
    78     public event EventHandler FilenameChanged;
    79     protected virtual void OnFilenameChanged() {
    80       EventHandler handler = FilenameChanged;
    81       if (handler != null) handler(this, EventArgs.Empty);
    82     }
    8366    public event EventHandler ItemImageChanged;
    8467    protected virtual void OnItemImageChanged() {
Note: See TracChangeset for help on using the changeset viewer.