- Timestamp:
- 04/23/11 10:00:31 (14 years ago)
- Location:
- branches/histogram
- Files:
-
- 2 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/histogram
- Property svn:ignore
-
old new 10 10 protoc.exe 11 11 HeuristicLab 3.3.5.1.ReSharper.user 12 *.psess 13 *.vsp
-
- Property svn:mergeinfo changed
/trunk/sources merged: 6026,6029-6031,6035-6037,6042-6045
- Property svn:ignore
-
branches/histogram/HeuristicLab.Operators.Views.GraphVisualization/3.3/General/IShapeInfo.cs
r5445 r6046 24 24 using System.Drawing; 25 25 using HeuristicLab.Common; 26 using Netron.Diagramming.Core;27 26 28 27 namespace HeuristicLab.Operators.Views.GraphVisualization { 29 28 public interface IShapeInfo : IDeepCloneable { 30 Type ShapeType { get; }31 29 Point Location { get; set; } 32 33 IShape CreateShape();34 30 IEnumerable<string> Connectors { get; } 35 void UpdateShape(IShape shape);36 void UpdateShapeInfo(IShape shape);37 31 38 32 event EventHandler Changed; -
branches/histogram/HeuristicLab.Operators.Views.GraphVisualization/3.3/General/ShapeInfo.cs
r5445 r6046 25 25 using HeuristicLab.Common; 26 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 using Netron.Diagramming.Core;28 27 29 28 namespace HeuristicLab.Operators.Views.GraphVisualization { … … 34 33 protected ShapeInfo(ShapeInfo original, Cloner cloner) 35 34 : base(original, cloner) { 36 shapeType = original.shapeType;37 35 location = original.location; 38 36 } 39 37 40 protected ShapeInfo(Type shapeType) { 41 if (!typeof(IShape).IsAssignableFrom(shapeType)) 42 throw new ArgumentException("The passed shape type " + shapeType + " must be derived from IShape."); 43 this.shapeType = shapeType; 44 } 45 46 [Storable] 47 private Type shapeType; 48 public Type ShapeType { 49 get { return this.shapeType; } 50 } 38 protected ShapeInfo() : base() { } 51 39 52 40 [Storable] … … 69 57 if (handler != null) this.Changed(this, EventArgs.Empty); 70 58 } 71 72 public virtual IShape CreateShape() {73 IShape shape = (IShape)Activator.CreateInstance(this.shapeType);74 shape.Tag = this;75 shape.Location = this.Location;76 return shape;77 }78 79 public virtual void UpdateShape(IShape shape) {80 shape.Location = this.Location;81 }82 83 public virtual void UpdateShapeInfo(IShape shape) {84 this.Location = shape.Location;85 }86 59 } 87 60 }
Note: See TracChangeset
for help on using the changeset viewer.