void pm_ProcessStart(object sender, ProcessMonitorEventArgs e) { switch (e.ProcessName) { case "WINWORD.EXE": if (e.Arguments != null && e.ActiveAppTitle != null) { string fname = e.ActiveAppTitle; OpenedEventArgs foe = new OpenedEventArgs(fname); if (FSMOpened != null) { FSMOpened(this, foe); } } break; case "AcroRd32.exe": if (e.Arguments != null && e.Arguments.Contains(".pdf")) { string[] args = e.Arguments.Split(new string[] { "\" \"" }, StringSplitOptions.RemoveEmptyEntries); if (args.Length == 2) { string fname = args[1]; OpenedEventArgs foea = new OpenedEventArgs(fname); if (FSMOpened != null) { FSMOpened(this, foea); } break; } } break; } }
void Monitor_Opened(object sender, OpenedEventArgs e) { le = new LogEntry(Logfile.FullName, (uint)LogEntryIDs.FileOpen, e.File, machine, user); }