Пример #1
0
        static void Main(string[] args)
        {
            Printer printer = new Printer();
            printer.PowerOn();
            printer.PrintDocument();
            printer.AddPaper(3);
            printer.PrintDocument();
            printer.PrintDocument();
            printer.PrintDocument();
            printer.PrintDocument();
            printer.PowerOff();

            Console.ReadKey();
        }
 public WaitingState(Printer printer)
 {
     _printer = printer;
 }
 public PowerOffState(Printer printer)
 {
     _printer = printer;
 }
Пример #4
0
 public PrintState(Printer printer)
 {
     _printer = printer;
 }