コード例 #1
0
ファイル: Track.cs プロジェクト: nlhans/SimTelemetry
        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
ファイル: Track.cs プロジェクト: nlhans/SimTelemetry
        public Track(RouteCollection route)
        {
            Route = route;
            Apexes = new ApexCollection();
            Sections = new SectionsCollection();

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

            // Laplogger?
        }