Ejemplo n.º 1
0
        /// <summary>
        /// 释放所有资源
        /// </summary>
        private void DisposeAllResource()
        {
            try
            {
                //设置为不可进行会话初始化
                this.canBeginLyncConversationInit = false;

                //参会人信息清空
                ConversationCodeEnterEntity.DicParticipant.Clear();

                //离开坐席
                MyConferenceView.LeaveSeat();

                //释放资源
                this.UIAndSourceDispose();

                //检测是否可以会话初始化计时数量置零
                this.CheckConversationInitCount = 0;

                //还原默认设置
                this.ConversationM.CurrentShowType = ShowType.None;
                //可以转到会话视图
                this.ConversationM.IsCanNavicateConversationView = false;
            }
            catch (Exception ex)
            {
                LogManage.WriteLog(this.GetType(), ex);
            }
            finally
            {
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 系统关闭辅助
        /// </summary>
        private void Current_Exit_Help()
        {
            try
            {
                if (Conference.MainWindow.MainPageInstance != null)
                {
                    //离开坐席
                    //ChairView.LeaveSeat();
                    //离开坐席
                    MyConferenceView.LeaveSeat();
                    //离开会话
                    ModelManage.ConferenceLyncConversation.LeaveConversation(Constant.ConferenceName, Constant.SelfUri, new Action <bool>((successed) =>
                    {
                    }));

                    Conference.MainWindow.MainPageInstance.DisPoseServerSocketArray(Constant.ConferenceName, new Action <bool>((isSuccessed) =>
                    {
                    }));

                    //关闭二维码窗体
                    if (Conference.MainWindow.MainPageInstance.QRWindow != null)
                    {
                        Conference.MainWindow.MainPageInstance.QRWindow.Close();
                    }
                    if (Conference.MainWindow.MainPageInstance.ToolCmWindow != null)
                    {
                        Conference.MainWindow.MainPageInstance.ToolCmWindow.Close();
                    }
                }
                //Thread.Sleep(1000);
                GC.Collect();
                GC.WaitForPendingFinalizers();
                GC.Collect();
                //结束透明键盘程序
                this.DisposeTouchKeyBoardOpacityApplication();
            }
            catch (Exception ex)
            {
                LogManage.WriteLog(typeof(App), ex);
            }
            finally
            {
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 会议进入事件
        /// </summary>
        /// <param name="conferenceInformationEntity"></param>
        protected void conferenceRoom_View_ItemClick(ConferenceInformationEntityPC conferenceInformationEntity, Action callBack)
        {
            try
            {
                if (conferenceInformationEntity != null)
                {
                    #region 是否为教学模式

                    if (conferenceInformationEntity.EducationMode)
                    {
                        if (this.ViewModelChangedEducationEvent != null)
                        {
                            this.ViewModelChangedEducationEvent(true);
                        }
                    }
                    else
                    {
                        if (this.ViewModelChangedEducationEvent != null)
                        {
                            this.ViewModelChangedEducationEvent(false);
                        }
                    }

                    #endregion

                    #region 是否为精简模式

                    if (conferenceInformationEntity.SimpleMode)
                    {
                        if (this.ViewModelChangedSimpleEvent != null)
                        {
                            this.ViewModelChangedSimpleEvent(true);
                        }
                    }
                    else
                    {
                        if (this.ViewModelChangedSimpleEvent != null)
                        {
                            this.ViewModelChangedSimpleEvent(false);
                        }
                    }

                    #endregion

                    #region 释放相关资源(本地套接字、研讨会)

                    //设置为不可进行会话初始化
                    this.canBeginLyncConversationInit = false;

                    //停止保持服务器web服务持续激活(之前使用的)
                    //this.CloseWebServiceAppPoolAliveHelper();

                    //参会人信息清空
                    Constant.DicParticipant.Clear();

                    //离开坐席
                    //ChairView.LeaveSeat();
                    //离开坐席
                    MyConferenceView.LeaveSeat();

                    //释放资源
                    this.UIAndSourceDispose();

                    //检测是否可以会话初始化计时数量置零
                    this.CheckConversationInitCount = 0;

                    //还原默认设置
                    this.ConversationM.CurrentShowType = ShowType.None;
                    this.ConversationM.IsCanNavicateConversationView = false;

                    #endregion

                    #region 释放之前使用的通讯节点

                    this.IsDisposeAllSocekt = false;

                    ThreadPool.QueueUserWorkItem((o) =>
                    {
                        //释放之前使用的通讯节点
                        this.DisPoseServerSocketArray(conferenceInformationEntity.MeetingName, new Action <bool>((isCompleate) =>
                        {
                            if (isCompleate)
                            {
                                this.IsDisposeAllSocekt = true;
                            }
                        }));
                    });

                    #endregion

                    //全局信息填充及初始化
                    GlobleInfoLoadAndInit(conferenceInformationEntity, callBack);
                }
            }
            catch (Exception ex)
            {
                LogManage.WriteLog(this.GetType(), ex);
            }
        }