示例#1
0
        /// <summary>Write a single pack report incorporating data from all the selected leagues.</summary>
        public static void PackReport(string path, List <League> leagues, ReportTemplate reportTemplate, OutputFormat outputFormat)
        {
            if (path != null)
            {
                var round1Games = new List <Game>();
                foreach (var league in leagues)
                {
                    round1Games.AddRange(league.AllGames.Where(g => g.Title == "Round Robin" || g.Title == "Round 1" ||
                                                               g.Title == "Rep 1" || g.Title == "Repechage 1"));
                }

                if (round1Games.Count == 0)
                {
                    foreach (var league in leagues)
                    {
                        round1Games.AddRange(league.AllGames);
                    }
                }

                using (StreamWriter sw = File.CreateText(Path.Combine(path, "packreport." + outputFormat.ToExtension())))
                    sw.Write(new ZoomReports
                    {
                        Reports.PackReport(leagues, round1Games, reportTemplate.Title, reportTemplate.From, reportTemplate.To,
                                           ChartTypeExtensions.ToChartType(reportTemplate.Setting("ChartType")), reportTemplate.Settings.Contains("Description"), reportTemplate.Settings.Contains("Longitudinal"))
                    }.ToOutput(outputFormat));
            }
        }
示例#2
0
 /// <summary>Write a single pack report incorporating data from all the selected leagues.</summary>
 public static void TechReport(string path, List <League> leagues, ReportTemplate reportTemplate, OutputFormat outputFormat)
 {
     if (path != null)
     {
         using (StreamWriter sw = File.CreateText(Path.Combine(path, "techreport." + outputFormat.ToExtension())))
             sw.Write(new ZoomReports
             {
                 Reports.TechReport(leagues, reportTemplate.Title, reportTemplate.From, reportTemplate.To,
                                    ChartTypeExtensions.ToChartType(reportTemplate.Setting("ChartType")), reportTemplate.Settings.Contains("Description"))
             }.ToOutput(outputFormat));
     }
 }