Changeset 9363 for branches/OaaS/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/Ghosts.cs
- Timestamp:
- 04/16/13 13:13:41 (11 years ago)
- Location:
- branches/OaaS
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OaaS
- Property svn:ignore
-
old new 21 21 protoc.exe 22 22 _ReSharper.HeuristicLab 3.3 Tests 23 Google.ProtocolBuffers-2.4.1.473.dll 23 24 packages
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/OaaS/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/Ghosts.cs
r4068 r9363 35 35 namespace HeuristicLab.Netron { 36 36 internal static class GhostsFactory { 37 private static RectGhost mRectangular;38 private static LineGhost mLine;39 private static EllipticGhost mEllipse;40 private static MultiLineGhost mMultiLine;41 private static CurvedLineGhost mCurvedLine;42 private static PolygonGhost mPolygon;43 44 private static IView mView;45 public static IView View {46 get { return mView; }47 set { mView = value; }48 }49 50 37 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] 51 public static IGhost GetGhost(object pars, GhostTypes type ) {38 public static IGhost GetGhost(object pars, GhostTypes type, IView View) { 52 39 Point[] points; 53 40 switch (type) { 54 41 case GhostTypes.Rectangle: 55 if (mRectangular == null) 56 mRectangular = new RectGhost(View); 42 var mRectangular = new RectGhost(View); 57 43 points = (Point[])pars; 58 44 mRectangular.Start = points[0]; … … 60 46 return mRectangular; 61 47 case GhostTypes.Ellipse: 62 if (mEllipse == null) 63 mEllipse = new EllipticGhost(View); 48 var mEllipse = new EllipticGhost(View); 64 49 points = (Point[])pars; 65 50 mEllipse.Start = points[0]; … … 67 52 return mEllipse; 68 53 case GhostTypes.Line: 69 if (mLine == null) 70 mLine = new LineGhost(View); 54 var mLine = new LineGhost(View); 71 55 points = (Point[])pars; 72 56 mLine.Start = points[0]; … … 74 58 return mLine; 75 59 case GhostTypes.MultiLine: 76 if (mMultiLine == null) 77 mMultiLine = new MultiLineGhost(View); 60 var mMultiLine = new MultiLineGhost(View); 78 61 points = (Point[])pars; 79 62 mMultiLine.Points = points; 80 63 return mMultiLine; 81 64 case GhostTypes.CurvedLine: 82 if (mCurvedLine == null) 83 mCurvedLine = new CurvedLineGhost(View); 65 var mCurvedLine = new CurvedLineGhost(View); 84 66 points = (Point[])pars; 85 67 mCurvedLine.Points = points; 86 68 return mCurvedLine; 87 69 case GhostTypes.Polygon: 88 if (mPolygon == null) 89 mPolygon = new PolygonGhost(View); 70 var mPolygon = new PolygonGhost(View); 90 71 points = (Point[])pars; 91 72 mPolygon.Points = points;
Note: See TracChangeset
for help on using the changeset viewer.