void documentBW_DoWork(object sender, DoWorkEventArgs e) { var pdfGenerator = new PDFGenerator(); var excelGenerator = new ExcelGenerator(); loggerHasStarted = pdfGenerator.CreatePDF(loggerInformation); loggerHasStarted = excelGenerator.CreateExcel(loggerInformation); }
void previewPanelBW_DoWork(object sender, DoWorkEventArgs e) { var pdfGenerator = new PDFGenerator(); var excelGenerator = new ExcelGenerator(); loggerHasStarted = pdfGenerator.CreatePDF(loggerInformation); if (loggerHasStarted) { excelGenerator.CreateExcel(loggerInformation); } }