예제 #1
0
        static void Main(string[] args)
        {
            UserInputMonitor monitor = new UserInputMonitor();
            Client           client  = new Client(monitor);

            monitor.Run();
        }
예제 #2
0
 public Client(UserInputMonitor m)
 {
     m.OnUserRequest += new UserInputMonitor.UserRequest(this.ShowMessage);
     //m.OnUserRequest+=new m.UserRequest(this.ShowMessage);
     //注意这种写法是错误的,因为委托是静态的
 }