Beispiel #1
0
        private string AthleteRaceResults(Race r, RaceStats h, TimeSpan?CourseTime, int curAthlete)
        {
            StringBuilder line = new StringBuilder();

            line.Append(FinishInfo(r, h, curAthlete));
            line.Append(CourseTime.ToString(true));
            line.Append(PursuitTime(h, r.Type));
            line.Append(h.ToString(r.Type));
            return(line.ToString());
        }
Beispiel #2
0
        private string PursuitTime(RaceStats h, RaceTypes type)
        {
            StringBuilder line = new StringBuilder();

            line.Append(";");
            if (type == RaceTypes.Pursuit)
            {
                line.Append((h.Finish - h.Start).ToString(false));
            }
            line.Append(";");
            return(line.ToString());
        }
Beispiel #3
0
        private string FinishInfo(Race r, RaceStats h, int curAthlete)
        {
            StringBuilder line = new StringBuilder();

            line.Append(curAthlete + 1);
            line.Append(";");
            line.Append(h.Bib + 1);
            line.Append(";");
            line.AppendFormat(r.Athletes[h.Bib].FullName);
            line.Append(";");
            line.Append(h.Finish.ToString(false));
            line.Append(";");
            for (int i = 0; i < r.Laps - 1; i++)
            {
                line.Append(h.Range[i].Count(x => !x));
                line.Append(" ");
            }
            line.Append(";");
            line.Append((h.Finish - r.Leaders.Finish).ToString(true));
            line.Append(";");
            return(line.ToString());
        }