private void UpdateStats(StatsReporter reporter) { UpdateLabels( (int)reporter.GetTotalActiveToday(DateTime.Now.Date).Round(100.ms()).TotalSeconds, (int)reporter.GetLastInactiveTimespan().Round(100.ms()).TotalSeconds ); ActivityPeriod currentActivityPeriod = reporter.GetCurrentLogicalPeriod(); UpdateNotifyIcon(currentActivityPeriod is ActivePeriod, (int)currentActivityPeriod.Length.TotalMinutes); UpdateAlldayIcon(reporter.GetTotalActiveToday(DateTime.Now.Date)); UpdateHistoryWindow(); }
protected void AssertLastInactiveTimespan(TimeSpan expected) { Assert.AreEqual(expected, statsReporter.GetLastInactiveTimespan()); }