Subject: Getting Error in Private chat
Hi Alex
agsXMPP
c#
i give some error ,
when a user comming to my private , and i close ChatFormWindow , and he/she send me a new pm , i give a error , how can i fixed ?
error msg=>
My Code
i test your samples but it dident open FrmChatWindow for once more ! but my code is opening 1 more time and when he/she send a new message to me , i give that error .
thanks
agsXMPP
c#
i give some error ,
when a user comming to my private , and i close ChatFormWindow , and he/she send me a new pm , i give a error , how can i fixed ?
error msg=>
Item has already been added . Key in Dictionary 4@localhost key being added: 4@localhost
My Code
- if (msg.Body != null)
- {
- try
- {
- if (!Chat.Contains(msg.From.Bare))
- {
- string nick = msg.From.Bare;
- fm.Show();
- fm.IncomingMessage(msg);
- }
- else
- Chat.Remove(msg.From.Bare);
- }
- catch (Exception ex) { MessageBox.Show(ex.Message); }
- }
- else
- return;
i test your samples but it dident open FrmChatWindow for once more ! but my code is opening 1 more time and when he/she send a new message to me , i give that error .
thanks