0
我使用lync 2010 sdk並使用lync wpf應用程序進行開發。 我可以發送消息給一個組或一個人,但不能捕獲收到的消息文本。lync 2010 sdk無法捕獲收到的會話消息
像添加新對話時可以捕獲的代碼一樣,但無法讀取消息文本。
有誰知道我該怎麼做?
private Conversation _conversation;
LyncClient _LyncClient;
void ConversationManager_ConversationAdded(object sender, Microsoft.Lync.Model.Conversation.ConversationManagerEventArgs e)
{
if (_conversation == null)
{
_conversation = e.Conversation;
}
string getmessage=_conversation.GetApplicationData(_AppId);
_conversation.ParticipantAdded += _conversation_ParticipantAdded;
if (_conversation.Modalities[ModalityTypes.InstantMessage].State != ModalityState.Notified)
{
_RemoteContact = _LyncClient.ContactManager.GetContactByUri("sip:xxx @xxx.com.tr");
_conversation.AddParticipant(_RemoteContact);
}
e.Conversation.InitialContextReceived += Conversation_InitialContextReceived;
e.Conversation.ContextDataReceived += Conversation_ContextDataReceived;
e.Conversation.StateChanged += Conversation_StateChanged;
((InstantMessageModality)e.Conversation.Modalities[ModalityTypes.InstantMessage]).InstantMessageReceived += MainWindow_InstantMessageReceived;
}