public void Report() { var hagen = new Hagen(); var logDatabase = hagen.Context.GetService <ILogDatabase>(); new Program(logDatabase).Report(Console.Out, TimeIntervalExtensions.LastDays(30)); }
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()); }
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(); } }
public void Report() { Report(Console.Out, TimeIntervalExtensions.LastDays(30)); }