Changeset 9181 for trunk/sources
- Timestamp:
- 01/22/13 22:57:09 (12 years ago)
- Location:
- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446
- Files:
-
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/Controller.cs
r8000 r9181 45 45 46 46 public override bool ActivateTextEditor(ITextProvider textProvider) { 47 TextEditor.GetEditor(textProvider); 48 TextEditor.Show(); 49 return true; 47 return false; 50 48 } 51 49 -
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/Ghosts.cs
r4068 r9181 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; -
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446.csproj
r8600 r9181 122 122 <Compile Include="Plugin.cs" /> 123 123 <Compile Include="Properties\AssemblyInfo.cs" /> 124 <Compile Include="TextEditor.cs" />125 124 <Compile Include="View.cs" /> 126 125 </ItemGroup> … … 171 170 --> 172 171 <PropertyGroup> 173 <PreBuildEvent>172 <PreBuildEvent> 174 173 </PreBuildEvent> 175 174 </PropertyGroup> -
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/NetronVisualization.cs
r7259 r9181 49 49 this.AttachToDocument(Document); 50 50 this.Controller.View = View; 51 TextEditor.Init(this);52 51 53 52 View.OnCursorChange += new EventHandler<CursorEventArgs>(mView_OnCursorChange); -
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/View.cs
r4068 r9181 42 42 this.HorizontalRuler.Visible = true; 43 43 this.VerticalRuler.Visible = true; 44 GhostsFactory.View = this;45 44 } 46 45 … … 102 101 Ghost = GhostsFactory.GetGhost( 103 102 new Point[] { ltPoint, rbPoint }, 104 GhostTypes.Ellipse );103 GhostTypes.Ellipse, this); 105 104 } 106 105 public override void PaintGhostRectangle( … … 112 111 Ghost = GhostsFactory.GetGhost( 113 112 new Point[] { ltPoint, rbPoint }, 114 GhostTypes.Rectangle );113 GhostTypes.Rectangle, this); 115 114 } 116 115 public override void PaintAntsRectangle( … … 129 128 Ghost = GhostsFactory.GetGhost( 130 129 new Point[] { ltPoint, rbPoint }, 131 GhostTypes.Line );130 GhostTypes.Line, this); 132 131 } 133 132 public override void PaintGhostLine( … … 139 138 switch (curveType) { 140 139 case MultiPointType.Straight: 141 Ghost = GhostsFactory.GetGhost(points, GhostTypes.MultiLine );140 Ghost = GhostsFactory.GetGhost(points, GhostTypes.MultiLine, this); 142 141 break; 143 142 case MultiPointType.Polygon: 144 Ghost = GhostsFactory.GetGhost(points, GhostTypes.Polygon );143 Ghost = GhostsFactory.GetGhost(points, GhostTypes.Polygon, this); 145 144 break; 146 145 case MultiPointType.Curve: 147 Ghost = GhostsFactory.GetGhost(points, GhostTypes.CurvedLine );146 Ghost = GhostsFactory.GetGhost(points, GhostTypes.CurvedLine, this); 148 147 break; 149 148
Note: See TracChangeset
for help on using the changeset viewer.