private void MessageReceived(object sender, MessageSentEventArgs args) { try { var messageInfo = (InstantMessageModality)sender; ChatLog.Write(messageInfo, args.Text); } catch (Exception ex) { LogException("MessageReceived", ex); throw; } }
//private void ContactInformationChanged(object sender, ContactInformationChangedEventArgs args) //{ // if (args.ChangedContactInformation.Contains(ContactInformationType.Availability)) // { // ContactStatus status = LyncHelper.GetContactStatus((Contact) sender); // if (status != null) // { // Debug.WriteLine("{0} updated status: {1} {2}", status.Username, status.Availability, status.Activity); // } // } //} private void ConversationAdded(object sender, ConversationManagerEventArgs args) { try { ChatLog.Open(args.Conversation); // subscribe to event for new participants being added to this conversation args.Conversation.ParticipantAdded += ParticipantAdded; } catch (Exception ex) { LogException("ConversationAdded", ex); throw; } }