public static int NumberOfKeyRaces(Horse horse, KeyRaces keyRaces) { int count = 0; foreach (var ri in keyRaces.Graph[horse]) { if(ri.Matches >=2) { ++count; } } return count; }
private void KeyRacesForm_Load(object sender, EventArgs e) { _keyRaces = KeyRaces.Make(_race); LoadRaces(); _tbTrackCode.Text = _race.Parent.TrackCode; _tbRaceNumber.Text = _race.RaceNumber.ToString(); _tbSurface.Text = _race.Horses[0].CorrespondingBrisHorse.TodaysSurface; _tbDistance.Text = Utilities.ConvertYardsToMilesOrFurlongsAbreviation(_race.Horses[0].CorrespondingBrisHorse.DistanceInYards); }