Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/08/14 03:27:24 (10 years ago)
Author:
swagner
Message:

#2205: Worked on optimization networks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/AlgorithmNode.cs

    r11412 r11423  
    116116
    117117    #region Ports Events
    118     private void RegisterPortsEvents() {
    119       Ports.ItemsAdded += Ports_ItemsAdded;
    120       Ports.ItemsRemoved += Ports_ItemsRemoved;
    121       Ports.ItemsReplaced += Ports_ItemsReplaced;
    122       Ports.CollectionReset += Ports_CollectionReset;
     118    protected override void RegisterPortsEvents() {
     119      base.RegisterPortsEvents();
    123120      foreach (var p in Ports)
    124121        RegisterPortEvents(p);
    125122    }
    126     void Ports_ItemsAdded(object sender, Collections.CollectionItemsChangedEventArgs<IPort> e) {
    127       foreach (var p in e.Items)
    128         RegisterPortEvents(p);
    129     }
    130     void Ports_ItemsRemoved(object sender, Collections.CollectionItemsChangedEventArgs<IPort> e) {
     123    protected override void Ports_ItemsAdded(object sender, Collections.CollectionItemsChangedEventArgs<IPort> e) {
     124      base.Ports_ItemsAdded(sender, e);
     125      foreach (var p in e.Items)
     126        RegisterPortEvents(p);
     127    }
     128    protected override void Ports_ItemsRemoved(object sender, Collections.CollectionItemsChangedEventArgs<IPort> e) {
     129      base.Ports_ItemsRemoved(sender, e);
    131130      foreach (var p in e.Items)
    132131        DeregisterPortEvents(p);
    133132    }
    134     void Ports_ItemsReplaced(object sender, Collections.CollectionItemsChangedEventArgs<IPort> e) {
     133    protected override void Ports_ItemsReplaced(object sender, Collections.CollectionItemsChangedEventArgs<IPort> e) {
     134      base.Ports_ItemsReplaced(sender, e);
    135135      foreach (var p in e.OldItems)
    136136        DeregisterPortEvents(p);
     
    138138        RegisterPortEvents(p);
    139139    }
    140     void Ports_CollectionReset(object sender, Collections.CollectionItemsChangedEventArgs<IPort> e) {
     140    protected override void Ports_CollectionReset(object sender, Collections.CollectionItemsChangedEventArgs<IPort> e) {
     141      base.Ports_CollectionReset(sender, e);
    141142      foreach (var p in e.OldItems)
    142143        DeregisterPortEvents(p);
Note: See TracChangeset for help on using the changeset viewer.