Пример #1
0
 public PunchPrinting(EventDB eventDB, Controller controller, PunchPrintSettings punchPrintSettings)
     : base(QueryEvent.GetEventTitle(eventDB, " "), controller, punchPrintSettings.PageSettings, punchPrintSettings.BoxSize, PrintingCountKind.CopyCount, punchPrintSettings.Count)
 {
     this.eventDB = eventDB;
     this.punchPrintSettings = punchPrintSettings;
 }
Пример #2
0
 public PunchPrinting(EventDB eventDB, Controller controller, PunchPrintSettings punchPrintSettings)
     : base(QueryEvent.GetEventTitle(eventDB, " "), controller, punchPrintSettings.PageSettings, punchPrintSettings.BoxSize, PrintingCountKind.CopyCount, punchPrintSettings.Count)
 {
     this.eventDB            = eventDB;
     this.punchPrintSettings = punchPrintSettings;
 }
Пример #3
0
        private void printPunchCardsMenu_Click(object sender, EventArgs e)
        {
            // Initialize dialog
            // CONSIDER: shouldn't have GetEventDB here! Do something different.
            PrintPunches printPunchesDialog = new PrintPunches(controller.GetEventDB());
            printPunchesDialog.controller = controller;
            printPunchesDialog.PrintSettings = punchPrintSettings;
            printPunchesDialog.PrintSettings.Count = 1;

            // show the dialog, on success, print.
            if (printPunchesDialog.ShowDialog(this) == DialogResult.OK) {
                // Save the settings for the next invocation of the dialog.
                punchPrintSettings = printPunchesDialog.PrintSettings;
                controller.PrintPunches(punchPrintSettings, false);
            }

            // And the dialog is done.
            printPunchesDialog.Dispose();
        }