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.Optimization/3.3
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization/3.3/Algorithms/Algorithm.cs

    r6114 r7201  
    3737  [StorableClass]
    3838  public abstract class Algorithm : ParameterizedNamedItem, IAlgorithm {
     39    public static new Image StaticItemImage {
     40      get { return HeuristicLab.Common.Resources.VSImageLibrary.Event; }
     41    }
    3942    public override Image ItemImage {
    4043      get {
     
    4346        else if (ExecutionState == ExecutionState.Paused) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutablePaused;
    4447        else if (ExecutionState == ExecutionState.Stopped) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutableStopped;
    45         else return HeuristicLab.Common.Resources.VSImageLibrary.Event;
     48        else return base.ItemImage;
    4649      }
    4750    }
  • trunk/sources/HeuristicLab.Optimization/3.3/BatchRun.cs

    r6816 r7201  
    3939    public string Filename { get; set; }
    4040
     41    public static new Image StaticItemImage {
     42      get { return HeuristicLab.Common.Resources.VSImageLibrary.Event; }
     43    }
    4144    public override Image ItemImage {
    4245      get {
     
    4548        else if (ExecutionState == ExecutionState.Paused) return HeuristicLab.Common.Resources.VSImageLibrary.BatchRunPaused;
    4649        else if (ExecutionState == ExecutionState.Stopped) return HeuristicLab.Common.Resources.VSImageLibrary.BatchRunStopped;
    47         else return HeuristicLab.Common.Resources.VSImageLibrary.Event;
     50        else return base.ItemImage;
    4851      }
    4952    }
  • trunk/sources/HeuristicLab.Optimization/3.3/Experiment.cs

    r7197 r7201  
    3939    public string Filename { get; set; }
    4040
     41    public static new Image StaticItemImage {
     42      get { return HeuristicLab.Common.Resources.VSImageLibrary.Event; }
     43    }
    4144    public override Image ItemImage {
    4245      get {
     
    4548        else if (ExecutionState == ExecutionState.Paused) return HeuristicLab.Common.Resources.VSImageLibrary.ExperimentPaused;
    4649        else if (ExecutionState == ExecutionState.Stopped) return HeuristicLab.Common.Resources.VSImageLibrary.ExperimentStopped;
    47         else return HeuristicLab.Common.Resources.VSImageLibrary.Event;
     50        else return base.ItemImage;
    4851      }
    4952    }
  • trunk/sources/HeuristicLab.Optimization/3.3/Problems/Problem.cs

    r6938 r7201  
    3939    }
    4040
    41     public override Image ItemImage {
     41    public static new Image StaticItemImage {
    4242      get { return HeuristicLab.Common.Resources.VSImageLibrary.Type; }
    4343    }
  • trunk/sources/HeuristicLab.Optimization/3.3/Problems/UserDefinedProblem.cs

    r5954 r7201  
    4343    public string Filename { get; set; }
    4444
    45     public override Image ItemImage {
     45    public static new Image StaticItemImage {
    4646      get { return HeuristicLab.Common.Resources.VSImageLibrary.Type; }
    4747    }
     
    263263      #endregion
    264264
    265       public override Image ItemImage {
     265      public static new Image StaticItemImage {
    266266        get { return HeuristicLab.Common.Resources.VSImageLibrary.Method; }
    267267      }
  • trunk/sources/HeuristicLab.Optimization/3.3/ResultCollection.cs

    r6524 r7201  
    4141    }
    4242
    43     public override System.Drawing.Image ItemImage {
     43    public static new System.Drawing.Image StaticItemImage {
    4444      get { return HeuristicLab.Common.Resources.VSImageLibrary.Object; }
    4545    }
Note: See TracChangeset for help on using the changeset viewer.