Exemple #1
0
        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();
        }
Exemple #2
0
        private IEnumerable <FlowDocument> FlowDocumentsForDay(DateTime selectedDate)
        {
            //  1. Events per Session (for the right day; not normally independent)
            var printer1 = new TrafficReportPrinter();

            yield return(printer1.PrintEventsPerSession(selectedDate));

            //  2. Todays Events (for the right day)
            var printer2 = new TodaysEventsPrinter();

            yield return(printer2.Print(selectedDate));

            // TODO TODO TODO
            // This is a combination of existing reports (1,2,3,5 are for today, rest are as at now
            //  3.

            //  4.  Event Results for today, concatenated
            var printer4 = new TodaysEventsResultsPrinter();

            yield return(printer4.Print(selectedDate));

            //  5.  Traffic report (for the right day)
            yield return(printer1.Print(selectedDate));

            //  6.  Income summary
            var printer6 = new EventIncomeReportPrinter();

            yield return(printer6.Print(true));

            //  7.  Entry Summary
            var printer7 = new PrintEventEntriesSummaryReportPrinter();

            yield return(printer7.GenerateDocument());

            //  8.  Medal table
            var printer8 = new MedalTablePrinter();

            yield return(printer8.GenerateDocument());

            //  9.  Event Entries (for the right day TODO TODO doesn't work in Access??)
        }