Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/19/11 03:17:35 (13 years ago)
Author:
swagner
Message:

Implemented static item image properties to avoid instance creation in TypeSelector and NewItemDialog (#1651)

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

Legend:

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

    r5445 r7201  
    2626using HeuristicLab.Collections;
    2727using HeuristicLab.Common;
    28 using HeuristicLab.Common.Resources;
    2928using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3029
     
    4241      get { return ItemAttribute.GetVersion(this.GetType()); }
    4342    }
     43    public static Image StaticItemImage {
     44      get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; }
     45    }
    4446    public virtual Image ItemImage {
    45       get { return VSImageLibrary.Class; }
     47      get { return ItemAttribute.GetImage(this.GetType()); }
    4648    }
    4749
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ItemCollection.cs

    r5445 r7201  
    2626using HeuristicLab.Collections;
    2727using HeuristicLab.Common;
    28 using HeuristicLab.Common.Resources;
    2928using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3029
     
    4241      get { return ItemAttribute.GetVersion(this.GetType()); }
    4342    }
     43    public static Image StaticItemImage {
     44      get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; }
     45    }
    4446    public virtual Image ItemImage {
    45       get { return VSImageLibrary.Class; }
     47      get { return ItemAttribute.GetImage(this.GetType()); }
    4648    }
    4749
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ItemDictionary.cs

    r5445 r7201  
    2525using HeuristicLab.Collections;
    2626using HeuristicLab.Common;
    27 using HeuristicLab.Common.Resources;
    2827using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2928
     
    4443      get { return ItemAttribute.GetVersion(this.GetType()); }
    4544    }
     45    public static Image StaticItemImage {
     46      get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; }
     47    }
    4648    public virtual Image ItemImage {
    47       get { return VSImageLibrary.Class; }
     49      get { return ItemAttribute.GetImage(this.GetType()); }
    4850    }
    4951
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ItemList.cs

    r5445 r7201  
    2626using HeuristicLab.Collections;
    2727using HeuristicLab.Common;
    28 using HeuristicLab.Common.Resources;
    2928using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3029
     
    4241      get { return ItemAttribute.GetVersion(this.GetType()); }
    4342    }
     43    public static Image StaticItemImage {
     44      get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; }
     45    }
    4446    public virtual Image ItemImage {
    45       get { return VSImageLibrary.Class; }
     47      get { return ItemAttribute.GetImage(this.GetType()); }
    4648    }
    4749
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ItemSet.cs

    r6525 r7201  
    2626using HeuristicLab.Collections;
    2727using HeuristicLab.Common;
    28 using HeuristicLab.Common.Resources;
    2928using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3029
     
    4241      get { return ItemAttribute.GetVersion(this.GetType()); }
    4342    }
     43    public static Image StaticItemImage {
     44      get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; }
     45    }
    4446    public virtual Image ItemImage {
    45       get { return VSImageLibrary.Class; }
     47      get { return ItemAttribute.GetImage(this.GetType()); }
    4648    }
    4749
  • trunk/sources/HeuristicLab.Core/3.3/Collections/KeyedItemCollection.cs

    r5445 r7201  
    4040      get { return ItemAttribute.GetVersion(this.GetType()); }
    4141    }
     42    public static Image StaticItemImage {
     43      get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; }
     44    }
    4245    public virtual Image ItemImage {
    43       get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; }
     46      get { return ItemAttribute.GetImage(this.GetType()); }
    4447    }
    4548
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemArray.cs

    r5445 r7201  
    2424using HeuristicLab.Collections;
    2525using HeuristicLab.Common;
    26 using HeuristicLab.Common.Resources;
    2726using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2827
     
    4039      get { return ItemAttribute.GetVersion(this.GetType()); }
    4140    }
     41    public static Image StaticItemImage {
     42      get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; }
     43    }
    4244    public virtual Image ItemImage {
    43       get { return VSImageLibrary.Class; }
     45      get { return ItemAttribute.GetImage(this.GetType()); }
    4446    }
    4547
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemCollection.cs

    r5445 r7201  
    2424using HeuristicLab.Collections;
    2525using HeuristicLab.Common;
    26 using HeuristicLab.Common.Resources;
    2726using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2827
     
    4039      get { return ItemAttribute.GetVersion(this.GetType()); }
    4140    }
     41    public static Image StaticItemImage {
     42      get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; }
     43    }
    4244    public virtual Image ItemImage {
    43       get { return VSImageLibrary.Class; }
     45      get { return ItemAttribute.GetImage(this.GetType()); }
    4446    }
    4547
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemDictionary.cs

    r5445 r7201  
    2424using HeuristicLab.Collections;
    2525using HeuristicLab.Common;
    26 using HeuristicLab.Common.Resources;
    2726using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2827
     
    4342      get { return ItemAttribute.GetVersion(this.GetType()); }
    4443    }
     44    public static Image StaticItemImage {
     45      get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; }
     46    }
    4547    public virtual Image ItemImage {
    46       get { return VSImageLibrary.Class; }
     48      get { return ItemAttribute.GetImage(this.GetType()); }
    4749    }
    4850
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemList.cs

    r5445 r7201  
    2424using HeuristicLab.Collections;
    2525using HeuristicLab.Common;
    26 using HeuristicLab.Common.Resources;
    2726using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2827
     
    4039      get { return ItemAttribute.GetVersion(this.GetType()); }
    4140    }
     41    public static Image StaticItemImage {
     42      get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; }
     43    }
    4244    public virtual Image ItemImage {
    43       get { return VSImageLibrary.Class; }
     45      get { return ItemAttribute.GetImage(this.GetType()); }
    4446    }
    4547
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemSet.cs

    r5445 r7201  
    2424using HeuristicLab.Collections;
    2525using HeuristicLab.Common;
    26 using HeuristicLab.Common.Resources;
    2726using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2827
     
    4039      get { return ItemAttribute.GetVersion(this.GetType()); }
    4140    }
     41    public static Image StaticItemImage {
     42      get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; }
     43    }
    4244    public virtual Image ItemImage {
    43       get { return VSImageLibrary.Class; }
     45      get { return ItemAttribute.GetImage(this.GetType()); }
    4446    }
    4547
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyKeyedItemCollection.cs

    r5445 r7201  
    2424using HeuristicLab.Collections;
    2525using HeuristicLab.Common;
    26 using HeuristicLab.Common.Resources;
    2726using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2827
     
    4039      get { return ItemAttribute.GetVersion(this.GetType()); }
    4140    }
     41    public static Image StaticItemImage {
     42      get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; }
     43    }
    4244    public virtual Image ItemImage {
    43       get { return VSImageLibrary.Class; }
     45      get { return ItemAttribute.GetImage(this.GetType()); }
    4446    }
    4547
Note: See TracChangeset for help on using the changeset viewer.