Exemplo n.º 1
0
 /// <summary>
 /// 会话移除联系人事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void Conversation_ParticipantRemoved(object sender, Microsoft.Lync.Model.Conversation.ParticipantCollectionChangedEventArgs e)
 {
     try
     {
         //获取uri(处理)
         string uri = e.Participant.Contact.Uri.Replace("sip:", string.Empty);;
         if (Constant.DicParticipant.ContainsKey(uri))
         {
             this.Dispatcher.BeginInvoke(new Action(() =>
             {
                 try
                 {
                     //添加参与人名称列表
                     this.ConversationCardPartical_Remove(Constant.DicParticipant[uri]);
                 }
                 catch (Exception ex)
                 {
                     LogManage.WriteLog(this.GetType(), ex);
                 };
             }));
         }
     }
     catch (Exception ex)
     {
         LogManage.WriteLog(this.GetType(), ex);
     }
 }
Exemplo n.º 2
0
 void Conversation_ParticipantAdded(object sender, Microsoft.Lync.Model.Conversation.ParticipantCollectionChangedEventArgs e)
 {
     if (e.Participant.IsSelf == false)
     {
         if (((Conversation)sender).Modalities.ContainsKey(ModalityTypes.InstantMessage))
         {
             //((Microsoft.Lync.Model.Conversation.InstantMessageModality)e.Participant.Modalities[ModalityTypes.InstantMessage]).InstantMessageReceived += new EventHandler<MessageSentEventArgs>(MainWindow_InstantMessageReceived);
             //((Microsoft.Lync.Model.Conversation.InstantMessageModality)e.Participant.Modalities[ModalityTypes.InstantMessage]).IsTypingChanged += new EventHandler<IsTypingChangedEventArgs>(MainWindow_IsTypingChanged);
         }
     }
 }
Exemplo n.º 3
0
 void Conversation_ParticipantAdded(object sender, Microsoft.Lync.Model.Conversation.ParticipantCollectionChangedEventArgs args)
 {
     (args.Participant.Modalities[ModalityTypes.InstantMessage] as InstantMessageModality).InstantMessageReceived += InstantMessageModality_InstantMessageReceived;
     if (args.Participant.Contact == myself.Contact)
     {
         consoleWriteLine("You were added.");
     }
     else
     {
         consoleWriteLine("Participant was added: " + args.Participant.Contact.GetContactInformation(ContactInformationType.DisplayName));
     }
 }