Ignore:
Timestamp:
10/09/14 03:10:16 (8 years ago)
Author:
swagner
Message:

#2205: Worked on optimization networks

File:
1 edited

Legend:

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

    r11423 r11431  
    8888      if (outputPort != null) {
    8989        outputPort.ValueChanged += OutputPort_ValueChanged;
    90         outputPort.ToStringChanged += OutputPort_ToStringChanged;
     90        outputPort.PathChanged += OutputPort_PathChanged;
    9191      }
    9292    }
     
    9494      if (outputPort != null) {
    9595        outputPort.ValueChanged -= OutputPort_ValueChanged;
    96         outputPort.ToStringChanged -= OutputPort_ToStringChanged;
     96        outputPort.PathChanged -= OutputPort_PathChanged;
    9797      }
    9898    }
    9999    protected void OutputPort_ValueChanged(object sender, EventArgs e) {
    100       Value = (T)OutputPort.Value.Clone();
     100      var value = OutputPort.Value;
     101      if (value != null)
     102        value = (T)value.Clone();
     103      Value = value;
    101104      //DISCUSS: clone value?
    102105      //DISCUSS: switch threads to decouple value propagation and to make communication asynchronous -> should be done in Node?
    103106    }
    104     protected void OutputPort_ToStringChanged(object sender, EventArgs e) {
     107    protected void OutputPort_PathChanged(object sender, EventArgs e) {
    105108      OnOutputPortChanged();
    106109    }
Note: See TracChangeset for help on using the changeset viewer.