/// <summary> /// Gets or sets the implant for the given slot. /// </summary> /// <param name="slot">The slot for the implant to retrieve</param> /// <returns>The requested implant when found; null otherwise.</returns> public Implant this[ImplantSlots slot] { get { if (slot == ImplantSlots.None) { return(null); } return(m_values[(int)slot]); } set { if (slot == ImplantSlots.None) { throw new InvalidOperationException("Cannot assign 'none' slot"); } if (value != null && value.Slot != slot) { throw new InvalidOperationException("Slot mismatch"); } if (value == null) { value = Implant.None; } else { m_values[(int)slot] = value; } EveClient.OnCharacterChanged(m_owner); } }
/// <summary> /// Imports data from a serialization object /// </summary> /// <param name="serial"></param> public void Import(SerializableUriCharacter serial) { Import((SerializableSettingsCharacter)serial); m_uri = new Uri(serial.Uri); EveClient.OnCharacterChanged(this); }
/// <summary> /// Imports data from the given character sheet informations /// </summary> /// <param name="serial">The serialized character sheet</param> internal void Import(APIResult <SerializableAPICharacter> serial) { if (!serial.HasError) { Import(serial.Result); EveClient.OnCharacterChanged(this); } }
/// <summary> /// Adds a new implant set. /// </summary> /// <param name="name"></param> /// <returns></returns> public ImplantSet Add(string name) { var set = new ImplantSet(m_owner, name); m_customSets.Add(set); EveClient.OnCharacterChanged(m_owner); return(set); }
/// <summary> /// Imports data from the given character sheet informations /// </summary> /// <param name="serial">The serialized character sheet</param> internal void Import(APIResult <SerializableAPICharacterSheet> serial) { if (serial.HasError) { return; } Import(serial.Result); EveClient.OnCharacterChanged(this); }
/// <summary> /// Update when we can update the key level. /// </summary> /// <param name="result"></param> private void OnKeyLevelUpdated(APIResult <SerializableAPIAccountStatus> result) { m_lastKeyLevelUpdate = DateTime.UtcNow; m_keyLevel = GetCredentialsLevel(result); // Notify error if any if (m_keyLevel == CredentialsLevel.Unknown) { EveClient.Notifications.NotifyKeyLevelError(this, result); return; } // Notify characters changed foreach (CharacterIdentity id in CharacterIdentities) { CCPCharacter ccpCharacter = id.CCPCharacter; if (ccpCharacter != null) { EveClient.OnCharacterChanged(ccpCharacter); } } }
/// <summary> /// Imports data from a serialization object /// </summary> /// <param name="serial"></param> public void Import(SerializableCCPCharacter serial) { Import((SerializableSettingsCharacter)serial); // Training queue m_marketOrders.Import(serial.MarketOrders); m_queue.Import(serial.SkillQueue); m_queue.UpdateOnTimerTick(); // Last API updates foreach (var lastUpdate in serial.LastUpdates) { var monitor = m_monitors[lastUpdate.Method] as IQueryMonitorEx; if (monitor != null) { monitor.Reset(lastUpdate.Time); } } // Fire the global event EveClient.OnCharacterChanged(this); }
/// <summary> /// Imports data from a serialization object /// </summary> /// <param name="serial"></param> public void Import(SerializableCCPCharacter serial) { Import((SerializableSettingsCharacter)serial); // Skill queue m_queue.Import(serial.SkillQueue); m_queue.UpdateOnTimerTick(); // Market orders m_marketOrders.Import(serial.MarketOrders); // Industry jobs m_industryJobs.Import(serial.IndustryJobs); // Research points m_researchPoints.Import(serial.ResearchPoints); // EVE mail messages IDs m_eveMailMessages.Import(serial.EveMailMessagesIDs); // EVE notifications IDs m_eveNotifications.Import(serial.EveNotificationsIDs); // Last API updates foreach (var lastUpdate in serial.LastUpdates) { var monitor = m_monitors[lastUpdate.Method] as IQueryMonitorEx; if (monitor != null) { monitor.Reset(lastUpdate.Time); } } // Fire the global event EveClient.OnCharacterChanged(this); }
/// <summary> /// Removes the given set. /// </summary> /// <param name="set"></param> public void Remove(ImplantSet set) { m_customSets.Remove(set); EveClient.OnCharacterChanged(m_owner); }