public void Print(string filename, int copies) { for (int i = 0; i < copies; i++) { printer.PrintFile(filename); } }
private static void Problem() { bool hasHp = true; if (hasHp) { HpPrinter printer = new HpPrinter(); printer.Init(); printer.Print("plik.txt"); printer.Print("plik2.txt"); printer.Release(); } else { CanonPrinter printer = new CanonPrinter(); printer.PrintFile("plik.txt"); } }