/// <summary> /// 创建或进入会话 /// </summary> /// <param name="successed">执行是否包含会话是否成功</param> /// <param name="meetAddress">会议地址</param> private void MeetSetupOrEnter(bool successed, string meet_Address) { try { if (successed && string.IsNullOrEmpty(meet_Address)) { //禁止其他人进行查询完之后直接进行会话初始化(有可能在其中过程当中,第一个开启会话的人还没有准备完毕,所以记进行一次通知) ModelManage.ConferenceLyncConversation.ForbiddenConversationInit(Constant.ConferenceName, new Action <bool>((flg) => { })); //判断主会话是否存在 if (LyncHelper.MainConversation == null) { //参会人列表 List <string> list = Constant.ParticipantList.Where(Item => Item.Equals(Constant.SelfUri)).ToList <string>(); //添加对应大屏 list.Add(Constant.BigScreenName); //开启会话 LyncHelper.StartConference(Constant.lyncClient, Constant.ConferenceName, Constant.SelfName, list, LyncHelper.MainConversation); //获取会议地址上传到服务器 this.UPloadMeetAddressAndCancelLock(successed); this.meetAddress = meet_Address; } } else { this.meetAddress = meet_Address; //使用浏览器的方式参会 LyncHelper.JoinConversationByWebBrowser(meet_Address); } } catch (Exception ex) { LogManage.WriteLog(this.GetType(), ex); } finally { } }
/// <summary> /// 会话初始化 /// </summary> public void LyncConversationInit() { try { //检查当前会议是否包含会话 ModelManage.ConferenceLyncConversation.ContainConversation(Constant.ConferenceName, new Action <bool, string>((successed, meetAddress) => { ModelManage.ConferenceLyncConversation.CheckConversationInit(Constant.ConferenceName, new Action <bool>((canInit) => { this.CheckConversationInitCount++; if (this.CheckConversationInitCount == 8 && !string.IsNullOrEmpty(meetAddress)) { #region 允许其他成员进行会议查询并进行初始化 ModelManage.ConferenceLyncConversation.AllowConversationInit(Constant.ConferenceName, new Action <bool>((flg) => { })); #endregion } if (canInit) { //设置DNS NetWorkAdapter.SetNetworkAdapter(Constant.DNS1); //设置置顶 MainWindow.mainWindow.Topmost = true; #region 会话配置 if (successed && string.IsNullOrEmpty(meetAddress)) { #region 禁止其他人进行查询完之后直接进行会话初始化(有可能在其中过程当中,第一个开启会话的人还没有准备完毕,所以记进行一次通知) ModelManage.ConferenceLyncConversation.ForbiddenConversationInit(Constant.ConferenceName, new Action <bool>((flg) => { })); #endregion //判断主会话是否存在 if (LyncHelper.MainConversation == null) { //参会人列表 List <string> list = Constant.ParticipantList.Where(Item => Item.Equals(Constant.SelfUri)).ToList <string>(); //添加对应大屏 list.Add(Constant.BigScreenName); //开启会话 LyncHelper.StartConference(Constant.lyncClient, Constant.ConferenceName, Constant.SelfName, list, LyncHelper.MainConversation); //获取会议地址上传到服务器 this.UPloadMeetAddressAndCancelLock(successed); } } else { //使用浏览器的方式参会 this.JoinConversationByWebBrowser(meetAddress); } #endregion } else { TimerJob.StartRun(new Action(() => { this.LyncConversationInit(); }), 1200); } })); })); } catch (Exception ex) { LogManage.WriteLog(this.GetType(), ex); } finally { } }