コード例 #1
0
 /// <summary>
 /// 投影占用
 /// </summary>
 /// <param name="confrenceName"></param>
 /// <param name="lyncConversationEntity"></param>
 /// <param name="callBack"></param>
 public void MatrixSetting(string confrenceName, string sharer, ConferenceMatrixOutPut conferenceMatrixOutPut, Action <bool> callBack)
 {
     //设置事件回调
     this.MatrixSync_CallBack = callBack;
     //投影占用
     ConferenceMatrix.Client.SetMatrixEntityAsync(confrenceName, sharer, conferenceMatrixOutPut);
 }
コード例 #2
0
        public void SetMatrixEntity(string conferenceName, string sharer, ConferenceMatrixOutPut conferenceMatrixOutPut)
        {
            //上锁,达到线程互斥作用
            lock (objMatrixSyncServiceData)
            {
                try
                {
                    //会议名称不为空
                    if (string.IsNullOrEmpty(conferenceName))
                    {
                        return;
                    }

                    //查看缓存中是否包含该会议名称
                    if (MatrixSyncAppDic.ContainsKey(conferenceName))
                    {
                        //取出临时矩阵投影人
                        MatrixSyncAppDic[conferenceName].Sharer = sharer;
                        //输出(判断是哪个屏幕)
                        MatrixSyncAppDic[conferenceName].ConferenceMatrixOutPut = conferenceMatrixOutPut;
                    }
                    else
                    {
                        //若没有,则记录会议并绑定相应的矩阵数据
                        MatrixSyncAppDic.Add(conferenceName, new ConferenceMatrixEntity()
                        {
                            Sharer = sharer, ConferenceMatrixOutPut = conferenceMatrixOutPut
                        });
                    }
                    //实时同步(发送信息给客户端)
                    this.InformClient(conferenceName, MatrixSyncAppDic[conferenceName]);
                }
                catch (Exception ex)
                {
                    LogManage.WriteLog(this.GetType(), ex);
                }
            }
        }