Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/07/09 02:44:23 (14 years ago)
Author:
swagner
Message:

Continued work on Optimizer and on adapting all views to the new MainForm concept (#770)

File:
1 edited

Legend:

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

    r2526 r2546  
    2424using System.Text;
    2525using System.Xml;
     26using System.Drawing;
     27using System.Resources;
    2628using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     29using HeuristicLab.Common.Resources;
    2730
    2831namespace HeuristicLab.Core {
     
    3033  /// Represents the base class for all basic item types.
    3134  /// </summary>
     35  [Item("ItemBase", "Base class for all HeuristicLab items.")]
    3236  [EmptyStorableClass]
    3337  public abstract class ItemBase : IItem {
     38    public virtual string Name {
     39      get {
     40        if (ItemAttribute.GetName(this.GetType()) != null)
     41          return ItemAttribute.GetName(this.GetType());
     42        else
     43          return this.GetType().Name;
     44      }
     45    }
     46    public virtual string Description {
     47      get {
     48        if (ItemAttribute.GetDescription(this.GetType()) != null)
     49          return ItemAttribute.GetDescription(this.GetType());
     50        else
     51          return "No description available.";
     52      }
     53    }
     54    public virtual Image Image {
     55      get { return Resources.HeuristicLab; }
     56    }
     57
    3458    /// <summary>
    3559    /// Creates a deep clone of this instance.
Note: See TracChangeset for help on using the changeset viewer.