public void Btn_Submit(string startPos, string stopPos) { pntList = new List <Point>(); Point pnt = new Point(centerInfo.X, centerInfo.Y); pntList.Add(pnt); curRoad = new BusRoad(this.MarkLayer, this.GraphicsLayer); curRoad.AddNode(centerInfo.MarketName, centerInfo.X, centerInfo.Y, "../images/bus/stop.PNG"); for (int i = 0; i < stopsData.Count; i++) { pnt = new Point(stopsData[i].X, stopsData[i].Y); pntList.Add(pnt); curRoad.AddNode(stopsData[i].StopName, stopsData[i].X, stopsData[i].Y, "../images/bus/stop.PNG"); } pnt = new Point(marketInfo.X, marketInfo.Y); pntList.Add(pnt); IMSPolyline line = new IMSPolyline(ZDIMS.Interface.CoordinateType.Logic); line.Points = pntList; line.StrokeThickness = 2; line.Stroke = new SolidColorBrush(Colors.Red); line.Draw(); this.GraphicsLayer.AddGraphics(line); curRoad.AddNode(marketInfo.MarketName, marketInfo.X, marketInfo.Y, "../images/bus/stop.PNG"); this.Show(); }
public void Btn_Submit(string startPos, string stopPos) { pntList = new List <Point>(); Point pnt = new Point(centerInfo.X, centerInfo.Y); pntList.Add(pnt); curRoad = new BusRoad(this.MarkLayer, this.GraphicsLayer); curRoad.AddNode(centerInfo.MarketName, centerInfo.X, centerInfo.Y, "../images/bus/stop.PNG"); for (int i = 0; i < stopsData.Count; i++) { pnt = new Point(stopsData[i].X, stopsData[i].Y); pntList.Add(pnt); curRoad.AddNode(stopsData[i].StopName, stopsData[i].X, stopsData[i].Y, "../images/bus/stop.PNG"); } pnt = new Point(marketInfo.X, marketInfo.Y); pntList.Add(pnt); IMSPolyline line = new IMSPolyline(); line.Points = pntList; line.StrokeThickness = 2; line.Draw(); this.GraphicsLayer.AddGraphics(line); curRoad.AddNode(marketInfo.MarketName, marketInfo.X, marketInfo.Y, "../images/bus/stop.PNG"); //trackplaycontrol track = new trackplaycontrol(); //track.MarkLayer = this.MarkLayer; //track.Points = pntList; // track.Show(); //GetBusChangeRlt(startPos, stopPos, new UploadStringCompletedEventHandler(OnGetBusRlt)); }