Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/08/09 02:35:40 (14 years ago)
Author:
swagner
Message:

Continued work on Optimizer (#770)

Location:
trunk/sources/HeuristicLab.Core.Views/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core.Views/3.3/IItemView.cs

    r2546 r2547  
    4040    /// </summary>
    4141    event EventHandler ItemChanged;
     42
     43    event EventHandler Closed;
    4244  }
    4345}
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemViewBase.cs

    r2546 r2547  
    5656      }
    5757    }
    58     private string myCaption;
    59     /// <summary>
    60     /// Gets or sets the caption of the current instance.
    61     /// </summary>
    62     /// <remarks>Call <see cref="OnCaptionChanged"/> in the setter if a new item is set.</remarks>
    63     public string Caption {
    64       get { return myCaption; }
    65       set {
    66         if (value != myCaption) {
    67           myCaption = value;
    68           OnCaptionChanged();
    69         }
    70       }
    71     }
    7258
    7359    /// <summary>
     
    9783    public override void Refresh() {
    9884      if (InvokeRequired) {
    99         Invoke(new MethodInvoker(Refresh));
     85        Invoke(new Action(Refresh));
    10086      } else {
    10187        UpdateControls();
     
    11096        Caption = "View";
    11197      else
    112         Caption = "View (" + Item.GetType().Name + ")";
     98        Caption = Item.Name;
    11399     
    114100    }
     
    125111        ItemChanged(this, new EventArgs());
    126112    }
    127     /// <summary>
    128     /// Occurs when the current caption was changed.
    129     /// </summary>
    130     public event EventHandler CaptionChanged;
    131     /// <summary>
    132     /// Fires a new <c>CaptionChanged</c> event.
    133     /// </summary>
    134     protected virtual void OnCaptionChanged() {
    135       if (CaptionChanged != null)
    136         CaptionChanged(this, new EventArgs());
     113
     114    public event EventHandler Closed;
     115    public override void OnClosed(object sender, EventArgs e) {
     116      base.OnClosed(sender, e);
     117      if (Closed != null)
     118        Closed(this, e);
    137119    }
    138120
Note: See TracChangeset for help on using the changeset viewer.