void GPSTrackedShapeAdded(ShapeInformation info, DrawAction sender) { // wir brauchen den Service ja nur einmal in Anspruch nehmen sender.ShapeAdded -= GPSTrackedShapeAdded; this.gpsTrackingList.AddLast(info); }
public void removeTransPortComplexShapePoint(int index,ShapeInformation shpInfo,LayerType lType) { if (shpInfo.iShapeInf != null) { if ((shpInfo.iShapeInf).getPointListSize() > 0) { shpInfo.iShapeInf.RemovePoint(index); if (lType == LayerType.PolygonCanvas) if (shpInfo.iShapeInf.getPointListSize() > 0) { shpInfo.quadTreePosItemInf.changePosAndSize( new Vector2(shpInfo.iShapeInf.CenterX * firstScale, shpInfo.iShapeInf.CenterY * firstScale), new Vector2(shpInfo.iShapeInf.Width * firstScale, shpInfo.iShapeInf.Height * firstScale)); //new Vector2(shpInfo.iShapeInf.Width * firstScale + // Should we consider the pointsize here? // 2 * transportPolygonLayer.BbWidthMargin, //shpInfo.iShapeInf.Height * firstScale + // 2 * transportPolygonLayer.BbHeightMargin)); } else { shpInfo.quadTreePosItemInf.Delete(); /* shpInfo.quadTreePosItemInf.changePosAndSize( new Vector2(-1,-1), new Vector2(1,1)); */ } else if (lType == LayerType.PolylineCanvas) if (shpInfo.iShapeInf.getPointListSize() > 0) { shpInfo.quadTreePosItemInf.changePosAndSize( new Vector2(shpInfo.iShapeInf.CenterX * firstScale, shpInfo.iShapeInf.CenterY * firstScale), new Vector2(shpInfo.iShapeInf.Width * firstScale, shpInfo.iShapeInf.Height * firstScale)); //new Vector2(shpInfo.iShapeInf.Width * firstScale + // Should we consider the pointsize here? // 2 * transportPolylineLayer.BbWidthMargin, //shpInfo.iShapeInf.Height * firstScale + // 2 * transportPolylineLayer.BbHeightMargin)); } else shpInfo.quadTreePosItemInf.Delete(); } } }
public void setDrawShapeInformation(DrawShapeInformation drawEnum,ShapeInformation shpInfo,LayerType lType) { this.currentlyEditedIShape = shpInfo.iShapeInf; this.selectedTransportQuadtreeItem = shpInfo.quadTreePosItemInf; this.DrawInfChanged(drawEnum,lType); }
public void RemoveTransportComplexShape(ShapeInformation shpInfo,LayerType lType) { if (shpInfo.quadTreePosItemInf.Parent.Type == ShapeLib.ShapeType.PolyLine) transportPolylineLayer.removePolyline(shpInfo.quadTreePosItemInf.Parent); else if (shpInfo.quadTreePosItemInf.Parent.Type == ShapeLib.ShapeType.PolyLine) transportPolygonLayer.removePolygon(shpInfo.quadTreePosItemInf.Parent); shpInfo.quadTreePosItemInf.Delete(); this.setDrawShapeInformation(DrawShapeInformation.EditStopped, shpInfo, lType); selectedTransportQuadtreeItem = null; }