Exemple #1
0
        /// <summary>
        /// Handles the CharacterContractsUpdated event of the EveMonClient control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EVEMon.Common.CustomEventArgs.ContractsEventArgs"/> instance containing the event data.</param>
        private void EveMonClient_CharacterContractsUpdated(object sender, ContractsEventArgs e)
        {
            if (e.Character == this)
            {
                m_endedContractsForCharacter.AddRange(e.EndedContracts.Where(
                                                          charEndedContract => m_endedContractsForCorporation.All(
                                                              corpEndedContract => corpEndedContract.ID != charEndedContract.ID)));

                if (m_corporationDataQuerying?.CorporationContractsQueried ?? true)
                {
                    NotifyForContractsRelatedEvents();
                }
            }
        }
Exemple #2
0
        /// <summary>
        /// Handles the CharacterContractsUpdated event of the EveMonClient control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EVEMon.Common.CustomEventArgs.ContractsEventArgs"/> instance containing the event data.</param>
        private void EveMonClient_CharacterContractsUpdated(object sender, ContractsEventArgs e)
        {
            if (e.Character != this)
            {
                return;
            }

            m_endedContractsForCharacter.AddRange(e.EndedContracts.Where(
                                                      charEndedContract => m_endedContractsForCorporation.All(
                                                          corpEndedContract => corpEndedContract.ID != charEndedContract.ID)));

            if (m_corporationDataQuerying != null && !m_corporationDataQuerying.CorporationContractsQueried)
            {
                return;
            }

            NotifyForContractsRelatedEvents();
        }