Not logged in. · Lost password · Register
Forum: MatriX and XmppDotNet RSS
Avatar
Styort #1
Member since Apr 2014 · 6 posts
Group memberships: Members
Show profile · Link to this post
Subject: Problems with incoming messages (wpf)
Hello. I can't understand the code for incoming messages, it seems to be working, but I don't know what's the problem. Here's my project, any help we be pleased.
Using classes are: MainWindow , Connection , ChatWindow , SendMessage.
Thank's.
The author has attached one file to this post:
JabberMessager.rar 539.2 kBytes
You have no permission to open this file.
Avatar
Alex #2
Member since Feb 2003 · 4447 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Please describe in detail what you don't understand and how we can help you.

Incoming messages are very simple. For each incoming message the OnMessage handler of XmppClient gets raised.

Alex
Avatar
Styort #3
Member since Apr 2014 · 6 posts
Group memberships: Members
Show profile · Link to this post
I've got "public void OnMessage(object sender, MessageEventArgs e)" in SendMessage class, but messages are not coming. What's wrong?
Avatar
Alex #4
Member since Feb 2003 · 4447 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I think your problem is that you don't add the handler.

you have this code in your IncomingMessage method:

  1. myXmppClient.OnMessage += new EventHandler<Matrix.Xmpp.Client.MessageEventArgs>(myXmppClient_OnMessage);

Try to add it to your SendReference function.

Alex
Avatar
Styort #5
Member since Apr 2014 · 6 posts
Group memberships: Members
Show profile · Link to this post
Thank you! It helped me .
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters: