From ad4de378209aaee7b2e54e5eeeac9468fd59a41a Mon Sep 17 00:00:00 2001 From: Peter Han Date: Sat, 29 Sep 2018 21:21:16 -0700 Subject: [PATCH] Display home station in tool tip on current location. Should fix #83 but consider other options that are more discoverable to other users. --- src/EVEMon.Common/Models/Character.cs | 17 +++++++++++++---- .../CharacterMonitorHeader.cs | 2 ++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/EVEMon.Common/Models/Character.cs b/src/EVEMon.Common/Models/Character.cs index 9cb3fb84c..e5abe1730 100644 --- a/src/EVEMon.Common/Models/Character.cs +++ b/src/EVEMon.Common/Models/Character.cs @@ -29,6 +29,9 @@ public abstract class Character : BaseCharacter private string m_name; private string m_label; + // Home station + private long homeStation; + // Attributes private readonly CharacterAttribute[] m_attributes = new CharacterAttribute[5]; @@ -165,7 +168,13 @@ public string Name /// /// Gets the home station identifier. /// - public long HomeStationID { get; private set; } + public Station HomeStation + { + get + { + return EveIDToStation.GetIDToStation(homeStation, this as CCPCharacter); + } + } /// /// Gets an adorned name, with (file), (url) or (cached) labels. @@ -617,7 +626,7 @@ protected void Export(SerializableSettingsCharacter serial) serial.Guid = Guid; serial.ID = Identity.CharacterID; serial.Name = m_name; - serial.HomeStationID = HomeStationID; + serial.HomeStationID = homeStation; serial.Birthday = Birthday; serial.Race = Race; serial.BloodLine = Bloodline; @@ -772,7 +781,7 @@ internal void Import(EsiAPIClones clones) // Information about clone jumping and clone moving JumpCloneLastJumpDate = clones.LastCloneJump; RemoteStationDate = clones.LastStationChange; - HomeStationID = clones.HomeLocation.LocationID; + homeStation = clones.HomeLocation.LocationID; ImplantSets.Import(clones); } @@ -899,7 +908,7 @@ private void Import(SerializableCharacterSheetBase serial) { // Bio m_name = serial.Name; - HomeStationID = serial.HomeStationID; + homeStation = serial.HomeStationID; Birthday = serial.Birthday; Race = serial.Race; Bloodline = serial.BloodLine; diff --git a/src/EVEMon/CharacterMonitoring/CharacterMonitorHeader.cs b/src/EVEMon/CharacterMonitoring/CharacterMonitorHeader.cs index d8ea23841..0be803bf7 100644 --- a/src/EVEMon/CharacterMonitoring/CharacterMonitorHeader.cs +++ b/src/EVEMon/CharacterMonitoring/CharacterMonitorHeader.cs @@ -229,6 +229,8 @@ private void UpdateInfoControls() SecurityStatusLabel.Text = $"Security Status: {m_character.SecurityStatus:N2}"; ActiveShipLabel.Text = m_character.GetActiveShipText(); LocationInfoLabel.Text = $"Located in: {m_character.GetLastKnownLocationText()}"; + ToolTip.SetToolTip(LocationInfoLabel, "Home station: " + m_character. + HomeStation?.FullLocation ?? EveMonConstants.UnknownText); string dockedInfoText = m_character.GetLastKnownDockedText(); DockedInfoLabel.Text = string.IsNullOrWhiteSpace(dockedInfoText) ? " " :