closes #60 closes #63 closes #51 Exposed and tested occsensor names and raw states. Exposed and tested SetTopBox. Changed conditional formatting for SecondsCountdownTimer

This commit is contained in:
Trevor Payne
2020-03-13 16:49:47 -05:00
parent ddf2bd4c64
commit 8f52f49884
2 changed files with 489 additions and 478 deletions

View File

@@ -50,7 +50,18 @@ namespace PepperDash.Essentials.Core
if (StartTime == null || FinishTime == null) if (StartTime == null || FinishTime == null)
return ""; return "";
var timeSpan = FinishTime - DateTime.Now; var timeSpan = FinishTime - DateTime.Now;
if (timeSpan.TotalSeconds < 60)
{
return Math.Round(timeSpan.TotalSeconds).ToString(); return Math.Round(timeSpan.TotalSeconds).ToString();
}
else
{
Debug.Console(2, this, "timeSpan.Minutes == {0}, timeSpan.Seconds == {1}", timeSpan.Minutes, timeSpan.Seconds);
return String.Format("{0:D2}:{1:D2}",
timeSpan.Minutes,
timeSpan.Seconds);
}
}); });
PercentFeedback = new IntFeedback(() => PercentFeedback = new IntFeedback(() =>