Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/05/10 03:07:12 (15 years ago)
Author:
swagner
Message:

Operator architecture refactoring (#95)

  • replaced Changed in IItem by ToStringChanged
Location:
trunk/sources/HeuristicLab.Optimization/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization/3.3/Algorithm.cs

    r2882 r2932  
    112112      if (ProblemChanged != null)
    113113        ProblemChanged(this, EventArgs.Empty);
    114       OnChanged();
    115114    }
    116115    public event EventHandler ExecutionTimeChanged;
     
    118117      if (ExecutionTimeChanged != null)
    119118        ExecutionTimeChanged(this, EventArgs.Empty);
    120       OnChanged();
    121119    }
    122120    public event EventHandler Prepared;
     
    124122      if (Prepared != null)
    125123        Prepared(this, EventArgs.Empty);
    126       OnChanged();
    127124    }
    128125    public event EventHandler Started;
     
    130127      if (Started != null)
    131128        Started(this, EventArgs.Empty);
    132       OnChanged();
    133129    }
    134130    public event EventHandler Stopped;
     
    136132      if (Stopped != null)
    137133        Stopped(this, EventArgs.Empty);
    138       OnChanged();
    139134    }
    140135    protected virtual void OnCanceledChanged() { }
     
    147142      problem.SolutionCreatorChanged -= new EventHandler(Problem_SolutionCreatorChanged);
    148143      problem.EvaluatorChanged -= new EventHandler(Problem_EvaluatorChanged);
    149       problem.Changed -= new ChangedEventHandler(Problem_Changed);
    150144    }
    151145    protected virtual void RegisterProblemEvents() {
    152146      problem.SolutionCreatorChanged += new EventHandler(Problem_SolutionCreatorChanged);
    153147      problem.EvaluatorChanged += new EventHandler(Problem_EvaluatorChanged);
    154       problem.Changed += new ChangedEventHandler(Problem_Changed);
    155148    }
    156149
    157150    protected virtual void Problem_SolutionCreatorChanged(object sender, EventArgs e) { }
    158151    protected virtual void Problem_EvaluatorChanged(object sender, EventArgs e) { }
    159     private void Problem_Changed(object sender, ChangedEventArgs e) {
    160       OnChanged(e);
    161     }
    162152    #endregion
    163153  }
  • trunk/sources/HeuristicLab.Optimization/3.3/EngineAlgorithm.cs

    r2924 r2932  
    195195      if (EngineChanged != null)
    196196        EngineChanged(this, EventArgs.Empty);
    197       OnChanged();
    198197    }
    199198
     
    202201    }
    203202    private void RegisterEngineEvents() {
    204       Engine.Changed += new ChangedEventHandler(Engine_Changed);
    205203      Engine.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(Engine_ExceptionOccurred);
    206204      Engine.ExecutionTimeChanged += new EventHandler(Engine_ExecutionTimeChanged);
     
    208206    }
    209207    private void DeregisterEngineEvents() {
    210       Engine.Changed -= new ChangedEventHandler(Engine_Changed);
    211208      Engine.ExceptionOccurred -= new EventHandler<EventArgs<Exception>>(Engine_ExceptionOccurred);
    212209      Engine.ExecutionTimeChanged -= new EventHandler(Engine_ExecutionTimeChanged);
     
    223220      OnStopped();
    224221    }
    225     private void Engine_Changed(object sender, ChangedEventArgs e) {
    226       OnChanged(e);
    227     }
    228222  }
    229223}
Note: See TracChangeset for help on using the changeset viewer.