Changeset 2893 for trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/Model/GraphVisualizationInfo.cs
- Timestamp:
- 03/01/10 11:45:00 (14 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/Model/GraphVisualizationInfo.cs
r2882 r2893 30 30 31 31 namespace HeuristicLab.Operators.Views.GraphVisualization { 32 public sealed class OperatorGraphVisualizationInfo : DeepCloneable {32 public sealed class GraphVisualizationInfo : DeepCloneable { 33 33 private BidirectionalLookup<IOperator, IShapeInfo> shapeInfoMapping; 34 34 private BidirectionalLookup<IOperator, IObservableKeyedCollection<string, IParameter>> operatorParameterCollectionMapping; 35 35 private Dictionary<IValueParameter<IOperator>, IOperator> parameterOperatorMapping; 36 36 37 private OperatorGraphVisualizationInfo() {37 private GraphVisualizationInfo() { 38 38 this.shapeInfoMapping = new BidirectionalLookup<IOperator, IShapeInfo>(); 39 39 this.operatorParameterCollectionMapping = new BidirectionalLookup<IOperator, IObservableKeyedCollection<string, IParameter>>(); … … 44 44 } 45 45 46 public OperatorGraphVisualizationInfo(OperatorGraph operatorGraph)46 public GraphVisualizationInfo(OperatorGraph operatorGraph) 47 47 : this() { 48 48 this.operatorGraph = operatorGraph; … … 89 89 return this.shapeInfoMapping.GetByFirst(op); 90 90 } 91 set { 92 if (value == null) 93 this.OperatorGraph.InitialOperator = null; 94 else 95 this.OperatorGraph.InitialOperator = this.shapeInfoMapping.GetBySecond(value); 96 } 91 97 } 92 98 … … 102 108 public IEnumerable<IShapeInfo> ShapeInfos { 103 109 get { return this.shapeInfos; } 110 } 111 public IOperator GetOperatorForShapeInfo(IShapeInfo shapeInfo) { 112 return this.shapeInfoMapping.GetBySecond(shapeInfo); 104 113 } 105 114 … … 182 191 this.AddOperator(op); 183 192 } 184 185 193 private void Operators_ItemsRemoved(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IOperator> e) { 186 194 foreach (IOperator op in e.Items) 187 195 this.RemoveOperator(op); 188 196 } 189 190 197 private void Operators_CollectionReset(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IOperator> e) { 191 198 foreach (IOperator op in e.OldItems) … … 284 291 } 285 292 286 287 293 private void RegisterOperatorParameterEvents(IValueParameter<IOperator> opParam) { 288 294 opParam.ValueChanged += new EventHandler(opParam_ValueChanged);
Note: See TracChangeset
for help on using the changeset viewer.