Ejemplo n.º 1
0
        /// <summary>
        /// 单击分站事件
        /// </summary>
        /// <param name="EventStation">被单击的分站类实例</param>
        void ZzhaMapGis_StationClick(Station EventStation)
        {

            FalshStations();
            FlashMap();
        }
Ejemplo n.º 2
0
 private void ChangeConfigStation(Station station)
 {
     ((StationInfo)StationHashTable[station.StationName]).StationPoint = station.StationPoint;
     foreach (RouteModel rm in RouteList)
     {
         if (rm.From == MoveStationPoint)
         {
             rm.From = station.StationPoint;
             rm.RouteLength = Convert.ToInt32(Math.Sqrt(Math.Pow(rm.From.X - rm.To.X, 2) + Math.Pow(rm.From.Y - rm.To.Y, 2)));
         }
         if (rm.To == MoveStationPoint)
         {
             rm.To = station.StationPoint;
             rm.RouteLength = Convert.ToInt32(Math.Sqrt(Math.Pow(rm.From.X - rm.To.X, 2) + Math.Pow(rm.From.Y - rm.To.Y, 2)));
         }
     }
     for (int i = 0; i < ExitsRoutePoint.Count; i++)
     {
         if (ExitsRoutePoint[i] == MoveStationPoint)
         {
             ExitsRoutePoint[i] = station.StationPoint;
             break;
         }
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 添加分站信息
 /// </summary>
 /// <param name="x">分站的X坐标</param>
 /// <param name="y">分站的Y坐标</param>
 /// <param name="name">分站的名称</param>
 /// <param name="id">分站的ID</param>
 /// <param name="img">分站的图片</param>
 public void AddStation(float x, float y, string name, string id, Image img)
 {
     //if (ImageAnimator.CanAnimate(img) && this.UseGif)
     //    ImageAnimator.Animate(img, null);
     Station s = new Station(x, y, name, id, img);
     this.StationsList.Add(s);
     if (!StationsRecord.Contains(x.ToString() + "," + y.ToString()))
     {
         this.StationsRecord.Add(x.ToString() + "," + y.ToString());
     }
     StationsIDHash.Add(s.StationID, s);
 }