Skip to content

Commit

Permalink
Append the number of skills in the skill queue to remaining time desc…
Browse files Browse the repository at this point in the history
…ription

fix evemondevteam#25

It will append the number of skills in the skill queue to remaining time description in the Overview tab and the bottom of Character tab.
  • Loading branch information
luyi1888 committed Mar 5, 2022
1 parent 44c7ff5 commit edec5f1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
12 changes: 12 additions & 0 deletions src/EVEMon.Common/Models/SkillQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,18 @@ public double GetOneDaySkillQueueWidth(int width)
return Math.Floor(WarningThresholdTimeSpan.TotalSeconds / totalSeconds * width);
}

public string GetCountInSkillQueueDescription()
{
if (this.Count > 1)
{
return string.Format("{0} skills", this.Count);
}
else
{
return string.Format("{0} skill", this.Count);
}
}

#endregion
}
}
3 changes: 2 additions & 1 deletion src/EVEMon/CharacterMonitoring/CharacterMonitorFooter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ private void UpdateSkillQueueInfo()

// Update the remaining queue time label
DateTime queueEndTime = ccpCharacter.SkillQueue.EndTime;
lblQueueRemaining.Text = queueEndTime.ToRemainingTimeDescription(DateTimeKind.Utc);
lblQueueRemaining.Text = string.Format("{0} ({1})", queueEndTime.ToRemainingTimeDescription(DateTimeKind.Utc),
ccpCharacter.SkillQueue.GetCountInSkillQueueDescription());
}

/// <summary>
Expand Down
5 changes: 3 additions & 2 deletions src/EVEMon/Controls/OverviewItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,9 @@ private void UpdateSkillQueueTrainingTime()
// More than one entry in queue ? Display total queue remaining time
if (ccpCharacter.SkillQueue.Count > 1)
{
text = "Queue ends in " + ccpCharacter.SkillQueue.EndTime.
ToRemainingTimeShortDescription(DateTimeKind.Utc);
text = string.Format("Queue ends in {0} ({1})", ccpCharacter.SkillQueue.EndTime.
ToRemainingTimeShortDescription(DateTimeKind.Utc),
ccpCharacter.SkillQueue.GetCountInSkillQueueDescription());
}
}
// Skill queue is empty ?
Expand Down

0 comments on commit edec5f1

Please sign in to comment.