Changeset 11605 for trunk/sources/HeuristicLab.Scripting
- Timestamp:
- 12/01/14 14:19:16 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Scripting/3.3/VariableStore.cs
r11066 r11605 21 21 22 22 using System; 23 using System.Drawing; 23 24 using System.IO; 24 25 using HeuristicLab.Collections; 25 26 using HeuristicLab.Common; 27 using HeuristicLab.Common.Resources; 26 28 using HeuristicLab.Core; 27 29 using HeuristicLab.Persistence.Core; … … 32 34 [Item("VariableStore", "Represents a variable store.")] 33 35 [StorableClass] 34 public class VariableStore : ObservableDictionary<string, object>, IContent, IDeepCloneable { 36 public class VariableStore : ObservableDictionary<string, object>, IItem { 37 #region Properties 38 public virtual string ItemName { 39 get { return ItemAttribute.GetName(GetType()); } 40 } 41 public virtual string ItemDescription { 42 get { return ItemAttribute.GetDescription(GetType()); } 43 } 44 public Version ItemVersion { 45 get { return ItemAttribute.GetVersion(GetType()); } 46 } 47 public static Image StaticItemImage { 48 get { return VSImageLibrary.Class; } 49 } 50 public virtual Image ItemImage { 51 get { return ItemAttribute.GetImage(GetType()); } 52 } 53 #endregion 54 55 #region Constructors & Cloning 35 56 [StorableConstructor] 36 57 protected VariableStore(bool deserializing) : base(deserializing) { } … … 68 89 } 69 90 } 91 #endregion 92 93 #region Overrides 94 public override string ToString() { 95 return ItemName; 96 } 97 #endregion 98 99 #region Events 100 public event EventHandler ItemImageChanged; 101 protected virtual void OnItemImageChanged() { 102 var handler = ItemImageChanged; 103 if (handler != null) handler(this, EventArgs.Empty); 104 } 105 public event EventHandler ToStringChanged; 106 protected virtual void OnToStringChanged() { 107 var handler = ToStringChanged; 108 if (handler != null) handler(this, EventArgs.Empty); 109 } 110 #endregion 70 111 } 71 112 }
Note: See TracChangeset
for help on using the changeset viewer.