Changeset 3212
- Timestamp:
- 03/25/10 03:05:28 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Operators/3.3/MultipleCallsOperator.cs
r3211 r3212 35 35 [StorableClass] 36 36 public abstract class MultipleCallsOperator : SingleSuccessorOperator { 37 private List< OperatorParameter> operatorParameters;37 private List<IValueParameter<IOperator>> operatorParameters; 38 38 39 39 private OperatorList operators; … … 56 56 [StorableHook(HookType.AfterDeserialization)] 57 57 private void Initialize() { 58 operatorParameters = new List< OperatorParameter>();58 operatorParameters = new List<IValueParameter<IOperator>>(); 59 59 for (int i = 0; i < Operators.Count; i++) { 60 OperatorParameter opParam = (OperatorParameter)Parameters[i.ToString()];60 IValueParameter<IOperator> opParam = (IValueParameter<IOperator>)Parameters[i.ToString()]; 61 61 operatorParameters.Add(opParam); 62 62 opParam.ValueChanged += new EventHandler(opParam_ValueChanged); … … 72 72 73 73 private void UpdateOperatorParameters() { 74 foreach ( OperatorParameteropParam in operatorParameters) {74 foreach (IValueParameter<IOperator> opParam in operatorParameters) { 75 75 opParam.ValueChanged -= new EventHandler(opParam_ValueChanged); 76 76 Parameters.Remove(opParam.Name); … … 78 78 operatorParameters.Clear(); 79 79 for (int i = 0; i < Operators.Count; i++) { 80 OperatorParameter opParam = new OperatorParameter(i.ToString(), string.Empty, Operators[i]);80 IValueParameter<IOperator> opParam = new ValueParameter<IOperator>(i.ToString(), string.Empty, Operators[i]); 81 81 opParam.ValueChanged += new EventHandler(opParam_ValueChanged); 82 82 Parameters.Add(opParam); … … 118 118 } 119 119 private void opParam_ValueChanged(object sender, EventArgs e) { 120 OperatorParameter opParam = (OperatorParameter)sender;120 IValueParameter<IOperator> opParam = (IValueParameter<IOperator>)sender; 121 121 operators[operatorParameters.IndexOf(opParam)] = opParam.Value; 122 122 }
Note: See TracChangeset
for help on using the changeset viewer.