示例#1
0
        protected void AssertCurrentLogicalPeriod(bool expectedActive, TimeSpan expectedLength)
        {
            ActivityPeriod activityPeriod = statsReporter.GetCurrentLogicalPeriod();

            Assert.AreEqual(expectedActive, activityPeriod is ActivePeriod);
            Assert.AreEqual(expectedLength, activityPeriod.Length);
        }
示例#2
0
        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();
        }