Changeset 3414


Ignore:
Timestamp:
04/19/10 18:00:19 (12 years ago)
Author:
mkommend
Message:

added accidentally removed property ReadOnlyView in IContent (ticket #980)

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  
    2727namespace HeuristicLab.Common {
    2828  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);
    3152    }
    3253  }
  • trunk/sources/HeuristicLab.Common/3.3/Content/IContent.cs

    r3412 r3414  
    2626
    2727namespace HeuristicLab.Common {
    28   public interface IContent{
     28  public interface IContent :IDeepCloneable{
     29    bool ReadOnlyView { get; set; }
     30    event EventHandler ReadOnlyViewChanged;
    2931  }
    3032}
Note: See TracChangeset for help on using the changeset viewer.