Пример #1
0
        void GPSTrackedShapeAdded(ShapeInformation info, DrawAction sender)
        {
            // wir brauchen den Service ja nur einmal in Anspruch nehmen
            sender.ShapeAdded -= GPSTrackedShapeAdded;

            this.gpsTrackingList.AddLast(info);
        }
Пример #2
0
        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();
                }
            }
        }
Пример #3
0
        public void setDrawShapeInformation(DrawShapeInformation drawEnum,ShapeInformation shpInfo,LayerType lType)
        {
            this.currentlyEditedIShape = shpInfo.iShapeInf;
            this.selectedTransportQuadtreeItem = shpInfo.quadTreePosItemInf;

            this.DrawInfChanged(drawEnum,lType);
        }
Пример #4
0
        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;
        }