Ejemplo n.º 1
0
        public User2(MyPrinter_1 printer)
        {
            this.printer = printer;
            PrinterEventHandler p = new PrinterEventHandler(printer_PageOver);

            this.printer.PageOver += User2DoPageOver;
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public User(MyPrinter_1 printer, string name)
 {
     this.printer           = printer;
     this.name              = name;
     this.printer.PageOver += User1DoPageOver;
 }
Ejemplo n.º 4
0
 public User1(MyPrinter_1 printer)
 {
     this.printer          = printer;
     this.printer.PageOver = User1DoPageOver;
 }