Changeset 2474 for trunk/sources/HeuristicLab.GP/3.4
- Timestamp:
- 11/10/09 16:50:26 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.GP/3.4
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.GP/3.4/GPOperatorGroup.cs
r1914 r2474 30 30 using HeuristicLab.Constraints; 31 31 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 32 using HeuristicLab.Common; 32 33 33 34 namespace HeuristicLab.GP { … … 207 208 } 208 209 209 public event EventHandler OperatorAdded;210 public event EventHandler OperatorRemoved;210 public event EventHandler<EventArgs<IOperator>> OperatorAdded; 211 public event EventHandler<EventArgs<IOperator>> OperatorRemoved; 211 212 212 213 protected virtual void OnOperatorAdded(IOperator op) { 213 214 if(OperatorAdded != null) { 214 OperatorAdded(this, new OperatorEventArgs(op));215 OperatorAdded(this, new EventArgs<IOperator>(op)); 215 216 } 216 217 } 217 218 protected virtual void OnOperatorRemoved(IOperator op) { 218 219 if(OperatorRemoved != null) { 219 OperatorRemoved(this, new OperatorEventArgs(op)); 220 } 221 } 222 } 223 224 internal class OperatorEventArgs : EventArgs { 225 public IOperator op; 226 227 public OperatorEventArgs(IOperator op) { 228 this.op = op; 220 OperatorRemoved(this, new EventArgs<IOperator>(op)); 221 } 229 222 } 230 223 } -
trunk/sources/HeuristicLab.GP/3.4/GPOperatorLibraryEditor.cs
r1529 r2474 33 33 using HeuristicLab.Operators; 34 34 using HeuristicLab.Random; 35 using HeuristicLab.Common; 35 36 36 37 namespace HeuristicLab.GP { … … 47 48 operatorLibraryEditor.OperatorLibrary = library; 48 49 49 library.GPOperatorGroup.OperatorAdded += new EventHandler (GPOperatorLibraryView_OperatorAdded);50 library.GPOperatorGroup.OperatorRemoved += new EventHandler (GPOperatorGroup_OperatorRemoved);50 library.GPOperatorGroup.OperatorAdded += new EventHandler<EventArgs<IOperator>>(GPOperatorLibraryView_OperatorAdded); 51 library.GPOperatorGroup.OperatorRemoved += new EventHandler<EventArgs<IOperator>>(GPOperatorGroup_OperatorRemoved); 51 52 52 53 mutationVariableView.Enabled = false; … … 72 73 73 74 74 private void GPOperatorLibraryView_OperatorAdded(object sender, EventArgs e) {75 IOperator op = ((OperatorEventArgs)e).op;75 private void GPOperatorLibraryView_OperatorAdded(object sender, EventArgs<IOperator> e) { 76 IOperator op = e.Value; 76 77 if(op.GetVariable(FunctionBase.MANIPULATION) != null) { 77 78 ListViewItem operatorMutationItem = new ListViewItem(); … … 113 114 114 115 115 private void GPOperatorGroup_OperatorRemoved(object sender, EventArgs e) {116 IOperator op = ((OperatorEventArgs)e).op;116 private void GPOperatorGroup_OperatorRemoved(object sender, EventArgs<IOperator> e) { 117 IOperator op = e.Value; 117 118 118 119 foreach(ListViewItem item in mutationListView.Items) { -
trunk/sources/HeuristicLab.GP/3.4/HeuristicLab.GP-3.4.csproj
r1914 r2474 128 128 </ItemGroup> 129 129 <ItemGroup> 130 <ProjectReference Include="..\..\HeuristicLab.Common\3.2\HeuristicLab.Common-3.2.csproj"> 131 <Project>{1FC004FC-59AF-4249-B1B6-FF25873A20E4}</Project> 132 <Name>HeuristicLab.Common-3.2</Name> 133 </ProjectReference> 130 134 <ProjectReference Include="..\..\HeuristicLab.Constraints\3.3\HeuristicLab.Constraints-3.3.csproj"> 131 135 <Project>{19C1E42A-4B48-4EFD-B697-899016F1C198}</Project> -
trunk/sources/HeuristicLab.GP/3.4/HeuristicLabGPPlugin.cs
r1914 r2474 28 28 [ClassInfo(Name = "HeuristicLab.GP-3.4")] 29 29 [PluginFile(Filename = "HeuristicLab.GP-3.4.dll", Filetype = PluginFileType.Assembly)] 30 [Dependency(Dependency = "HeuristicLab.Common-3.2")] 30 31 [Dependency(Dependency = "HeuristicLab.Constraints-3.3")] 31 32 [Dependency(Dependency = "HeuristicLab.Core-3.3")]
Note: See TracChangeset
for help on using the changeset viewer.