Changeset 3414
- Timestamp:
- 04/19/10 18:00:19 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Common/3.3/Content
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Common/3.3/Content/Content.cs
r3412 r3414 27 27 namespace HeuristicLab.Common { 28 28 public class Content : DeepCloneable, IContent { 29 public Content() 30 : base() { 29 public Content() { 30 this.readOnlyView = false; 31 } 32 public Content(bool readOnlyView) 33 : this() { 34 this.ReadOnlyView = readOnlyView; 35 } 36 37 private bool readOnlyView; 38 public virtual bool ReadOnlyView { 39 get { return readOnlyView; } 40 set { 41 if (readOnlyView != value) { 42 readOnlyView = value; 43 OnReadOnlyViewChanged(); 44 } 45 } 46 } 47 48 public event EventHandler ReadOnlyViewChanged; 49 protected virtual void OnReadOnlyViewChanged() { 50 EventHandler handler = ReadOnlyViewChanged; 51 if (handler != null) handler(this, EventArgs.Empty); 31 52 } 32 53 } -
trunk/sources/HeuristicLab.Common/3.3/Content/IContent.cs
r3412 r3414 26 26 27 27 namespace HeuristicLab.Common { 28 public interface IContent{ 28 public interface IContent :IDeepCloneable{ 29 bool ReadOnlyView { get; set; } 30 event EventHandler ReadOnlyViewChanged; 29 31 } 30 32 }
Note: See TracChangeset
for help on using the changeset viewer.