Пример #1
0
        private void OpenAndExportWFTDAStatsReport()
        {
            try
            {

                FileInfo newFile = new FileInfo(openFileName);

                ExcelPackage p = new ExcelPackage(newFile);
                //Add the Content sheet

                if (GameViewModel.Instance != null)
                {
                    PopulateWftdaReport pop = new PopulateWftdaReport(p);
                    pop.PopulateReport();
                }

                FileInfo fi = new FileInfo(this.fileName);
                p.SaveAs(fi);
                System.Diagnostics.Process.Start(this.fileName);
            }
            catch (Exception exception)
            {
                ErrorViewModel.Save(exception, exception.GetType());
            }
        }
Пример #2
0
        private void ExportWFTDAStatsReport()
        {
            using (ExcelPackage p = new ExcelPackage())
            {
                try
                {
                    p.Workbook.Properties.Author = "RDNation.com v" + ScoreboardConfig.SCOREBOARD_VERSION_NUMBER;
                    p.Workbook.Properties.Title = "WFTDA Report For " + GameViewModel.Instance.GameName;
                    Color tabPink = Color.FromArgb(255, 138, 255);
                    ExportIBRF(p);
                    ExportScores(p);
                    ExportPenalties(p);
                    ExportLineups(p);
                    ExportBoutSummary(p);
                    ExportPenaltySummary(p);
                    ExportBoutClock(p);

                    if (GameViewModel.Instance != null)
                    {
                        PopulateWftdaReport pop = new PopulateWftdaReport(p);
                        pop.PopulateReport();
                    }
                }
                catch (Exception exception)
                {
                    ErrorViewModel.Save(exception, exception.GetType());
                }
                FileInfo fi = new FileInfo(this.fileName);
                p.SaveAs(fi);
            }
        }