Changeset 2546 for trunk/sources/HeuristicLab.Core/3.3/ItemBase.cs
- Timestamp:
- 12/07/09 02:44:23 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core/3.3/ItemBase.cs
r2526 r2546 24 24 using System.Text; 25 25 using System.Xml; 26 using System.Drawing; 27 using System.Resources; 26 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 using HeuristicLab.Common.Resources; 27 30 28 31 namespace HeuristicLab.Core { … … 30 33 /// Represents the base class for all basic item types. 31 34 /// </summary> 35 [Item("ItemBase", "Base class for all HeuristicLab items.")] 32 36 [EmptyStorableClass] 33 37 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 34 58 /// <summary> 35 59 /// Creates a deep clone of this instance.
Note: See TracChangeset
for help on using the changeset viewer.