private void trafficReport_Click(object sender, RoutedEventArgs e) { var docPrinter = new FlowDocumentPrinter(); var printer = new TrafficReportPrinter(); docPrinter.PrintFlowDocument(() => printer.Print()); }
private void printEventsPerSessionMenuItem_Click(object sender, RoutedEventArgs e) { var docPrinter = new FlowDocumentPrinter(); var printer = new TrafficReportPrinter(); docPrinter.PrintFlowDocument(() => printer.PrintEventsPerSession()); }
private void totalIncomeByMethodMenuItem_Click(object sender, RoutedEventArgs e) { var docPrinter = new FlowDocumentPrinter(); var printer = new TotalIncomeByMethodReportPrinter(); docPrinter.PrintFlowDocument(() => printer.Print(true)); }
private void print_Click(object sender, RoutedEventArgs e) { var documentPrinter = new FlowDocumentPrinter(); var printer = new ContestantResultsPrinter(); documentPrinter.PrintFlowDocument(() => printer.Print(ViewModel)); }
private void nonEventIncomeMenuItem_Click(object sender, RoutedEventArgs e) { var docPrinter = new FlowDocumentPrinter(); var printer = new EventIncomeReportPrinter(); docPrinter.PrintFlowDocument(() => printer.Print(false)); }
private void daysReportMenuItem_Click(object sender, RoutedEventArgs e) { var dlg = new SelectDateDialog(); if (dlg.ShowDialog().Value) { var docPrinter = new FlowDocumentPrinter(); docPrinter.PrintFlowDocuments(() => FlowDocumentsForDay(dlg.SelectedDate)); } }
private void arbitersBadgesMenuItem_Click(object sender, RoutedEventArgs e) { MessageBox.Show("Please ensure that YELLOW paper is in the printer"); var docPrinter = new FlowDocumentPrinter(); var printer = new ArbitersBadgesPrinter(); docPrinter.PrintFlowDocument(() => printer.Print()); MessageBox.Show("Please take the yellow paper out of the printer now"); }
private void eventLabelsMenuItem_Click(object sender, RoutedEventArgs e) { MessageBox.Show("Please ensure that Avery 3x6 labels are in the printer"); var docPrinter = new FlowDocumentPrinter(); var printer = new EventLabelsPrinter(); docPrinter.PrintFlowDocument(() => printer.Print(), includeFooter: false); MessageBox.Show("Please take the labels out of the printer now"); }
private void peopleOwingMoneyMenuItem_Click(object sender, RoutedEventArgs e) { Func <FlowDocument> generate = () => { var printer = new PeopleOwingMoneyReportPrinter(); return(printer.Print(true)); }; Action <FlowDocument> print = doc => { var flowDocumentPrinter = new FlowDocumentPrinter(); flowDocumentPrinter.PrintFlowDocument(doc); }; FlowDocumentPreviewDialog dialog = new FlowDocumentPreviewDialog(generate, print); dialog.ShowDialog(); }
private void modernAbstractStandings_Click(object sender, RoutedEventArgs e) { Func <FlowDocument> generate = () => { var printer = new PentamindStandingsPrinter(); return(printer.PrintModernAbstract()); }; Action <FlowDocument> print = doc => { var flowDocumentPrinter = new FlowDocumentPrinter(); flowDocumentPrinter.PrintFlowDocument(doc, includeFooter: false); }; FlowDocumentPreviewDialog dialog = new FlowDocumentPreviewDialog(generate, print); dialog.ShowDialog(); }
public void print_Click(object sender, EventArgs e) { Func <FlowDocument> generate = () => { var printer = new SingleEventResultsPrinter(ViewModel.CurrentOlympiadId, ViewModel.EventCode); return(printer.Print()); }; Action <FlowDocument> print = doc => { var printer = new FlowDocumentPrinter(); printer.PrintFlowDocument(doc, includeFooter: false); }; var dlg = new FlowDocumentPreviewDialog(generate, print); dlg.ShowDialog(); }
private void eventsWithPrizes_Click(object sender, RoutedEventArgs e) { Func <FlowDocument> generate = () => { var printer = new EventsWithPrizesPrinter(); return(printer.GenerateDocument()); }; Action <FlowDocument> print = doc => { var docPrinter = new FlowDocumentPrinter(); docPrinter.PrintFlowDocument(doc); }; var previewer = new FlowDocumentPreviewDialog(generate, print); previewer.ShowDialog(); }
private void entrySummaryMenuItem_Click(object sender, RoutedEventArgs e) { Func <FlowDocument> generate = () => { var printer = new PrintEventEntriesSummaryReportPrinter(); return(printer.GenerateDocument()); }; Action <FlowDocument> print = doc => { var docPrinter = new FlowDocumentPrinter(); docPrinter.PrintFlowDocument(doc); }; var previewer = new FlowDocumentPreviewDialog(generate, print); previewer.ShowDialog(); }
private void prizeFormsMenuItem_Click(object sender, RoutedEventArgs e) { Func <FlowDocument> generate = () => { var printer = new PrizeFormsPrinter(); return(printer.Print()); }; Action <FlowDocument> print = doc => { MessageBox.Show("Please ensure that YELLOW paper is in the printer"); var docPrinter = new FlowDocumentPrinter(); docPrinter.PrintFlowDocument(doc, includeFooter: false); MessageBox.Show("Please take the yellow paper out of the printer now"); }; var dlg = new FlowDocumentPreviewDialog(generate, print); dlg.ShowDialog(); }
private void medalFormsMenuItem_Click(object sender, RoutedEventArgs e) { var dialog = new EventEntriesReportPicker(); if (dialog.ShowDialog().Value) { var printer = new MedalFormsPrinter(); FlowDocument doc; if (dialog.UseEvent) { doc = printer.Print(dialog.EventCode); } else { doc = printer.Print(dialog.StartDate, dialog.EndDate); } var flowDocumentPrinter = new FlowDocumentPrinter(); flowDocumentPrinter.PrintFlowDocument(() => doc, includeFooter: false); } }
private void printTodaysEventsMenuItem_Click(object sender, RoutedEventArgs e) { // We mess up the document when we put it in the previewer so need to get it again; // would be nice to cache a copy var dlg = new SelectDateDialog(); if (dlg.ShowDialog().Value) { Func <FlowDocument> generate = () => { var printer = new TodaysEventsPrinter(); return(printer.Print(dlg.SelectedDate)); }; Action <FlowDocument> print = doc => { var docPrinter = new FlowDocumentPrinter(); docPrinter.PrintFlowDocument(doc); }; var previewer = new FlowDocumentPreviewDialog(generate, print); previewer.ShowDialog(); } }