Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2509


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

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

Location:
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2
Files:
2 edited

Legend:

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

    r2461 r2509  
    4545    /// </summary>
    4646    private void InitializeComponent() {
    47       components = new System.ComponentModel.Container();
     47      this.SuspendLayout();
     48      //
     49      // ViewBase
     50      //
     51      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    4852      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     53      this.Name = "ViewBase";
     54      this.Load += new System.EventHandler(this.ViewBase_Load);
     55      this.ResumeLayout(false);
     56
    4957    }
    5058
  • 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.