Пример #1
0
        static void Main(string[] args)
        {
            MyPrinter_1 p  = new MyPrinter_1();
            User1       u1 = new User1(p);
            User2       u2 = new User2(p);

            Console.WriteLine("enter page of copy :");
            int x = int.Parse(Console.ReadLine());

            p.Print(x);
        }
Пример #2
0
 public User2(MyPrinter_1 printer)
 {
     this.printer           = printer;
     this.printer.PageOver += User2DoPageOver;
 }
Пример #3
0
 public User1(MyPrinter_1 printer)
 {
     this.printer           = printer;
     this.printer.PageOver += User1DoPageOver; // this.printer.PageOver = User1DoPageOver;
 }