Free cookie consent management tool by TermsFeed Policy Generator

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

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

Location:
trunk/sources/HeuristicLab.Operators/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Operators/3.3/AlgorithmOperator.cs

    r5445 r7201  
    3232  [StorableClass]
    3333  public abstract class AlgorithmOperator : SingleSuccessorOperator {
     34    public static new Image StaticItemImage {
     35      get { return HeuristicLab.Common.Resources.VSImageLibrary.Module; }
     36    }
    3437    public override Image ItemImage {
    3538      get {
    3639        if (Breakpoint) return HeuristicLab.Common.Resources.VSImageLibrary.BreakpointActive;
    37         else return HeuristicLab.Common.Resources.VSImageLibrary.Module;
     40        else return base.ItemImage;
    3841      }
    3942    }
  • trunk/sources/HeuristicLab.Operators/3.3/Operator.cs

    r6114 r7201  
    3434  [StorableClass]
    3535  public abstract class Operator : ParameterizedNamedItem, IOperator, IStatefulItem {
     36    public static new Image StaticItemImage {
     37      get { return HeuristicLab.Common.Resources.VSImageLibrary.Method; }
     38    }
    3639    public override Image ItemImage {
    3740      get {
    3841        if (Breakpoint) return HeuristicLab.Common.Resources.VSImageLibrary.BreakpointActive;
    39         else return HeuristicLab.Common.Resources.VSImageLibrary.Method;
     42        else return base.ItemImage;
    4043      }
    4144    }
Note: See TracChangeset for help on using the changeset viewer.