コード例 #1
0
ファイル: CGPSLine.cs プロジェクト: ykebaili/Timos
        //-----------------------------------------------------------------
        public IEnumerable <CMoveablePoint> GetMoveablePoints(CMapDatabase database)
        {
            List <CMoveablePoint> lstPoints = new List <CMoveablePoint>();
            CGPSLineTrace         trace     = DetailLigne;

            lstPoints.Add(new CMoveablePointForLineStart(database, this));
            foreach (CGPSLineSegment segment in trace.Segments)
            {
                lstPoints.Add(new CMoveablePointForLineSegment(database, this, segment));
            }
            return(lstPoints.AsReadOnly());
        }
コード例 #2
0
ファイル: CGPSLine.cs プロジェクト: ykebaili/Timos
        //---------------------------------------------------------------------------
        public IEnumerable <IMapItem> FindMapItems(CMapDatabase database)
        {
            CGPSLineTrace   trace    = DetailLigne;
            List <IMapItem> lstPaths = new List <IMapItem>();

            foreach (CGPSLineSegment segment in trace.Segments)
            {
                CMapItemPath path = database.FindItemFromTag(segment) as CMapItemPath;
                if (path != null)
                {
                    lstPaths.Add(path);
                }
            }
            return(lstPaths.AsReadOnly());
        }
コード例 #3
0
ファイル: CGPSLine.cs プロジェクト: ykebaili/Timos
        public IEnumerable <IMapItem> CreateMapItems(CMapLayer layer)
        {
            List <IMapItem> lstItems  = new List <IMapItem>();
            CGPSLineTrace   trace     = DetailLigne;
            SLatLong        lastPoint = trace.PointDepart;

            foreach (CGPSLineSegment segment in trace.Segments)
            {
                CMapItemPath path = new CMapItemPath(layer);
                path.Points      = new SLatLong[] { lastPoint, segment.PointDestination };
                path.LineColor   = segment.Couleur;
                path.LineWidth   = segment.Width;
                path.Tag         = segment;
                path.ToolTip     = segment.Libelle;
                path.EnableClick = true;
                lstItems.Add(path);
                lastPoint = segment.PointDestination;
            }
            return(lstItems.AsReadOnly());
        }
コード例 #4
0
ファイル: CGPSLine.cs プロジェクト: ykebaili/Timos
        //---------------------------------------------------------------------------
        public IEnumerable <IMapItem> UpdateMapItems(CMapDatabase database, List <IMapItem> itemsToDelete)
        {
            CGPSLineTrace   trace     = DetailLigne;
            SLatLong        lastPoint = trace.PointDepart;
            List <IMapItem> lstPaths  = new List <IMapItem>();

            foreach (CGPSLineSegment segment in trace.Segments)
            {
                CMapItemPath path = database.FindItemFromTag(segment) as CMapItemPath;
                if (path != null)
                {
                    path.Points    = new SLatLong[] { lastPoint, segment.PointDestination };
                    path.LineColor = segment.Couleur;
                    path.LineWidth = segment.Width;
                    path.Tag       = segment;
                    path.ToolTip   = segment.Libelle;
                    lstPaths.Add(path);
                    lastPoint = segment.PointDestination;
                }
            }
            return(lstPaths.AsReadOnly());
        }
コード例 #5
0
ファイル: CGPSLineSegment.cs プロジェクト: ykebaili/Timos
 //-------------------------------------------------------
 public CGPSLineSegment(CGPSLineTrace trace)
 {
     m_trace = trace;
 }