0
單擊按鈕時,應激活活動對話窗口的桌面共享事件。在點擊該按鈕,我們有下面的代碼:Lync SDK上的桌面共享,應用程序模態返回null
private void StartSharingResource_Button_Click(object sender, EventArgs e)
{
//If there is no active conversation to share this resource in, return from handler
if (_conversation == null)
{
return;
}
//If there is no sharing modality stored locally on the active conversation, get it from the active conversation and store it.
if (_sharingModality == null)
{
_sharingModality = _conversation.Modalities[ModalityTypes.ApplicationSharing] as ApplicationSharingModality;
}
}
在對話增加甚至我們獲取的談話方式
void ConversationManager_ConversationAdded(object sender, Microsoft.Lync.Model.Conversation.ConversationManagerEventArgs e)
{
_sharingModality = (ApplicationSharingModality)_conversation.Modalities[ModalityTypes.ApplicationSharing];
}
在這兩個部分_conversation.Modalities [ModalityTypes.ApplicationSharing]即將爲空並且我們得到一個對象引用錯誤。我們正在使用LYNC SDK - 15.0.4603.1000版本。