示例#1
0
 private static void SetupPrinter(SetupData setup)
 {
     if (setup.printer == PrinterType.NoPrint)
     {
         Singletons.UseNoPrinter();
     }
     else if (setup.printer == PrinterType.ResultPrint)
     {
         Singletons.UseResultsPrinter();
     }
     else if (setup.printer == PrinterType.AllPrint)
     {
         Singletons.UseDetailPrinter();
     }
     else
     {
         throw new NullReferenceException("Printer not specified in value setup.printer");
     }
 }