/// <summary> /// Processes the queried character's EVE mail messages. /// </summary> /// <param name="result"></param> private void OnEVEMailMessagesUpdated(EsiAPIMailMessages result) { var target = m_ccpCharacter; // Character may have been deleted since we queried if (target != null) { target.EVEMailMessages.Import(result.ToXMLItem().Messages); // Notify on new messages int newMessages = target.EVEMailMessages.NewMessages; if (newMessages != 0) { EveMonClient.Notifications.NotifyNewEVEMailMessages(target, newMessages); } } }
/// <summary> /// Processes the queried character's EVE mail messages. /// </summary> /// <param name="result"></param> private void OnEVEMailMessagesUpdated(EsiAPIMailMessages result) { var target = m_ccpCharacter; // Character may have been deleted since we queried if (target != null) { // Each time we import a new batch of EVE mail messages, // query the mailing lists so that we are always up to date QueryCharacterData <EsiAPIMailingLists>(ESIAPICharacterMethods.MailingLists, EveMonClient.Notifications.NotifyMailingListsError, (lists) => target.EVEMailingLists.Import(lists.ToXMLItem().MailingLists)); target.EVEMailMessages.Import(result.ToXMLItem().Messages); // Notify on new messages int newMessages = target.EVEMailMessages.NewMessages; if (newMessages != 0) { EveMonClient.Notifications.NotifyNewEVEMailMessages(target, newMessages); } } }