Esempio n. 1
0
        /// <summary>
        /// 电子白板、ppt共享内容添加事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected static void ConversationCard_ContentAdded(object sender, ContentCollectionChangedEventArgs e)
        {
            try
            {
                App.Current.Dispatcher.BeginInvoke(new Action(() =>
                {
                    try
                    {
                        if (!ShareableContentList.Contains(e.Item))
                        {
                            //加载共享资源
                            ShareableContentList.Add(e.Item);
                        }

                        if (ContentAddCompleateCallBack != null)
                        {
                            ContentAddCompleateCallBack(e.Item.Title);
                        }
                        //属性更改事件(演示人)
                        e.Item.PropertyChanged += Item_PropertyChanged;

                        if (PresentCallBack != null)
                        {
                            if (e.Item.Owner != null)
                            {
                                object displayName = e.Item.Owner.GetContactInformation(ContactInformationType.DisplayName);
                                if (displayName != null)
                                {
                                    PresentCallBack(Convert.ToString(displayName));
                                }
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                        LogManage.WriteLog(typeof(LyncHelper), ex);
                    }
                    finally
                    {
                    }
                }));
            }
            catch (Exception ex)
            {
                LogManage.WriteLog(typeof(LyncHelper), ex);
            }
        }
Esempio n. 2
0
 /// <summary>
 /// 电子白板、ppt共享内容移除事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected static void ConversationCard_ContentRemoved(object sender, ContentCollectionChangedEventArgs e)
 {
     try
     {
         App.Current.Dispatcher.BeginInvoke(new Action(() =>
         {
             if (ShareableContentList.Contains(e.Item))
             {
                 ShareableContentList.Remove(e.Item);
             }
         }));
     }
     catch (Exception ex)
     {
         LogManage.WriteLog(typeof(LyncHelper), ex);
     }
 }