Exemplo n.º 1
0
        public void startNewTrack(int trackId, float x, float y)
        {
            Track t = new Track();

            t.Id = trackId;
            tracks.AddLast(t);
            dynamic p = new Point(x, y);

            #region AOP Tricks
            Aging_Point  interceptor = new Aging_Point(p);
            ProxyFactory factory     = new ProxyFactory();
            var          point       = factory.CreateProxy <Point>(interceptor);
            point.init();
            #endregion

            t.addPoint(p);

            if (trackId < openTracks.Count)
            {
                Track prev = openTracks[trackId];
                if (prev != null)
                {
                    prev.close();
                }
            }
            openTracks[trackId] = t;
        }
Exemplo n.º 2
0
 public void addPoint(int trackId, float x, float y)
 {
     if (trackId < openTracks.Count)
     {
         Track t = openTracks[trackId];
         if (t != null)
         {
             dynamic p = new Point(x, y);
             #region AOP Tricks
             Aging_Point  interceptor = new Aging_Point(p);
             ProxyFactory factory     = new ProxyFactory();
             var          point       = factory.CreateProxy <Point>(interceptor);
             point.init();
             #endregion
             t.addPoint(p);
         }
     }
 }