public User2(MyPrinter_1 printer) { this.printer = printer; PrinterEventHandler p = new PrinterEventHandler(printer_PageOver); this.printer.PageOver += User2DoPageOver; }
static void Main(string[] args) { string str = null; str += "ljlj"; MyPrinter_1 p = new MyPrinter_1(); User u1 = new User(p, "Haim"); User u2 = new User(p, "Dani"); Console.WriteLine("enter page of copy :"); int x = int.Parse(Console.ReadLine()); p.Print(x); }
public User(MyPrinter_1 printer, string name) { this.printer = printer; this.name = name; this.printer.PageOver += User1DoPageOver; }
public User1(MyPrinter_1 printer) { this.printer = printer; this.printer.PageOver = User1DoPageOver; }