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); }
public User2(MyPrinter_1 printer) { this.printer = printer; this.printer.PageOver += User2DoPageOver; }
public User1(MyPrinter_1 printer) { this.printer = printer; this.printer.PageOver += User1DoPageOver; // this.printer.PageOver = User1DoPageOver; }