private void ProcessWalks(ListView statsView) { AscendingTopTenList<int> leaders = new AscendingTopTenList<int>(); foreach (Team team in statLeague.Teams) { foreach (Pitcher ptr in team.StartingPitchers) { if (ptr.SeasonStats.Walks > 0) leaders.AddPlayer(team.Abbrev, ptr.Name, ptr.SeasonStats.Walks); } } FillListView(leaders); }
private void ProcessERA(ListView statsView) { AscendingTopTenList<double> leaders = new AscendingTopTenList<double>(); foreach (Team team in statLeague.Teams) { foreach (Pitcher ptr in team.StartingPitchers) { if (ptr.SeasonStats.InningsPitched > 0.0F) leaders.AddPlayer(team.Abbrev, ptr.Name, ptr.SeasonStats.EarnedRunAvg); } } FillListView(leaders, "0.00"); }