Example #1
0
 /// <summary>
 /// 场景模式切换
 /// </summary>
 /// <param name="args">通讯基础数据包</param>
 private void Info_Model(C_BaseData args)
 {
     try
     {
         //是否为精简模式
         bool isSimpleModel = args.ConferenceInfoFlg.ConferenceInfoTypeChangeEntity.IsSimpleModel;
         //是否为教育模式
         bool isEducationModel = args.ConferenceInfoFlg.ConferenceInfoTypeChangeEntity.IsEducationModel;
         //模式管理中心
         this.Model_ManageCenter(isEducationModel, isSimpleModel);
         if (Constant.TempConferenceInformationEntity != null)
         {
             //当前临时会议信息更改(模式相关字段)
             Constant.TempConferenceInformationEntity.SimpleMode    = isSimpleModel;
             Constant.TempConferenceInformationEntity.EducationMode = isEducationModel;
         }
     }
     catch (Exception ex)
     {
         LogManage.WriteLog(this.GetType(), ex);
     }
     finally
     {
     }
 }
Example #2
0
 /// <summary>
 /// ppt控制
 /// </summary>
 /// <param name="args">通讯基础数据包</param>
 private void Lync_PPT(C_BaseData args)
 {
     try
     {
         //ppt共享
         if (args.LyncConversationFlg.PPTControlEntity.Controler.Equals(Constant.LoginUserName))
         {
             if (ViewSelectedItemEnum == view_Selected.Resource)
             {
                 if (this.ConversationM.PageIndex == ResourceType.Share)
                 {
                     //模仿鼠标点击
                     Win32API.SetCursorPos(System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width / 2, System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height / 2);
                     Win32API.mouse_event(Win32API.MouseEventFlag.LeftDown, 0, 0, 0, UIntPtr.Zero);
                     Win32API.mouse_event(Win32API.MouseEventFlag.LeftUp, 0, 0, 0, UIntPtr.Zero);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         LogManage.WriteLog(this.GetType(), ex);
     }
     finally
     {
     }
 }
Example #3
0
 /// <summary>
 /// 智存空间同步辅助
 /// </summary>
 void ConferenceSpaceSyncHelper(ConferenceWebCommon.Common.PackageBase args)
 {
     try
     {
         //获取智存空间文件共享映射实体数据
         ConferenceWebCommon.EntityHelper.ConferenceOffice.ConferenceSpaceAsyncEntity conferenceOfficeAsyncEntity = args.ConferenceSpaceAsyncEntity;
         try
         {
             if (ForceToNavicateEvent != null)
             {
                 this.ForceToNavicateEvent(ConferenceCommon.EnumHelper.ViewSelectedItemEnum.Resource);
             }
             //打开文件【word,excel,ppt】
             this.ConversationM.FileOpenByExtension((FileType)conferenceOfficeAsyncEntity.FileType, conferenceOfficeAsyncEntity.Uri);
             this.ConversationM.PageIndex                = ResourceType.Normal;
             this.ConversationM.ResourcePusher           = conferenceOfficeAsyncEntity.Sharer;
             this.ConversationM.ResourcePusherVisibility = System.Windows.Visibility.Visible;
         }
         catch (Exception ex)
         {
             LogManage.WriteLog(this.GetType(), ex);
         }
     }
     catch (OperationException ex)
     {
         LogManage.WriteLog(this.GetType(), ex);
     };
 }
Example #4
0
        void ConferenceTreeSyncHelper(ConferenceWebCommon.Common.PackageBase args)
        {
            try
            {
                if (args.ConferenceTreeFlg != null)
                {
                    switch (args.ConferenceTreeFlg.ConferenceTreeFlgType)
                    {
                    case ConferenceWebCommon.EntityHelper.ConferenceTree.ConferenceTreeFlgType.normal:
                        //知识树子节点点对点进行同步
                        ConferenceTreeItem.Information_Sync(EntityTransfer.TreeTransferEntityChanged(args.ConferenceTreeFlg.ConferenceTreeItemTransferEntity));
                        break;

                    case ConferenceWebCommon.EntityHelper.ConferenceTree.ConferenceTreeFlgType.instead:
                        ConferenceWebCommon.EntityHelper.ConferenceTree.ConferenceTreeInsteadEntity insteadEntity = args.ConferenceTreeFlg.ConferenceTreeInsteadEntity;

                        this.ConferenceTreeView.InsteadElement(insteadEntity.BeforeItemGuid, insteadEntity.NowItemGuid);

                        break;

                    default:
                        break;
                    }
                }
            }
            catch (Exception ex)
            {
                LogManage.WriteLog(this.GetType(), ex);
            }
        }
Example #5
0
 /// <summary>
 /// 矩阵同步辅助
 /// </summary>
 /// <param name="args">通讯基础数据包</param>
 void ConferenceMatrixSyncHelper(C_BaseData args)
 {
     try
     {
         //矩阵切换
         if (args.ConferenceMatrixBase is maxtrix.ConferenceMatrixEntity)
         {
             //类型还原
             maxtrix.ConferenceMatrixEntity conferenceMatrixEntity = args.ConferenceMatrixBase as maxtrix.ConferenceMatrixEntity;
             //非同一线程,进行线程异步委托
             this.Dispatcher.BeginInvoke(new Action(() =>
             {
                 try
                 {
                     //接受到投影通知
                     //this.ChairView.RecieveSilexNotification(conferenceMatrixEntity.Sharer, (int)conferenceMatrixEntity.ConferenceMatrixOutPut);
                 }
                 catch (Exception ex)
                 {
                     LogManage.WriteLog(this.GetType(), ex);
                 }
                 finally
                 {
                 }
             }));
         }
         //位置变动
         else if (args.ConferenceMatrixBase is maxtrix.SeatEntity)
         {
             //非同一线程,进行线程异步委托
             this.Dispatcher.BeginInvoke(new Action(() =>
             {
                 try
                 {
                     //更改座位信息
                     //this.ChairView.UpdateOneSeat(args.ConferenceMatrixBase as maxtrix.SeatEntity);
                     //更改座位信息
                     this.MyConferenceView.UpdateOneSeat(args.ConferenceMatrixBase as maxtrix.SeatEntity);
                 }
                 catch (Exception ex)
                 {
                     LogManage.WriteLog(this.GetType(), ex);
                 }
                 finally
                 {
                 }
             }));
         }
     }
     catch (Exception ex)
     {
         LogManage.WriteLog(this.GetType(), ex);
     }
 }
Example #6
0
        /// <summary>
        /// lync同步辅助
        /// </summary>
        /// <param name="args">通讯基础数据包</param>
        void LyncConversationSyncHelper(C_BaseData args)
        {
            try
            {
                //异步委托
                this.Dispatcher.BeginInvoke(new Action(() =>
                {
                    try
                    {
                        switch (args.LyncConversationFlg.LyncConversationFlgType)
                        {
                        case lync_webData.LyncConversationFlgType.InviteContact:
                            //获取信息同步映射实体数据
                            //lync_webData.LyncConversationEntity conferenceInfoEntity = args.LyncConversationFlg.LyncConversationEntity;
                            //邀请某人进入会话
                            //lyncEventManage.InviteSomeOneJoinMainConference(Constant.lyncClient, MainConversation, conferenceInfoEntity.JonConferencePerson);
                            break;

                        case lync_webData.LyncConversationFlgType.EnterBigScreen:
                            //投影大屏幕
                            this.Lync_BigScreenEnter(args);
                            break;

                        case lync_webData.LyncConversationFlgType.PPTControl:
                            //ppt控制
                            this.Lync_PPT(args);
                            break;

                        case lync_webData.LyncConversationFlgType.LeaveConversation:
                            //离开会议
                            MainPage.Lync_Leave(args);

                            break;

                        default:
                            break;
                        }
                    }
                    catch (Exception ex)
                    {
                        LogManage.WriteLog(this.GetType(), ex);
                    }
                    finally
                    {
                    }
                }));
            }
            catch (Exception ex)
            {
                LogManage.WriteLog(this.GetType(), ex);
            }
        }
Example #7
0
 /// <summary>
 /// 离开会议
 /// </summary>
 /// <param name="args"></param>
 private static void Lync_Leave(C_BaseData args)
 {
     try
     {
         //lync联系人异常实体
         lync_webData.LeaveConversationEntity leaveConversationEntity = args.LyncConversationFlg.LeaveConversationEntity;
         //退出会议的参会人
         string contactUri = leaveConversationEntity.ContactUri;
         //异常参会人
         LyncHelper.RemovePartical(contactUri);
     }
     catch (Exception ex)
     {
         LogManage.WriteLog(typeof(MainPageBase), ex);
     }
     finally
     {
     }
 }
Example #8
0
 /// <summary>
 /// 页面同步
 /// </summary>
 /// <param name="args">通讯基础数据包</param>
 private void Info_Page(C_BaseData args)
 {
     try
     {
         //获取信息同步映射实体数据
         info_webData.ConferenceInfoEntity conferenceInfoEntity = args.ConferenceInfoFlg.ConferenceInfoEntity;
         //强制指定到具体页面
         if (ForceToNavicateCallBack != null)
         {
             this.ForceToNavicateCallBack((view_Selected)conferenceInfoEntity.ConferencePageType);
         }
     }
     catch (Exception ex)
     {
         LogManage.WriteLog(this.GetType(), ex);
     }
     finally
     {
     }
 }
 protected void clientSocket_TCPDataArrival(ConferenceWebCommon.Common.PackageBase args)
 {
     try
     {
         if (Thread.CurrentThread.IsAlive)
         {
             if (this.clientSocket_TCPDataArrivalCallBack != null)
             {
                 this.clientSocket_TCPDataArrivalCallBack(args);
             }
         }
     }
     catch (Exception ex)
     {
         //LogManage.WriteLog(this.GetType(), ex);
     }
     finally
     {
     }
 }
Example #10
0
        /// <summary>
        /// 信息同步辅助
        /// </summary>
        void ConferenceInfoSyncHelper(C_BaseData args)
        {
            try
            {
                //异步委托
                this.Dispatcher.BeginInvoke(new Action(() =>
                {
                    try
                    {
                        switch (args.ConferenceInfoFlg.ConferenceInfoFlgType)
                        {
                        case info_webData.ConferenceInfoFlgType.ConferenceInfoEntity:
                            //页面同步
                            this.Info_Page(args);
                            break;

                        case info_webData.ConferenceInfoFlgType.ConferenceInfoTypeChangeEntity:
                            //场景模式切换
                            this.Info_Model(args);
                            break;

                        case info_webData.ConferenceInfoFlgType.ConferenceClientControlEntity:
                            //信息控制
                            MainPageBase.Info_Control(args);
                            break;

                        default:
                            break;
                        }
                    }
                    catch (Exception ex)
                    {
                        LogManage.WriteLog(this.GetType(), ex);
                    }
                }));
            }
            catch (Exception ex)
            {
                LogManage.WriteLog(this.GetType(), ex);
            }
        }
Example #11
0
 /// <summary>
 /// 投影大屏幕
 /// </summary>
 /// <param name="args">通讯基础数据包</param>
 private void Lync_BigScreenEnter(C_BaseData args)
 {
     try
     {
         //大屏实体
         lync_webData.BigScreenEnterEntity bigScreenEnterEntity = args.LyncConversationFlg.BigScreenEnterEntity;
         //更改状态
         MainWindow.mainWindow.mainPage.SharingPanel.UpdateState(bigScreenEnterEntity.Sharer);
         //显示投影人
         MainPage.mainPage.presentCallBack(bigScreenEnterEntity.Sharer);
         //判断大屏投影人是否为当前参会人
         if (!bigScreenEnterEntity.Sharer.Equals(Constant.SelfName))
         {
             //强制导航到资源共享
             MainPage.mainPage.ForceToNavicate(view_Selected.Resource);
             //共享协作页面
             this.ConversationM.PageIndex = ResourceType.Share;
             //进行最大化显示
             if (MainWindow.mainWindow.WindowState == WindowState.Minimized)
             {
                 MainWindow.mainWindow.WindowState = WindowState.Maximized;
             }
             //设置会话区域显示内容
             this.ConversationM.SetConversationAreaShow(ShowType.ConversationView, true);
         }
         else if (bigScreenEnterEntity.Sharer.Equals(Constant.SelfName))
         {
             //加载大屏幕
             LyncHelper.InviteSomeOneJoinMainConference(Constant.lyncClient, LyncHelper.MainConversation, Constant.BigScreenName);
             //设置会话区域显示内容
             this.ConversationM.SetConversationAreaShow(ShowType.SelfDeskTopShowView, true);
         }
     }
     catch (Exception ex)
     {
         LogManage.WriteLog(this.GetType(), ex);
     }
     finally
     {
     }
 }
Example #12
0
        /// <summary>
        /// 知识树区域同步辅助
        /// </summary>
        /// <param name="args">通讯基础数据包</param>
        void ConferenceTreeSyncHelper(C_BaseData args)
        {
            try
            {
                //异步委托
                this.Dispatcher.BeginInvoke(new Action(() =>
                {
                    //知识树判断不为null
                    if (this.conferenceTreeView != null)
                    {
                        if (args.ConferenceTreeFlg != null)
                        {
                            //知识树操作模式
                            switch (args.ConferenceTreeFlg.ConferenceTreeFlgType)
                            {
                            case tree_webData.ConferenceTreeFlgType.normal:
                                //知识树子节点点对点进行同步
                                ConferenceTreeItem.Information_Sync(EntityTransfer.TreeTransferEntityChanged(args.ConferenceTreeFlg.ConferenceTreeItemTransferEntity));
                                break;

                            case tree_webData.ConferenceTreeFlgType.instead:
                                //知识树拖动
                                tree_webData.ConferenceTreeInsteadEntity insteadEntity = args.ConferenceTreeFlg.ConferenceTreeInsteadEntity;
                                //知识树节点替换
                                this.ConferenceTreeView.InsteadElement(insteadEntity.BeforeItemGuid, insteadEntity.NowItemGuid);

                                break;

                            default:
                                break;
                            }
                        }
                    }
                }));
            }
            catch (Exception ex)
            {
                LogManage.WriteLog(this.GetType(), ex);
            }
        }
Example #13
0
 /// <summary>
 /// 信息交流同步辅助
 /// </summary>
 /// <param name="args">通讯基础数据包</param>
 private void ConferenceIMMSyncHelper(C_BaseData args)
 {
     try
     {
         //非同一线程,进行线程异步委托
         this.Dispatcher.BeginInvoke(new Action(() =>
         {
             if (this.conferenceAudio_View != null)
             {
                 //收到通知获当前同步取节点
                 this.ConferenceAudio_View.Information_Sync(EntityTransfer.AudioTransferEntityChanged(args.ConferenceAudioItemTransferEntity));
             }
         }));
     }
     catch (Exception ex)
     {
         LogManage.WriteLog(this.GetType(), ex);
     }
     finally
     {
     }
 }
Example #14
0
        /// <summary>
        /// 信息控制
        /// </summary>
        /// <param name="args">通讯基础数据包</param>
        private static void Info_Control(C_BaseData args)
        {
            try
            {
                //操作人
                string sharer = args.ConferenceInfoFlg.ConferenceClientControlEntity.Sharer;
                switch (args.ConferenceInfoFlg.ConferenceClientControlEntity.ClientControlType)
                {
                case info_webData.ClientControlType.Close:
                    //关闭其他参会人
                    if (sharer != Constant.SelfUri)
                    {
                        Application.Current.Shutdown(0);
                    }
                    break;

                case info_webData.ClientControlType.VersionUpdate:
                    //强制其他参会人进行版本更新
                    if (sharer != Constant.SelfUri)
                    {
                        //版本检测更新
                        VersionUpdateManage.JustUpdate(Constant.ConferenceVersionUpdateExe);
                    }
                    break;

                default:
                    break;
                }
            }
            catch (Exception ex)
            {
                LogManage.WriteLog(typeof(MainPageBase), ex);
            }
            finally
            {
            }
        }
Example #15
0
 /// <summary>
 /// 智存空间同步辅助
 /// </summary>
 /// <param name="args">通讯基础数据包</param>
 void ConferenceSpaceSyncHelper(C_BaseData args)
 {
     try
     {
         //获取智存空间文件共享映射实体数据
         space_webData.ConferenceSpaceAsyncEntity conferenceOfficeAsyncEntity = args.ConferenceSpaceAsyncEntity;
         try
         {
             //异步委托
             this.Dispatcher.BeginInvoke(new Action(() =>
             {
                 if (ForceToNavicateCallBack != null)
                 {
                     //强制导航到共享页面
                     this.ForceToNavicateCallBack(view_Selected.Resource);
                 }
                 //打开文件【word,excel,ppt】Wait_Singned
                 this.ConversationM.FileOpenByExtension((ConferenceCommon.WPFControl.FileType)conferenceOfficeAsyncEntity.FileType, conferenceOfficeAsyncEntity.Uri);
                 //共享协作页面指定
                 this.ConversationM.PageIndex = ResourceType.Normal;
                 //共享协作共享演示者
                 this.ConversationM.ResourcePusher = conferenceOfficeAsyncEntity.Sharer;
                 //推送者显示
                 this.ConversationM.ResourcePusherVisibility = System.Windows.Visibility.Visible;
             }));
         }
         catch (Exception ex)
         {
             LogManage.WriteLog(this.GetType(), ex);
         }
     }
     catch (OperationException ex)
     {
         LogManage.WriteLog(this.GetType(), ex);
     };
 }
Example #16
0
        /// <summary>
        /// 接收从远程主机发送的数据(服务器端)
        /// </summary>
        private void GetRemoteData()
        {
            var dd = this._clientSocket.Available;

            try
            {
                while (this._clientSocket != null)
                {
                    ConferenceWebCommon.Common.PackageBase code = null;
                    List <byte> lists = new List <byte>();
callBack:
                    byte[] buffer = new byte[BUFFER_SIZE];

                    int count = this._clientSocket.Receive(buffer);//挂起操作
                    if (this._clientSocket == null)
                    {
                        break;
                    }
                    if (count == 0)
                    {
                        //客户端与服务器端断开连接
                        break;
                    }
                    if (count == BUFFER_SIZE)
                    {
                        lists.AddRange(buffer);
                    }
                    else if (count < BUFFER_SIZE)
                    {
                        byte[] dataless = new byte[count];
                        Array.Copy(buffer, dataless, count);
                        lists.AddRange(dataless);
                    }
                    if (this._clientSocket.Available != 0)
                    {
                        goto callBack;
                    }

                    byte[] data = lists.ToArray();
                    lists.Clear();
                    lists = null;
                    MemoryStream stream = null;

                    using (stream = new MemoryStream(data))
                    {
                        stream.Position = 0;
                        BinaryFormatter formatter = new BinaryFormatter();
                        code = formatter.Deserialize(stream) as ConferenceWebCommon.Common.PackageBase;
                    }
                    Array.Clear(data, 0, data.Length);
                    data = null;
                    //this._clientSocket.Close();
                    if (this.TCPDataArrivalCallBack != null)
                    {
                        this.TCPDataArrivalCallBack(code);
                    }
                }
            }
            catch (Exception)
            {
            }
        }
Example #17
0
        /// <summary>
        /// 信息同步辅助
        /// </summary>
        void ConferenceInfoSyncHelper(ConferenceWebCommon.Common.PackageBase args)
        {
            try
            {
                this.Dispatcher.BeginInvoke(new Action(() =>
                {
                    try
                    {
                        switch (args.ConferenceInfoFlg.ConferenceInfoFlgType)
                        {
                        case ConferenceWebCommon.EntityHelper.ConferenceInfo.ConferenceInfoFlgType.ConferenceInfoEntity:
                            //获取信息同步映射实体数据
                            ConferenceWebCommon.EntityHelper.ConferenceInfo.ConferenceInfoEntity conferenceInfoEntity = args.ConferenceInfoFlg.ConferenceInfoEntity;

                            if (ForceToNavicateEvent != null)
                            {
                                this.ForceToNavicateEvent((ConferenceCommon.EnumHelper.ViewSelectedItemEnum)conferenceInfoEntity.ConferencePageType);
                            }
                            break;

                        case ConferenceWebCommon.EntityHelper.ConferenceInfo.ConferenceInfoFlgType.ConferenceInfoTypeChangeEntity:

                            bool isSimpleModel    = args.ConferenceInfoFlg.ConferenceInfoTypeChangeEntity.IsSimpleModel;
                            bool isEducationModel = args.ConferenceInfoFlg.ConferenceInfoTypeChangeEntity.IsEducationModel;

                            //教育模式
                            if (this.ViewModelChangedEducationEvent != null)
                            {
                                this.ViewModelChangedEducationEvent(isEducationModel);
                            }
                            //精简模式
                            if (this.ViewModelChangedSimpleEvent != null)
                            {
                                this.ViewModelChangedSimpleEvent(isSimpleModel);
                            }
                            if (TempConferenceInformationEntity != null)
                            {
                                //当前临时会议信息更改(模式相关字段)
                                TempConferenceInformationEntity.SimpleMode    = isSimpleModel;
                                TempConferenceInformationEntity.EducationMode = isEducationModel;
                            }

                            break;

                        case ConferenceWebCommon.EntityHelper.ConferenceInfo.ConferenceInfoFlgType.ConferenceClientControlEntity:
                            string sharer = args.ConferenceInfoFlg.ConferenceClientControlEntity.Sharer;
                            switch (args.ConferenceInfoFlg.ConferenceClientControlEntity.ClientControlType)
                            {
                            case ConferenceWebCommon.EntityHelper.ConferenceInfo.ClientControlType.Close:
                                if (sharer != Constant.SelfUri)
                                {
                                    Application.Current.Shutdown(0);
                                }
                                break;

                            case ConferenceWebCommon.EntityHelper.ConferenceInfo.ClientControlType.VersionUpdate:
                                if (sharer != Constant.SelfUri)
                                {
                                    VersionUpdateManage.JustUpdate(Constant.ConferenceVersionUpdateExe);
                                }
                                break;

                            default:
                                break;
                            }
                            break;

                        default:
                            break;
                        }
                    }
                    catch (Exception ex)
                    {
                        LogManage.WriteLog(this.GetType(), ex);
                    }
                }));
            }
            catch (Exception ex)
            {
                LogManage.WriteLog(this.GetType(), ex);
            }
        }
Example #18
0
        /// <summary>
        /// 接收到其他参会人所发送的数据
        /// </summary>
        /// <param name="args">通讯基础数据包</param>
        protected void clientSocket_TCPDataArrival(C_BaseData args)
        {
            try
            {
                lock (Communication_Object)
                {
                    switch (args.ConferenceClientAcceptType)
                    {
                    //研讨树
                    case aceeptType_Common.ConferenceTree:
                        //知识树同步辅助
                        this.ConferenceTreeSyncHelper(args);

                        break;

                    //语音研讨
                    case aceeptType_Common.ConferenceAudio:
                        //信息交流同步辅助
                        ConferenceIMMSyncHelper(args);
                        break;

                    case aceeptType_Common.ConferenceFileSync:
                        //甩屏同步辅助
                        this.ConferenceFileSyncHelper();

                        break;

                    case aceeptType_Common.ConferenceSpaceSync:

                        //智存空间同步辅助
                        this.ConferenceSpaceSyncHelper(args);

                        break;

                    case aceeptType_Common.ConferenceInfoSync:
                        //信息同步辅助
                        this.ConferenceInfoSyncHelper(args);

                        break;

                    case aceeptType_Common.LyncConversationSync:
                        //lync同步辅助
                        this.LyncConversationSyncHelper(args);

                        break;

                    case aceeptType_Common.ConferenceMatrixSync:
                        //矩阵同步辅助
                        this.ConferenceMatrixSyncHelper(args);
                        break;

                    default:
                        break;
                    }
                }
            }
            catch (Exception ex)
            {
                //LogManage.WriteLog(this.GetType(), ex);
            }
        }
Example #19
0
        /// <summary>
        /// lync同步辅助
        /// </summary>
        /// <param name="args"></param>
        void LyncConversationSyncHelper(ConferenceWebCommon.Common.PackageBase args)
        {
            try
            {
                this.Dispatcher.BeginInvoke(new Action(() =>
                {
                    try
                    {
                        switch (args.LyncConversationFlg.LyncConversationFlgType)
                        {
                        case ConferenceWebCommon.EntityHelper.LyncConversation.LyncConversationFlgType.InviteContact:
                            //获取信息同步映射实体数据
                            ConferenceWebCommon.EntityHelper.LyncConversation.LyncConversationEntity conferenceInfoEntity = args.LyncConversationFlg.LyncConversationEntity;
                            //邀请某人进入会话
                            //lyncEventManage.InviteSomeOneJoinMainConference(Constant.lyncClient, MainConversation, conferenceInfoEntity.JonConferencePerson);
                            break;

                        case ConferenceWebCommon.EntityHelper.LyncConversation.LyncConversationFlgType.EnterBigScreen:
                            ConferenceWebCommon.EntityHelper.LyncConversation.BigScreenEnterEntity bigScreenEnterEntity = args.LyncConversationFlg.BigScreenEnterEntity;

                            //更改状态
                            MainWindow.mainWindow.mainPage.SharingPanel.UpdateState(bigScreenEnterEntity.Sharer);
                            //显示投影人
                            MainWindow.MainPageInstance.GetPresenterCallBack(bigScreenEnterEntity.Sharer);

                            if (!bigScreenEnterEntity.Sharer.Equals(Constant.SelfName))
                            {
                                //强制导航到资源共享
                                MainWindow.MainPageInstance.ForceToNavicate(ConferenceCommon.EnumHelper.ViewSelectedItemEnum.Resource);

                                this.ConversationM.PageIndex = ResourceType.Share;
                                if (MainWindow.mainWindow.WindowState == WindowState.Minimized)
                                {
                                    MainWindow.mainWindow.WindowState = WindowState.Maximized;
                                }

                                //设置会话区域显示内容
                                this.ConversationM.SetConversationAreaShow(ShowType.ConversationView, true);
                            }
                            else if (bigScreenEnterEntity.Sharer.Equals(Constant.SelfName))
                            {
                                //加载大屏幕
                                LyncHelper.InviteSomeOneJoinMainConference(Constant.lyncClient, LyncHelper.MainConversation, Constant.BigScreenName);
                                //设置会话区域显示内容
                                this.ConversationM.SetConversationAreaShow(ShowType.SelfDeskTopShowView, true);
                            }
                            break;

                        case ConferenceWebCommon.EntityHelper.LyncConversation.LyncConversationFlgType.PPTControl:

                            if (args.LyncConversationFlg.PPTControlEntity.Controler.Equals(Constant.LoginUserName))
                            {
                                if (ViewSelectedItemEnum == ConferenceCommon.EnumHelper.ViewSelectedItemEnum.Resource)
                                {
                                    if (this.ConversationM.PageIndex == ResourceType.Share)
                                    {
                                        //模仿鼠标点击
                                        Win32API.SetCursorPos(System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width / 2, System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height / 2);
                                        Win32API.mouse_event(Win32API.MouseEventFlag.LeftDown, 0, 0, 0, UIntPtr.Zero);
                                        Win32API.mouse_event(Win32API.MouseEventFlag.LeftUp, 0, 0, 0, UIntPtr.Zero);
                                    }
                                }
                            }

                            break;

                            #region old solution

                            //if (MainWindow.MainPageInstance.TempConferenceInformationEntity.RunCKOAPP)
                            //{
                            //    if (bigScreenEnterEntity.Sharer.Equals(Constant.SelfUri))
                            //    {
                            //        #region old solution

                            //        //主窗体最小化
                            //        MainWindow.mainWindow.WindowState = WindowState.Minimized;
                            //        Process[] processList = Process.GetProcessesByName(Path.GetFileNameWithoutExtension(Constant.CkoAirFileName));

                            //        if (processList.Count() > 0)
                            //        {
                            //            System.Windows.Forms.SendKeys.SendWait("^+{f}");
                            //        }
                            //        else
                            //        {
                            //            this.CKOIsRuning = true;
                            //            ProcessManage.OpenFileByLocalAddress(Environment.CurrentDirectory + "\\" + Constant.CkoAirFileName);
                            //        }

                            //        #endregion

                            //        #region old solution

                            //        //if (!this.CKOIsRuning)
                            //        //{
                            //        //    this.CKOIsRuning = true;
                            //        //    ProcessManage.OpenFileByLocalAddress(Environment.CurrentDirectory + "\\" + Constant.CkoAirFileName);
                            //        //    //TimerJob.StartRun(new Action(() =>
                            //        //    //    {
                            //        //    //        Process[] processList = Process.GetProcessesByName("CkoAir");
                            //        //    //        if (processList.Count() > 0 && processList[0].MainWindowHandle.ToInt32() > 0)
                            //        //    //        {
                            //        //    //            //获取当前会话窗体的句柄
                            //        //    //            IntPtr Handle = processList[0].MainWindowHandle;

                            //        //    //            ////获取会话窗体的状态
                            //        //    //            //Win32API.GetWindowPlacement(Handle, ref this.Placement2);
                            //        //    //            ////最小话窗体
                            //        //    //            //this.Placement2.showCmd =2;
                            //        //    //            //Win32API.SetWindowPlacement(Handle, ref this.Placement2);

                            //        //    //            var dd = WindowHide.GetHandleList(Handle.ToInt32());
                            //        //    //            var dd2 = WindowHide.GetHandleList(processList[0].Handle.ToInt32());

                            //        //    //            CkoManageTimer.Stop();
                            //        //    //        }
                            //        //    //    }), 100, out CkoManageTimer);
                            //        //}
                            //        //else
                            //        //{
                            //        //    System.Windows.Forms.SendKeys.SendWait("^+{f}");
                            //        //}

                            //        #endregion
                            //    }
                            //    else
                            //    {
                            //        //TimerJob.StartRun(new Action(() =>
                            //        //   {
                            //        //System.Windows.Forms.SendKeys.SendWait("^+{s}");
                            //        //}));
                            //        //主窗体最小化
                            //        MainWindow.mainWindow.WindowState = WindowState.Maximized;
                            //    }
                            //}

                            #endregion


                        case ConferenceWebCommon.EntityHelper.LyncConversation.LyncConversationFlgType.LeaveConversation:
                            if (LyncHelper.MainConversation != null)
                            {
                                ConferenceWebCommon.EntityHelper.LyncConversation.LeaveConversationEntity leaveConversationEntity = args.LyncConversationFlg.LeaveConversationEntity;
                                string contactUri = leaveConversationEntity.ContactUri;

                                foreach (var item in LyncHelper.MainConversation.Conversation.Participants)
                                {
                                    if (item.Contact.Uri.Equals("sip:" + contactUri))
                                    {
                                        LyncHelper.MainConversation.Conversation.RemoveParticipant(item);
                                        break;
                                    }
                                }
                            }
                            break;

                        default:
                            break;
                        }
                    }
                    catch (Exception ex)
                    {
                        LogManage.WriteLog(this.GetType(), ex);
                    }
                    finally
                    {
                    }
                }));
            }
            catch (Exception ex)
            {
                LogManage.WriteLog(this.GetType(), ex);
            }
        }
Example #20
0
        /// <summary>
        /// 接收到其他参会人所发送的数据
        /// </summary>
        /// <param name="args"></param>
        protected void clientSocket_TCPDataArrival(ConferenceWebCommon.Common.PackageBase args)
        {
            try
            {
                lock (obj1)
                {
                    switch (args.ConferenceClientAcceptType)
                    {
                    //研讨树
                    case ConferenceWebCommon.Common.ConferenceClientAcceptType.ConferenceTree:

                        this.Dispatcher.BeginInvoke(new Action(() =>
                        {
                            if (this.conferenceTreeView != null)
                            {
                                //知识树同步辅助
                                this.ConferenceTreeSyncHelper(args);
                            }
                        }));
                        break;

                    //语音研讨
                    case ConferenceWebCommon.Common.ConferenceClientAcceptType.ConferenceAudio:
                        //非同一线程,进行线程异步委托
                        this.Dispatcher.BeginInvoke(new Action(() =>
                        {
                            if (this.conferenceAudio_View != null)
                            {
                                //收到通知获当前同步取节点
                                this.ConferenceAudio_View.Information_Sync(EntityTransfer.AudioTransferEntityChanged(args.ConferenceAudioItemTransferEntity));
                            }
                        }));
                        break;

                    case ConferenceWebCommon.Common.ConferenceClientAcceptType.ConferenceFileSync:
                        //甩屏同步辅助
                        this.ConferenceFileSyncHelper();

                        break;

                    case ConferenceWebCommon.Common.ConferenceClientAcceptType.ConferenceSpaceSync:

                        this.Dispatcher.BeginInvoke(new Action(() =>
                        {
                            //智存空间同步辅助
                            this.ConferenceSpaceSyncHelper(args);
                        }));

                        break;

                    case ConferenceWebCommon.Common.ConferenceClientAcceptType.ConferenceInfoSync:
                        //信息同步辅助
                        this.ConferenceInfoSyncHelper(args);

                        break;

                    case ConferenceWebCommon.Common.ConferenceClientAcceptType.LyncConversationSync:
                        //lync同步辅助
                        this.LyncConversationSyncHelper(args);

                        break;

                    case ConferenceWebCommon.Common.ConferenceClientAcceptType.ConferenceMatrixSync:
                        //矩阵同步辅助
                        this.ConferenceMatrixSyncHelper(args);
                        break;

                    default:
                        break;
                    }
                }
            }
            catch (Exception ex)
            {
                LogManage.WriteLog(this.GetType(), ex);
            }
        }