Пример #1
0
        public Track(ISimulator sim, string name)
        {
            if (name == null) return;
            Route = new RouteCollection();
            Apexes = new ApexCollection();
            Sections = new SectionsCollection();

            // TODO: Make possible without Telemetry.m.Sim available!
            if (sim.Garage != null && sim.Garage.Available
                 && sim.Garage.Available_Tracks)
            {
                ITrack track = sim.Garage.SearchTrack(name);
                if (track != null)
                {
                    track.Scan();
                    track.ScanRoute();
                    Location = track.Location;
                    Type = track.Type;
                    Name = track.Name;

                    Route = (RouteCollection) track.Route.Clone();
                }
            }
            LapLogger = new Timer();
            LapLogger.Interval = 2;
            LapLogger.Elapsed += LapLogger_Elapsed;
            LapLogger.AutoReset = true;
            LapLogger.Start();
        }
Пример #2
0
        public Track(ISimulator sim, string name)
        {
            if (name == null)
            {
                return;
            }
            Route    = new RouteCollection();
            Apexes   = new ApexCollection();
            Sections = new SectionsCollection();

            // TODO: Make possible without Telemetry.m.Sim available!
            if (sim.Garage != null && sim.Garage.Available &&
                sim.Garage.Available_Tracks)
            {
                ITrack track = sim.Garage.SearchTrack(name);
                if (track != null)
                {
                    track.Scan();
                    track.ScanRoute();
                    Location = track.Location;
                    Type     = track.Type;
                    Name     = track.Name;

                    Route = (RouteCollection)track.Route.Clone();
                }
            }
            LapLogger           = new Timer();
            LapLogger.Interval  = 2;
            LapLogger.Elapsed  += LapLogger_Elapsed;
            LapLogger.AutoReset = true;
            LapLogger.Start();
        }
Пример #3
0
        public Track(RouteCollection route)
        {
            Route = route;
            Apexes = new ApexCollection();
            Sections = new SectionsCollection();

            Location = "??";
            Type = "??";
            Name = "??";

            // Laplogger?
        }
Пример #4
0
        public Track(RouteCollection route)
        {
            Route    = route;
            Apexes   = new ApexCollection();
            Sections = new SectionsCollection();

            Location = "??";
            Type     = "??";
            Name     = "??";

            // Laplogger?
        }