/// <summary> /// Called when planetary pins updated. /// </summary> /// <param name="result">The result.</param> private void OnPlanetaryPinsUpdated(EsiResult <EsiAPIPlanetaryColony> result, object ignore) { m_queryPinsPending = false; // Notify if an error occured if (Character.ShouldNotifyError(result, ESIAPICharacterMethods.PlanetaryLayout)) { EveMonClient.Notifications.NotifyCharacterPlanetaryLayoutError(Character, result); } if (!result.HasError) { EveMonClient.Notifications.InvalidateCharacterAPIError(Character); Import(result.Result); EveMonClient.OnCharacterPlanetaryLayoutUpdated(Character); } }
/// <summary> /// Called when planetary information is updated. /// </summary> /// <param name="result">The result.</param> private void OnPlanetNameUpdated(EsiResult <EsiAPIPlanet> result, object ignore) { m_queryNamePending = false; // Notify if an error occured if (Character.ShouldNotifyError(result, ESIAPIGenericMethods.PlanetInfo)) { EveMonClient.Notifications.NotifyPlanetInfoError(result); } if (!result.HasError) { EveMonClient.Notifications.InvalidateAPIError(); // Gross overkill for only the planet name, but until the XMLGenerator is up // to date... PlanetName = result.Result.Name; EveMonClient.OnCharacterPlanetaryLayoutUpdated(Character); } }
/// <summary> /// Called when planetary information is updated. /// </summary> /// <param name="result">The result.</param> private void OnPlanetNameUpdated(EsiResult <EsiAPIPlanet> result, object ignore) { m_queryNamePending = false; // Notify if an error occured if (Character.ShouldNotifyError(result, ESIAPIGenericMethods.PlanetInfo)) { EveMonClient.Notifications.NotifyPlanetInfoError(result); } if (result.HasError) { return; } EveMonClient.Notifications.InvalidateAPIError(); PlanetName = result.Result.Name; // Fires the event regarding planetary pins updated EveMonClient.OnCharacterPlanetaryLayoutUpdated(Character); }
/// <summary> /// Called when planetary pins updated. /// </summary> /// <param name="result">The result.</param> private void OnPlanetaryPinsUpdated(EsiResult <EsiAPIPlanetaryColony> result, object ignore) { m_queryPinsPending = false; // Notify an error occured if (Character.ShouldNotifyError(result, ESIAPICharacterMethods.PlanetaryLayout)) { EveMonClient.Notifications.NotifyCharacterPlanetaryLayoutError(Character, result); } // Quits if there is an error if (result.HasError) { return; } // Import the data Import(result.Result); // Fires the event regarding planetary pins updated EveMonClient.OnCharacterPlanetaryLayoutUpdated(Character); }
/// <summary> /// Called when planetary links updated. /// </summary> /// <param name="result">The result.</param> private void OnPlanetaryLinksUpdated(CCPAPIResult <SerializableAPIPlanetaryLinks> result) { m_queryPinsPending = false; // Notify an error occured if (Character.ShouldNotifyError(result, CCPAPIGenericMethods.PlanetaryLinks)) { EveMonClient.Notifications.NotifyCharacterPlanetaryLinksError(Character, result); } // Quits if there is an error if (result.HasError) { return; } // Import the data Import(result.Result.Links); // Fires the event regarding planetary links updated EveMonClient.OnCharacterPlanetaryLinksUpdated(Character); }
/// <summary> /// Called when contract items downloaded. /// </summary> /// <param name="result">The result.</param> private void OnContractItemsDownloaded(CCPAPIResult <SerializableAPIContractItems> result) { m_queryPending = false; // Notify an error occured if (Character.ShouldNotifyError(result, m_apiMethod)) { EveMonClient.Notifications.NotifyContractItemsError(Character, result); } // Quits if there is an error if (result.HasError) { return; } // Re-fetch the items if for any reason a previous attempt failed if (!result.Result.ContractItems.Any()) { GetContractItems(); return; } // Import the data Import(result.Result.ContractItems); // Fires the event regarding contract items downloaded if (m_apiMethod == CCPAPIGenericMethods.ContractItems) { EveMonClient.OnCharacterContractItemsDownloaded(Character); } else { EveMonClient.OnCorporationContractItemsDownloaded(Character); } }
/// <summary> /// Called when contract items downloaded. /// </summary> /// <param name="result">The result.</param> private void OnContractItemsDownloaded(EsiResult <EsiAPIContractItems> result, object apiMethod) { var methodEnum = (apiMethod as Enum) ?? ESIAPICharacterMethods.ContractItems; // Notify an error occured if (Character.ShouldNotifyError(result, methodEnum)) { EveMonClient.Notifications.NotifyContractItemsError(Character, result); } // Quits if there is an error if (result.HasError) { return; } // Re-fetch the items if for any reason a previous attempt failed if (!result.Result.Any()) { GetContractItems(); return; } // Import the data Import(result.Result.ToXMLItem().ContractItems); // Fires the event regarding contract items downloaded if (methodEnum == (Enum)ESIAPICharacterMethods.ContractItems) { EveMonClient.OnCharacterContractItemsDownloaded(Character); } else { EveMonClient.OnCorporationContractItemsDownloaded(Character); } }