コード例 #1
0
        public User2(MyPrinter_1 printer)
        {
            this.printer = printer;
            PrinterEventHandler p = new PrinterEventHandler(printer_PageOver);

            this.printer.PageOver += User2DoPageOver;
        }
コード例 #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);
        }
コード例 #3
0
 public User(MyPrinter_1 printer, string name)
 {
     this.printer           = printer;
     this.name              = name;
     this.printer.PageOver += User1DoPageOver;
 }
コード例 #4
0
 public User1(MyPrinter_1 printer)
 {
     this.printer          = printer;
     this.printer.PageOver = User1DoPageOver;
 }