コード例 #1
0
        public override async Task <IWorkbook> Generate()
        {
            CacheService cacheService = new CacheService();

            _demo.WeaponFired = await cacheService.GetDemoWeaponFiredAsync(_demo);

            _generalSheet = new GeneralSheet(Workbook, _demo);
            await _generalSheet.Generate();

            _playersSheet = new PlayersSheet(Workbook, _demo);
            await _playersSheet.Generate();

            _roundsSheet = new RoundsSheet(Workbook, _demo);
            await _roundsSheet.Generate();

            _entryHoldKillsRoundSheet = new EntryHoldKillsRoundSheet(Workbook, _demo);
            await _entryHoldKillsRoundSheet.Generate();

            _entryHoldKillsPlayerSheet = new EntryHoldKillsPlayerSheet(Workbook, _demo);
            await _entryHoldKillsPlayerSheet.Generate();

            _entryHoldKillsTeamSheet = new EntryHoldKillsTeamSheet(Workbook, _demo);
            await _entryHoldKillsTeamSheet.Generate();

            _entryKillsRoundSheet = new EntryKillsRoundSheet(Workbook, _demo);
            await _entryKillsRoundSheet.Generate();

            _entryKillsPlayerSheet = new EntryKillsPlayerSheet(Workbook, _demo);
            await _entryKillsPlayerSheet.Generate();

            _entryKillsTeamSheet = new EntryKillsTeamSheet(Workbook, _demo);
            await _entryKillsTeamSheet.Generate();

            return(Workbook);
        }
コード例 #2
0
        public async Task GenerateXls(Demo demo, string fileName)
        {
            IWorkbook workbook = new XSSFWorkbook();

            _generalSheet = new GeneralSheet(workbook, demo);
            await _generalSheet.Generate();

            _playersSheet = new PlayersSheet(workbook, demo);
            await _playersSheet.Generate();

            _roundsSheet = new RoundsSheet(workbook, demo);
            await _roundsSheet.Generate();

            _openKillsRoundSheet = new OpenKillsRoundSheet(workbook, demo);
            await _openKillsRoundSheet.Generate();

            _openKillsPlayerSheet = new OpenKillsPlayerSheet(workbook, demo);
            await _openKillsPlayerSheet.Generate();

            _openKillsTeamSheet = new OpenKillsTeamSheet(workbook, demo);
            await _openKillsTeamSheet.Generate();

            _entryKillsRoundSheet = new EntryKillsRoundSheet(workbook, demo);
            await _entryKillsRoundSheet.Generate();

            _entryKillsPlayerSheet = new EntryKillsPlayerSheet(workbook, demo);
            await _entryKillsPlayerSheet.Generate();

            _entryKillsTeamSheet = new EntryKillsTeamSheet(workbook, demo);
            await _entryKillsTeamSheet.Generate();

            FileStream sw = File.Create(fileName);

            workbook.Write(sw);
            sw.Close();
        }