Skip to content

Commit

Permalink
Display home station in tool tip on current location. Should fix evem…
Browse files Browse the repository at this point in the history
…ondevteam#83 but consider other options that are more discoverable to other users.
  • Loading branch information
peterhaneve committed Sep 30, 2018
1 parent a46b476 commit ad4de37
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/EVEMon.Common/Models/Character.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down Expand Up @@ -165,7 +168,13 @@ public string Name
/// <summary>
/// Gets the home station identifier.
/// </summary>
public long HomeStationID { get; private set; }
public Station HomeStation
{
get
{
return EveIDToStation.GetIDToStation(homeStation, this as CCPCharacter);
}
}

/// <summary>
/// Gets an adorned name, with (file), (url) or (cached) labels.
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions src/EVEMon/CharacterMonitoring/CharacterMonitorHeader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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) ? " " :
Expand Down

0 comments on commit ad4de37

Please sign in to comment.