Beispiel #1
0
        public void PutMessage(String nickname, String message)
        {
            PutMessageEventArgs e = new PutMessageEventArgs(nickname, message);

            if (putMessageHandler != null)
            {
                putMessageHandler(this, e);
            }
        }
Beispiel #2
0
        public void PutMessage(Object sender, PutMessageEventArgs eventArgs)
        {
            messages.Enqueue(new KeyValuePair <String, String>(eventArgs.nickname, eventArgs.message));
            Console.WriteLine("Message: Nickname -> {0} Message -> {1}", eventArgs.nickname, eventArgs.message);

            foreach (KeyValuePair <String, KeyValuePair <int, IClientRemoteObject> > remoteObject in registry)
            {
                remoteObject.Value.Value.UpdateChat(eventArgs.nickname + ": " + eventArgs.message);
            }
        }