示例#1
0
        /// <summary>
        /// Base constructor.
        /// </summary>
        /// <param name="identity"></param>
        /// <param name="guid"></param>
        private CCPCharacter(CharacterIdentity identity, Guid guid)
            : base(identity, guid)
        {
            m_queue            = new SkillQueue(this);
            m_marketOrders     = new MarketOrderCollection(this);
            m_industryJobs     = new IndustryJobCollection(this);
            m_researchPoints   = new ResearchPointCollection(this);
            m_eveMailMessages  = new EveMailMessagesCollection(this);
            m_eveMailingLists  = new EveMailingListsCollection(this);
            m_eveNotifications = new EveNotificationsCollection(this);
            m_monitors         = new QueryMonitorCollection();

            // Initializes the query monitors
            m_charSheetMonitor          = new CharacterQueryMonitor <SerializableAPICharacterSheet>(this, APIMethods.CharacterSheet);
            m_charSheetMonitor.Updated += OnCharacterSheetUpdated;
            m_monitors.Add(m_charSheetMonitor);

            m_skillQueueMonitor          = new CharacterQueryMonitor <SerializableAPISkillQueue>(this, APIMethods.SkillQueue);
            m_skillQueueMonitor.Updated += OnSkillQueueUpdated;
            m_monitors.Add(m_skillQueueMonitor);

            m_charMarketOrdersMonitor          = new CharacterQueryMonitor <SerializableAPIMarketOrders>(this, APIMethods.MarketOrders);
            m_charMarketOrdersMonitor.Updated += OnCharacterMarketOrdersUpdated;
            m_monitors.Add(m_charMarketOrdersMonitor);

            m_corpMarketOrdersMonitor          = new CharacterQueryMonitor <SerializableAPIMarketOrders>(this, APIMethods.CorporationMarketOrders);
            m_corpMarketOrdersMonitor.Updated += OnCorporationMarketOrdersUpdated;
            m_monitors.Add(m_corpMarketOrdersMonitor);

            m_charIndustryJobsMonitor          = new CharacterQueryMonitor <SerializableAPIIndustryJobs>(this, APIMethods.IndustryJobs);
            m_charIndustryJobsMonitor.Updated += OnCharacterJobsUpdated;
            m_monitors.Add(m_charIndustryJobsMonitor);

            m_corpIndustryJobsMonitor          = new CharacterQueryMonitor <SerializableAPIIndustryJobs>(this, APIMethods.CorporationIndustryJobs);
            m_corpIndustryJobsMonitor.Updated += OnCorporationJobsUpdated;
            m_monitors.Add(m_corpIndustryJobsMonitor);

            m_charResearchPointsMonitor          = new CharacterQueryMonitor <SerializableAPIResearch>(this, APIMethods.ResearchPoints);
            m_charResearchPointsMonitor.Updated += OnCharacterResearchPointsUpdated;
            m_monitors.Add(m_charResearchPointsMonitor);

            m_charEVEMailMessagesMonitor          = new CharacterQueryMonitor <SerializableAPIMailMessages>(this, APIMethods.MailMessages);
            m_charEVEMailMessagesMonitor.Updated += OnCharacterEVEMailMessagesUpdated;
            m_monitors.Add(m_charEVEMailMessagesMonitor);

            m_charEVENotificationsMonitor          = new CharacterQueryMonitor <SerializableAPINotifications>(this, APIMethods.Notifications);
            m_charEVENotificationsMonitor.Updated += OnCharacterEVENotificationsUpdated;
            m_monitors.Add(m_charEVENotificationsMonitor);

            // We enable only the monitors that require a limited api key,
            // full api key required monitors will be enabled individually
            // through each character's enabled full api key feature
            foreach (var monitor in m_monitors)
            {
                monitor.Enabled = !monitor.IsFullKeyNeeded;
            }
        }
示例#2
0
        /// <summary>
        /// Base constructor
        /// </summary>
        /// <param name="identity"></param>
        /// <param name="guid"></param>
        private CCPCharacter(CharacterIdentity identity, Guid guid)
            : base(identity, guid)
        {
            m_queue        = new SkillQueue(this);
            m_marketOrders = new MarketOrderCollection(this);
            m_monitors     = new QueryMonitorCollection();

            // Initializes the query monitors
            m_charSheetMonitor          = new CharacterQueryMonitor <SerializableAPICharacter>(this, APIMethods.CharacterSheet);
            m_charSheetMonitor.Updated += new QueryCallback <SerializableAPICharacter>(OnCharacterSheetUpdated);
            m_monitors.Add(m_charSheetMonitor);

            m_skillQueueMonitor          = new CharacterQueryMonitor <SerializableSkillQueue>(this, APIMethods.SkillQueue);
            m_skillQueueMonitor.Updated += new QueryCallback <SerializableSkillQueue>(OnSkillQueueUpdated);
            m_monitors.Add(m_skillQueueMonitor);

            m_marketOrdersMonitor          = new CharacterQueryMonitor <SerializableAPIOrderList>(this, APIMethods.MarketOrders);
            m_marketOrdersMonitor.Updated += new QueryCallback <SerializableAPIOrderList>(OnMarketOrdersUpdated);
            m_monitors.Add(m_marketOrdersMonitor);
        }