public void Initialize() { Report.DATABASE.reset(); SOMReportFile file = new SOMReportFile(Config.getConfigurationFile("ALL_REPORTS.PRT")); file.parseLeagueFile(); leagueStandingsReport = (LeagueStandingsReport)file.FindReport("LEAGUE STANDINGS FOR"); leagueStandingsReport.processReport(Program.LEAGUES[0].Length); lineScoreReport = (LineScoreAndMinorsReport)file.FindReport("INJURY/MINOR LEAGUE REPORT FOR"); lineScoreReport.processReport(Program.LEAGUES[0].Length); }
public void initialize(int daysPlayed) { Program.daysPlayed = daysPlayed; Report.DATABASE.reset(); Console.WriteLine(" Loading League Report File ..."); leagueReportFile = new SOMReportFile(Config.getConfigurationFile("ALL_REPORTS.PRT")); leagueReportFile.parseLeagueFile(); IFeature feature = FeatureFactory.loadFeature(FeatureFactory.FEATURE.STANDINGS); feature.initialize(leagueReportFile); Console.WriteLine(" Building Grand Totals..."); leaguePrimaryStatReport = (LeagueGrandTotalsReport)leagueReportFile.FindReport("LEAGUE GRAND TOTALS (primary report) FOR"); leaguePrimaryStatReport.processReport(Program.LEAGUES[0].Length); Console.WriteLine(" Building League Report ..."); lineScoreReport = (LineScoreAndMinorsReport)leagueReportFile.FindReport("INJURY/MINOR LEAGUE REPORT FOR"); lineScoreReport.processReport(Program.LEAGUES[0].Length); Console.WriteLine(" Building Awards..."); newspaperStyleReport = (NewspaperStyleReport)leagueReportFile.FindReport("AWARDS VOTING FOR"); newspaperStyleReport.processReport(Program.LEAGUES[0].Length); Console.WriteLine(" Building Record Book..."); feature = FeatureFactory.loadFeature(FeatureFactory.FEATURE.RECORD_BOOK); feature.initialize(leagueReportFile); output.setOutputHeader(leagueReportFile.SeasonTitle, daysPlayed); Console.WriteLine(" Loading Team Report File..."); teamReportFile = new SOMReportFile(Config.getConfigurationFile("TEAM_ALL_REPORTS.PRT")); teamReportFile.parseTeamFile(); featureUsage = FeatureFactory.loadFeature(FeatureFactory.FEATURE.USAGE); featureUsage.initialize(teamReportFile); featureUnderUsage = FeatureFactory.loadFeature(FeatureFactory.FEATURE.UNDERUSAGE); ((FeatureUnderUsage)featureUnderUsage).setReportData(((FeatureUsage)featureUsage).teamComparisonReport); featureUnderUsage.initialize(teamReportFile); }