Пример #1
0
        public bool SetConversationArea_Conversation2()
        {
            bool isChanged = false;

            try
            {
                if (this.isCanNavicateConversationView)
                {
                    if (LyncHelper.MainConversation != null && LyncHelper.MainConversation.State == ConversationWindowState.Initialized && LyncHelper.MainConversation.IsDocked)
                    {
                        this.borConversation.Child = null;
                        this.borConversation.Child = this.conversationHost;

                        LyncHelper.ShowWindowContent();
                        LyncHelper.FullScreen();

                        isChanged = true;
                    }
                }
            }
            catch (Exception ex)
            {
                LogManage.WriteLog(this.GetType(), ex);
            }
            finally
            {
            }
            return(isChanged);
        }
Пример #2
0
        /// <summary>
        /// 会话视图显示
        /// </summary>
        public bool SetConversationArea_Conversation()
        {
            bool isChanged = false;

            try
            {
                if (this.IsCanNavicateConversationView)
                {
                    if (LyncHelper.MainConversation != null && LyncHelper.MainConversation.State == ConversationWindowState.Initialized && LyncHelper.MainConversation.IsDocked)
                    {
                        //double width = this.conversationHost.ActualWidth;
                        //double height = this.conversationHost.ActualHeight;

                        //this.conversationHost.Width = 1;
                        //this.conversationHost.Height = 1;

                        LyncHelper.ShowWindowContent();
                        LyncHelper.FullScreen();

                        this.borConversation.Child = null;
                        this.borConversation.Child = this.conversationHost;



                        //this.conversationHost.Width = width;
                        //this.conversationHost.Height = height;

                        //封装的会话窗体内部实例
                        //uc.ConversationWindowClass conversationWindowClass = LyncHelper.MainConversation.InnerObject as uc.ConversationWindowClass;
                        //if (conversationWindowClass != null)
                        //{
                        //    conversationWindowClass.SetPreferredAnnotationTool(uc.AnnotationTool.ucAnnotationToolDrawArrowLine, 0x000000FF);
                        //}

                        isChanged = true;
                    }
                }
            }
            catch (Exception ex)
            {
                LogManage.WriteLog(this.GetType(), ex);
            }
            finally
            {
            }
            return(isChanged);
        }
Пример #3
0
 public void DockInit(bool isSuccessed)
 {
     try
     {
         if (isSuccessed)
         {
             DispatcherTimer timer = null;
             TimerJob.StartRun(new Action(() =>
             {
                 LyncHelper.ShowWindowContent();
                 bool result = LyncHelper.FullScreen();
                 if (result)
                 {
                     if (LyncHelper.MainConversation.IsFullScreen)
                     {
                         timer.Stop();
                         this.IsCanNavicateConversationView = true;
                         this.SetConversationAreaShow(ShowType.ConversationView, false);
                     }
                 }
             }), 1000, out timer);
         }
         else
         {
             System.Windows.Forms.Panel panel = this.conversationHost.panel;
             LyncHelper.DockToNewParentWindow(panel.Handle, this.DockInit);
         }
     }
     catch (Exception ex)
     {
         LogManage.WriteLog(this.GetType(), ex);
     }
     finally
     {
     }
 }