LYNC应用程序共享(桌面共享)_conversation.Modalities [ModalityTypes.ApplicationSharing]返回null [英] LYNC APPLICATION SHARING (DESKTOP SHARING) _conversation.Modalities[ModalityTypes.ApplicationSharing] returns null
问题描述
                点击按钮 应为活动对话窗口触发桌面共享事件。点击按钮,我们有以下代码
  private void StartSharingResource_Button_Click(object sender,EventArgs e)
        {
            //如果没有活动对话来共享此资源,请从处理程序返回
        if(_conversation == null)
            {
   返回;
}
            //如果活动对话中没有本地存储的共享模式,请从活动对话中获取并存储它。
            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] 部分中,它都是null,我们得到一个对象引用错误。我们正在使用LYNC SDK - 15.0.4603.1000版本。
应用程序共享是否在SDK之外工作?
On the click of a button the desktop sharing event should be triggered for the active conversation window. In the button click we have the following code
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;
}
}
On Conversation Added even we are fetching the conversation modality
void ConversationManager_ConversationAdded(object sender, Microsoft.Lync.Model.Conversation.ConversationManagerEventArgs e)
{
_sharingModality = (ApplicationSharingModality)_conversation.Modalities[ModalityTypes.ApplicationSharing];
}
In both the section _conversation.Modalities[ModalityTypes.ApplicationSharing] is coming as null and we get an object reference error. We are using LYNC SDK - 15.0.4603.1000 version.
Does application sharing work outside of the SDK?
这篇关于LYNC应用程序共享(桌面共享)_conversation.Modalities [ModalityTypes.ApplicationSharing]返回null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!