private void DrawStations(grid g) { Track t; int y = Configuration.HEADER_HEIGHT; Globals.nstations = 0; for (t = Globals.layout; t != null && Globals.nstations < 100; t = t.next) { if (!t.isstation || string.IsNullOrEmpty(t.station)) { continue; } Globals.stations[Globals.nstations++] = t; Globals.DrawTimeGrid(g, y); g.DrawText1(0, y - 10, t.station, false); g.DrawLine(Configuration.STATION_WIDTH + Configuration.KM_WIDTH, y, Configuration.STATION_WIDTH + Configuration.KM_WIDTH + 24 * 120, y, 0); y += Configuration.Y_DIST; } if (Globals.nstations == 0) { g.DrawText1(10, 10, wxPorting.L("Sorry, this feature is not available on this scenario."), false); g.DrawText1(10, 25, wxPorting.L("No station was found on the layout."), false); } }