Changeset 11401 for branches/OptimizationNetworks
- Timestamp:
- 09/29/14 02:32:06 (10 years ago)
- Location:
- branches/OptimizationNetworks
- Files:
-
- 14 added
- 2 deleted
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OptimizationNetworks/HeuristicLab.Modeler/3.3/IModelerUserInterfaceItemProvider.cs
r11063 r11401 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Modeler/3.3/ModelerDockingMainForm.Designer.cs
r11063 r11401 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Modeler/3.3/ModelerDockingMainForm.cs
r11063 r11401 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Modeler/3.3/Plugin.cs.frame
r11063 r11401 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Modeler/3.3/Properties/AssemblyInfo.cs.frame
r11063 r11401 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 32 32 [assembly: AssemblyCompany("")] 33 33 [assembly: AssemblyProduct("HeuristicLab")] 34 [assembly: AssemblyCopyright("(c) 2002-201 3HEAL")]34 [assembly: AssemblyCopyright("(c) 2002-2014 HEAL")] 35 35 [assembly: AssemblyTrademark("")] 36 36 [assembly: AssemblyCulture("")] -
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks.Views/3.3/Plugin.cs.frame
r11069 r11401 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks.Views/3.3/Properties/AssemblyInfo.cs.frame
r11069 r11401 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 32 32 [assembly: AssemblyCompany("")] 33 33 [assembly: AssemblyProduct("HeuristicLab")] 34 [assembly: AssemblyCopyright("(c) 2002-201 3HEAL")]34 [assembly: AssemblyCopyright("(c) 2002-2014 HEAL")] 35 35 [assembly: AssemblyTrademark("")] 36 36 [assembly: AssemblyCulture("")] -
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/HeuristicLab.Optimization.Networks-3.3.csproj
r11177 r11401 48 48 </ItemGroup> 49 49 <ItemGroup> 50 <Compile Include="Entity.cs" /> 51 <Compile Include="IEntity.cs" /> 50 <Compile Include="EventArgs.cs" /> 51 <Compile Include="IInputOutputPort.cs" /> 52 <Compile Include="InputOutputPort.cs" /> 53 <Compile Include="IOutputInputPort.cs" /> 54 <Compile Include="OutputInputPort.cs" /> 55 <Compile Include="OutputPort.cs" /> 56 <Compile Include="IOutputPort.cs" /> 57 <Compile Include="INetwork.cs" /> 58 <Compile Include="IInputPort.cs" /> 52 59 <Compile Include="IPort.cs" /> 60 <Compile Include="INode.cs" /> 61 <Compile Include="Network.cs" /> 62 <Compile Include="InputPort.cs" /> 63 <Compile Include="NodeCollection.cs" /> 53 64 <Compile Include="PortCollection.cs" /> 54 65 <Compile Include="Port.cs" /> 55 66 <Compile Include="Plugin.cs" /> 56 67 <Compile Include="Properties\AssemblyInfo.cs" /> 68 <Compile Include="Node.cs" /> 57 69 </ItemGroup> 58 70 <ItemGroup> -
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/IPort.cs
r11177 r11401 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using HeuristicLab.Core; 22 23 using System; 23 using HeuristicLab.Core;24 24 25 25 namespace HeuristicLab.Optimization.Networks { 26 26 public interface IPort : INamedItem { 27 object Value { get; set;}27 object Value { get; } 28 28 29 29 event EventHandler ValueChanged; … … 31 31 32 32 public interface IPort<T> : IPort where T : class, IItem { 33 new T Value { get; set;}33 new T Value { get; } 34 34 } 35 35 } -
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Plugin.cs.frame
r11177 r11401 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Port.cs
r11177 r11401 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using System;23 using System.Drawing;24 22 using HeuristicLab.Common; 25 23 using HeuristicLab.Core; 26 24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 25 using System; 26 using System.Drawing; 27 27 28 28 namespace HeuristicLab.Optimization.Networks { 29 [Item("Port", "A port of an optimization network entity.")]29 [Item("Port", "Abstract base class for ports of an optimization network node.")] 30 30 [StorableClass] 31 public class Port<T> : NamedItem, IPort<T> where T : class, IItem { 32 public override Image ItemImage { 33 get { 34 if (value != null) return value.ItemImage; 35 else return base.ItemImage; 36 } 31 public abstract class Port<T> : NamedItem, IPort<T> where T : class, IItem { 32 public static new Image StaticItemImage { 33 get { return HeuristicLab.Common.Resources.VSImageLibrary.Field; } 37 34 } 38 35 39 36 [Storable] 40 37 protected T value; 41 public T Value {38 public virtual T Value { 42 39 get { return value; } 43 set {40 protected set { 44 41 if (value != this.value) { 45 42 DeregisterValueEvents(); … … 52 49 object IPort.Value { 53 50 get { return Value; } 54 set {55 T val = value as T;56 if ((value != null) && (val == null))57 throw new InvalidOperationException(58 string.Format("Type mismatch. Value is not a \"{0}\".",59 typeof(T).GetPrettyName())60 );61 Value = val;62 }63 51 } 64 52 … … 70 58 RegisterValueEvents(); 71 59 } 72 public Port() : base("Anonymous") { } 73 public Port(string name) : base(name) { } 74 public Port(string name, string description) : base(name, description) { } 75 public Port(string name, T value) 76 : base(name) { 77 this.value = value; 78 RegisterValueEvents(); 79 } 80 public Port(string name, string description, T value) 81 : base(name, description) { 82 this.value = value; 83 RegisterValueEvents(); 84 } 60 protected Port() : base("Port") { } 61 protected Port(string name) : base(name) { } 62 protected Port(string name, string description) : base(name, description) { } 85 63 86 64 [StorableHook(HookType.AfterDeserialization)] 87 65 private void AfterDeserialization() { 88 66 RegisterValueEvents(); 89 }90 91 public override IDeepCloneable Clone(Cloner cloner) {92 return new Port<T>(this, cloner);93 67 } 94 68 … … 101 75 EventHandler handler = ValueChanged; 102 76 if (handler != null) handler(this, EventArgs.Empty); 103 OnItemImageChanged();104 77 OnToStringChanged(); 105 78 } 106 79 107 pr ivatevoid RegisterValueEvents() {80 protected virtual void RegisterValueEvents() { 108 81 if (value != null) { 109 value.ItemImageChanged += new EventHandler(Value_ItemImageChanged);110 82 value.ToStringChanged += new EventHandler(Value_ToStringChanged); 111 83 } 112 84 } 113 pr ivatevoid DeregisterValueEvents() {85 protected virtual void DeregisterValueEvents() { 114 86 if (value != null) { 115 value.ItemImageChanged -= new EventHandler(Value_ItemImageChanged);116 87 value.ToStringChanged -= new EventHandler(Value_ToStringChanged); 117 88 } 118 }119 private void Value_ItemImageChanged(object sender, EventArgs e) {120 OnItemImageChanged();121 89 } 122 90 private void Value_ToStringChanged(object sender, EventArgs e) { -
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/PortCollection.cs
r11177 r11401 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Properties/AssemblyInfo.cs.frame
r11063 r11401 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 32 32 [assembly: AssemblyCompany("")] 33 33 [assembly: AssemblyProduct("HeuristicLab")] 34 [assembly: AssemblyCopyright("(c) 2002-201 3HEAL")]34 [assembly: AssemblyCopyright("(c) 2002-2014 HEAL")] 35 35 [assembly: AssemblyTrademark("")] 36 36 [assembly: AssemblyCulture("")]
Note: See TracChangeset
for help on using the changeset viewer.