Added recovery count to the history data

MatterHackers/MCCentral#914
Track the recovered count to aid diagnostics
This commit is contained in:
Lars Brubaker 2016-12-14 11:26:53 -08:00
parent c9bd9aae0c
commit 53e6ff3eba
6 changed files with 38 additions and 3 deletions

View file

@ -146,7 +146,19 @@ namespace MatterHackers.MatterControl.PrintHistory
if (printTask.PercentDone > 0)
{
timeIndicator.AutoExpandBoundsToText = true;
timeIndicator.Text += " ({0:0.0}%)".FormatWith(printTask.PercentDone);
timeIndicator.Text += $" ({printTask.PercentDone:0.0}%)";
if(printTask.RecoveryCount > 0)
{
if (printTask.RecoveryCount == 1)
{
timeIndicator.Text += " - " + "recovered once".Localize();
}
else
{
timeIndicator.Text += " - " + "recovered {0} times".FormatWith(printTask.RecoveryCount);
}
}
}
timeIndicator.Margin = new BorderDouble(right: 6);