locked
lync client conversation manager wpf c# RRS feed

  • Question

  • Hi,

    I'm a biginner on developping wpf apllication with lync client and i want to know how to catch the caller id when i receive a conversation.

    Is there any tytorial or exemple of how to handle and man ipulate lyncclient ConversationManager to get the caller id when a conversation is comming?

     


    Mohamed BEN CHAABENE
    • Moved by Yves.Z Tuesday, June 7, 2011 3:27 PM lync related (From:Windows Presentation Foundation (WPF))
    Thursday, June 2, 2011 7:50 AM

Answers

  • HI,

    i have solved the probleme and this the portion of code related to it:

     private void affiche_client(object sender, RoutedEventArgs e)
      {
    
    
    IList<Conversations> ls = new IList<Conversations>();
    
    IList<Participants> lp = new IList<Participants>();
       lc.ConversationManager.ConversationAdded += new EventHandler<ConversationManagerEventArgs>(ConversationAjoute);
    
       ls = lc.ConversationManager.Conversations;
       if (ls.Count != 0)
       {
        lp = ls[0].Participants;
    
        if (lp.Count != 0)
        {
          ch= lp[1].Contact.GetContactInformation(ContactInformationType.FirstName).ToString();
          fc.label1.Content = ch;
        }
        else
        {
         fc.label1.Content = "c faux";
        }
        this.Close();
        fc.Show();
            
       }
       else
       {
        this.label3.Visibility = Visibility.Visible;
        this.label3.Content = " il n'y a pas de conversation actuellement";
       }
      }
      void ConversationAjoute(Object sender, ConversationManagerEventArgs e)
      {
    
       nomcaller = e.Conversation.Participants[1].Contact.GetContactInformation(ContactInformationType.DisplayName).ToString();
       
      }
    
      
     }
    

    Mohamed BEN CHAABENE
    • Marked as answer by mohamedben Wednesday, June 8, 2011 1:22 PM
    Wednesday, June 8, 2011 1:21 PM