- Timestamp:
- 11/03/09 12:49:54 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/ViewBase.cs
r2458 r2461 30 30 31 31 namespace HeuristicLab.MainForm.WindowsForms { 32 public partial class ViewBase<T> : UserControl, IView<T> { 33 32 public partial class ViewBase : UserControl, IView { 34 33 public ViewBase() { 35 34 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) {46 35 } 47 36 … … 60 49 protected virtual void OnCaptionChanged() { 61 50 if (CaptionChanged != null) 62 CaptionChanged(this, new EventArgs()); 51 CaptionChanged(this, new EventArgs()); 63 52 } 64 53 … … 66 55 protected virtual void OnChanged() { 67 56 if (Changed != null) 68 Changed(this, new EventArgs()); 57 Changed(this, new EventArgs()); 69 58 } 70 59 … … 75 64 } 76 65 } 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 } 77 77 }
Note: See TracChangeset
for help on using the changeset viewer.