コード例 #1
0
        /// <summary>
        /// Handles the CorporationIndustryJobsCompleted event of the EveMonClient control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EVEMon.Common.CustomEventArgs.IndustryJobsEventArgs"/> instance containing the event data.</param>
        private void EveMonClient_CorporationIndustryJobsCompleted(object sender, IndustryJobsEventArgs e)
        {
            if (e.Character != this)
                return;

            // Uncomment upon implementing an exclusive corporation monitor
            // Notify completed jobs issued for the corporation
            //EveMonClient.Notifications.NotifyCorporationIndustryJobCompletion(Corporation, e.CompletedJobs);
        }
コード例 #2
0
        /// <summary>
        /// Handles the CharacterIndustryJobsCompleted event of the EveMonClient control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EVEMon.Common.CustomEventArgs.IndustryJobsEventArgs"/> instance containing the event data.</param>
        private void EveMonClient_CharacterIndustryJobsCompleted(object sender, IndustryJobsEventArgs e)
        {
            if (e.Character != this)
                return;

            // Add the completed jobs to a list
            m_jobsCompletedForCharacter.AddRange(e.CompletedJobs);

            // If character has completed corporation issued jobs, we wait till we gather those too
            if (CorporationIndustryJobs.Any(job => job.ActiveJobState == ActiveJobState.Ready && !job.NotificationSend))
                return;

            // Notify completed jobs issued by the character
            EveMonClient.Notifications.NotifyCharacterIndustryJobCompletion(this, m_jobsCompletedForCharacter);

            // Now that we have send the notification clear the list
            m_jobsCompletedForCharacter.Clear();
        }