public MainWindow() { InitializeComponent(); EventHandler <MessageEventArgs> handler = MessageListener; client.AddListener(handler); }