예제 #1
0
        public PlayerInfo(ParticipantData p, int index)
        {
            participantInfo = p;
            Id       = index;
            driverId = p.driverId;
            lapStore = new Dictionary <int, LapRecording>();

            Name      = PacketHelper.GetString(participantInfo.name, 48) + " (" + PacketHelper.CountryShort(participantInfo.nationality) + ")";
            CarNumber = participantInfo.raceNumber;
            if (index < ColorSchemes.schemes.Count)
            {
                BackColor = ColorSchemes.schemes[index].Background;
                TextColor = ColorSchemes.schemes[index].Text;
            }
            else
            {
                BackColor = ColorSchemes.schemes[0].Background;
                TextColor = ColorSchemes.schemes[0].Text;
            }
        }
예제 #2
0
 public void Update(ParticipantData p)
 {
     participantInfo = p;
     Name            = PacketHelper.GetString(participantInfo.name, 48) + " (" + PacketHelper.CountryShort(participantInfo.nationality) + ")";
 }