예제 #1
0
        public void Report()
        {
            var hagen       = new Hagen();
            var logDatabase = hagen.Context.GetService <ILogDatabase>();

            new Program(logDatabase).Report(Console.Out, TimeIntervalExtensions.LastDays(30));
        }
예제 #2
0
        public void ShowReport()
        {
            var p = new LPath("work-time-report.txt");

            using (var output = new StreamWriter(p))
            {
                new activityReport.Program(this.logDatabase).WorktimeReport(output, TimeIntervalExtensions.LastDays(180));
            }
            Process.Start("notepad.exe", p.ToString().Quote());
        }
예제 #3
0
        public void Captions()
        {
            using (var pu = logDatabase.OpenProgramUses())
            {
                var t        = TimeIntervalExtensions.LastDays(60);
                var programs = pu.Query(p => p.Begin > t.Begin && p.Begin < t.End)
                               .GroupBy(x => x.Caption)
                               .Select(x => new { Caption = x.Key, KeyDown = x.Sum(i => i.KeyDown) })
                               .ToList();

                var tm = CreateTreeMap(programs);
                tm.GetLineage = x => Regex.Split(x.Caption, @" \- ").Reverse();
                tm.GetSize    = x => x.KeyDown;

                tm.RunFullScreen();
            }
        }
예제 #4
0
 public void Report()
 {
     Report(Console.Out, TimeIntervalExtensions.LastDays(30));
 }