Ejemplo n.º 1
0
 public GraphicsMy(Form1 main, List<Station> listStation, Rebro[] Rebro,  List<Train> Trains )
 {
     mainForm = main;
     ListStation = listStation;
     rebro = Rebro;
     trains = Trains;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Получаем маршрут.
 /// </summary>
 public void GetPath(PointG[] pointGs,Rebro[] rebros)
 {
     foreach (PointG point in pointGs)
     {
         point.ValueMetka = point == beginPointG ? 0 : 999;
         point.IsChecked = false;
     }
     DekstraAlgorim da = new DekstraAlgorim(pointGs,rebros);
     da.AlgoritmRun(beginPointG);
     path = da.MinPath1(endPointG);
     inPointG = path[path.Count - 2];
     FinishCoordinate.X = path[path.Count - 2].X;
     FinishCoordinate.Y = path[path.Count - 2].Y;
 }
Ejemplo n.º 3
0
 public DekstraAlgorim(PointG[] PointGsOfgrath, Rebro[] rebraOfgrath)
 {
     PointGs = PointGsOfgrath;
     rebra = rebraOfgrath;
 }