Exemplo n.º 1
0
        /// <summary>
        /// Handles the event raised when a participant participation state changes.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void OnSharingModalityParticipationStateChanged(object sender, ParticipationStateChangedEventArgs e)
        {
            _log.Debug("OnSharingModalityParticipationStateChanged");

            if (((ApplicationSharingModality)sender) == _sharingModality)
            {
            }
            ApplicationSharingModality participantModality = (ApplicationSharingModality)sender;

            if (participantModality.Controller != null)
            {
                string userName = participantModality.Controller.Contact.GetContactInformation(ContactInformationType.DisplayName).ToString();
            }
        }
 /// <summary>
 /// Handles the event raised when a participant participation state changes.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void _sharingModality_ParticipationStateChanged(object sender, ParticipationStateChangedEventArgs e)
 {
     if (((ApplicationSharingModality)sender) == _sharingModality)
     {
         if (e.NewState.ToString() == "None")
         {
             this.Invoke(new ChangeLabelTextDelegate(ChangeLabelText), new object[] { SharingParticipationStateString_Label, "not sharing" });
         }
         else
         {
             this.Invoke(new ChangeLabelTextDelegate(ChangeLabelText), new object[] { SharingParticipationStateString_Label, e.NewState.ToString() });
         }
         ApplicationSharingModality participantModality = (ApplicationSharingModality)sender;
         if (participantModality.Controller != null)
         {
             string userName = participantModality.Controller.Contact.GetContactInformation(ContactInformationType.DisplayName).ToString();
             this.Invoke(new ChangeLabelTextDelegate(ChangeLabelText), new object[] { SharedResource_Label, userName });
         }
     }
 }
 /// <summary>
 /// 主窗体移除(相关)
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 static void applicationSharingModality_ParticipationStateChanged(object sender, ParticipationStateChangedEventArgs e)
 {
     try
     {
         Application.Current.Dispatcher.BeginInvoke(new Action(() =>
         {
             if (e.OldState == ParticipationState.Viewing && e.NewState == ParticipationState.None)
             {
                 if (Content_DeskRemoveCompleateCallBack != null)
                 {
                     Content_DeskRemoveCompleateCallBack();
                 }
             }
         }));
     }
     catch (Exception ex)
     {
         LogManage.WriteLog(typeof(LyncHelper), ex);
     }
     finally
     {
     }
 }