Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/10/09 16:50:26 (15 years ago)
Author:
swagner
Message:

Implemented generic EventArgs (#796)

Location:
trunk/sources/HeuristicLab.GP.Algorithms/3.2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.GP.Algorithms/3.2/HeuristicLab.GP.Algorithms-3.2.csproj

    r2341 r2474  
    103103  </ItemGroup>
    104104  <ItemGroup>
     105    <ProjectReference Include="..\..\HeuristicLab.Common\3.2\HeuristicLab.Common-3.2.csproj">
     106      <Project>{1FC004FC-59AF-4249-B1B6-FF25873A20E4}</Project>
     107      <Name>HeuristicLab.Common-3.2</Name>
     108    </ProjectReference>
    105109    <ProjectReference Include="..\..\HeuristicLab.Core\3.2\HeuristicLab.Core-3.2.csproj">
    106110      <Project>{F43B59AB-2B8C-4570-BC1E-15592086517C}</Project>
  • trunk/sources/HeuristicLab.GP.Algorithms/3.2/HeuristicLabGpAlgorithmsPlugin.cs

    r2341 r2474  
    2828  [ClassInfo(Name = "HeuristicLab.GP.Algorithms-3.2")]
    2929  [PluginFile(Filename = "HeuristicLab.GP.Algorithms-3.2.dll", Filetype = PluginFileType.Assembly)]
     30  [Dependency(Dependency = "HeuristicLab.Common-3.2")]
    3031  public class HeuristicLabGpAlgorithmsPlugin : PluginBase {
    3132  }
  • trunk/sources/HeuristicLab.GP.Algorithms/3.2/OffSpringSelectionGpEditor.cs

    r2341 r2474  
    2323using System.Windows.Forms;
    2424using HeuristicLab.PluginInfrastructure;
     25using HeuristicLab.Common;
    2526using HeuristicLab.Core;
    2627
     
    4344
    4445    protected override void RemoveItemEvents() {
    45       OffspringSelectionGP.Engine.ExceptionOccurred -= new EventHandler<ExceptionEventArgs>(Engine_ExceptionOccurred);
     46      OffspringSelectionGP.Engine.ExceptionOccurred -= new EventHandler<EventArgs<Exception>>(Engine_ExceptionOccurred);
    4647      OffspringSelectionGP.Engine.Finished -= new EventHandler(Engine_Finished);
    4748      scopeView.Scope = null;
     
    5152    protected override void AddItemEvents() {
    5253      base.AddItemEvents();
    53       OffspringSelectionGP.Engine.ExceptionOccurred += new EventHandler<ExceptionEventArgs>(Engine_ExceptionOccurred);
     54      OffspringSelectionGP.Engine.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(Engine_ExceptionOccurred);
    5455      OffspringSelectionGP.Engine.Finished += new EventHandler(Engine_Finished);
    5556      SetDataBinding();
     
    111112
    112113    #region Engine Events
    113     private delegate void OnExceptionEventDelegate(object sender, ExceptionEventArgs e);
    114     private void Engine_ExceptionOccurred(object sender, ExceptionEventArgs e) {
     114    private delegate void OnExceptionEventDelegate(object sender, EventArgs<Exception> e);
     115    private void Engine_ExceptionOccurred(object sender, EventArgs<Exception> e) {
    115116      if (InvokeRequired)
    116117        Invoke(new OnExceptionEventDelegate(Engine_ExceptionOccurred), sender, e);
    117118      else
    118         Auxiliary.ShowErrorMessageBox(e.Exception);
     119        Auxiliary.ShowErrorMessageBox(e.Value);
    119120    }
    120121    private void Engine_Finished(object sender, EventArgs e) {
  • trunk/sources/HeuristicLab.GP.Algorithms/3.2/StandardGpEditor.cs

    r2341 r2474  
    2222using System;
    2323using System.Windows.Forms;
     24using HeuristicLab.Common;
    2425using HeuristicLab.Core;
    2526using HeuristicLab.PluginInfrastructure;
     
    4344
    4445    protected override void RemoveItemEvents() {
    45       StandardGP.Engine.ExceptionOccurred -= new EventHandler<ExceptionEventArgs>(Engine_ExceptionOccurred);
     46      StandardGP.Engine.ExceptionOccurred -= new EventHandler<EventArgs<Exception>>(Engine_ExceptionOccurred);
    4647      StandardGP.Engine.Finished -= new EventHandler(Engine_Finished);
    4748      scopeView.Scope = null;
     
    5051    protected override void AddItemEvents() {
    5152      base.AddItemEvents();
    52       StandardGP.Engine.ExceptionOccurred += new EventHandler<ExceptionEventArgs>(Engine_ExceptionOccurred);
     53      StandardGP.Engine.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(Engine_ExceptionOccurred);
    5354      StandardGP.Engine.Finished += new EventHandler(Engine_Finished);
    5455      SetDataBinding();
     
    109110
    110111    #region Engine Events
    111     private delegate void OnExceptionEventDelegate(object sender, ExceptionEventArgs e);
    112     private void Engine_ExceptionOccurred(object sender, ExceptionEventArgs e) {
     112    private delegate void OnExceptionEventDelegate(object sender, EventArgs<Exception> e);
     113    private void Engine_ExceptionOccurred(object sender, EventArgs<Exception> e) {
    113114      if (InvokeRequired)
    114115        Invoke(new OnExceptionEventDelegate(Engine_ExceptionOccurred), sender, e);
    115116      else
    116         Auxiliary.ShowErrorMessageBox(e.Exception);
     117        Auxiliary.ShowErrorMessageBox(e.Value);
    117118    }
    118119    private void Engine_Finished(object sender, EventArgs e) {
Note: See TracChangeset for help on using the changeset viewer.