Пример #1
0
        /// <summary>
        /// Processes the queried EVE notification text.
        /// </summary>
        /// <param name="result">The result.</param>
        private void OnEVENotificationTextDownloaded(APIResult <SerializableAPINotificationTexts> result)
        {
            m_queryPending = false;

            // Notify an error occured
            if (m_ccpCharacter.ShouldNotifyError(result, APIMethods.NotificationTexts))
            {
                EveClient.Notifications.NotifyEVENotificationTextsError(m_ccpCharacter, result);
            }

            // Quits if there is an error
            if (result.HasError)
            {
                return;
            }

            // If there is an error response on missing IDs inform the user
            if (!String.IsNullOrEmpty(result.Result.MissingMessageIDs))
            {
                result.Result.Texts.Add(
                    new SerializableNotificationTextsListItem
                {
                    NotificationID   = long.Parse(result.Result.MissingMessageIDs),
                    NotificationText = "The text for this notification was reported missing."
                });
            }

            // Quit if for any reason there is no text
            if (result.Result.Texts.Count == 0)
            {
                return;
            }

            // Import the data
            EVENotificationText = new EveNotificationText(result.Result.Texts[0]);

            EveClient.OnCharacterEVENotificationTextDownloaded(m_ccpCharacter);
        }