예제 #1
0
        private void CheckCircuit(TelemetryPacket packet)
        {
            var circuit = CircuitRepository.GetByTrackLength(packet.TrackLength);

            if (circuit.Name != _currectCircuit.Name || _lapType != packet.SessionTypeName)
            {
                this.ChangeCircuit(circuit, packet.SessionTypeName);
            }
        }
예제 #2
0
파일: TelemetryLap.cs 프로젝트: trv/F1Speed
        public TelemetryLap(SerializationInfo info, StreamingContext context)
        {
            var trackLength = info.GetValue <float>("LapTrackLength");

            Packets = info.GetValue <List <TelemetryPacket> >("Packets");
            Circuit = CircuitRepository.GetByTrackLength(trackLength);
            LapType = info.GetValue <string>("LapType");
            try
            {
                _hasFinished = info.GetValue <bool>("HasFinished");
            }
            catch
            {
                _hasFinished = true;
            }
        }