Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/03/09 12:49:54 (15 years ago)
Author:
mkommend
Message:

separated ViewBase<T> into ViewBase and ViewBase<T> (ticket #771)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/ViewBase.cs

    r2458 r2461  
    3030
    3131namespace HeuristicLab.MainForm.WindowsForms {
    32   public partial class ViewBase<T> : UserControl, IView<T> {
    33    
     32  public partial class ViewBase : UserControl, IView {   
    3433    public ViewBase() {
    3534      InitializeComponent();
    36       item = default(T);
    37     }
    38 
    39     private T item;
    40     public virtual T Item {
    41       get { return this.item; }
    42       protected set { this.item = value; }
    43     }
    44 
    45     public virtual void View(T item) {
    4635    }
    4736
     
    6049    protected virtual void OnCaptionChanged() {
    6150      if (CaptionChanged != null)
    62         CaptionChanged(this, new EventArgs());
     51        CaptionChanged(this, new EventArgs());     
    6352    }
    6453
     
    6655    protected virtual void OnChanged() {
    6756      if (Changed != null)
    68         Changed(this, new EventArgs());
     57        Changed(this, new EventArgs());   
    6958    }
    7059
     
    7564    }
    7665  }
     66
     67  public class ViewBase<T> : ViewBase, IView<T> {
     68    private T item;
     69    public virtual T Item {
     70      get { return this.item; }
     71      protected set { this.item = value; }
     72    }
     73
     74    public virtual void View(T item) {
     75    }
     76  }
    7777}
Note: See TracChangeset for help on using the changeset viewer.