Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/19/09 15:49:02 (14 years ago)
Author:
mkommend
Message:

added Initialized event to ViewBase in MainForm.WindowsForms (ticket #771)

File:
1 edited

Legend:

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

    r2464 r2509  
    3030
    3131namespace HeuristicLab.MainForm.WindowsForms {
    32   public partial class ViewBase : UserControl, IView {   
     32  public partial class ViewBase : UserControl, IView {
     33    private bool initialized;
    3334    public ViewBase() {
    3435      InitializeComponent();
     36      this.initialized = false;
    3537    }
    3638
     
    6365    public virtual void OnClosed(object sender, EventArgs e) {
    6466    }
     67
     68    protected event EventHandler Initialized;
     69
     70    private void ViewBase_Load(object sender, EventArgs e) {
     71      if (!this.initialized && !this.DesignMode) {
     72        if (this.Initialized != null)
     73          this.Initialized(this, new EventArgs());
     74        this.initialized = true;
     75      }
     76    }
    6577  }
    6678}
Note: See TracChangeset for help on using the changeset viewer.