public void Stop() { if (Watcher != null) { Watcher.Stop(); Watcher.Dispose(); Watcher = null; } }
public bool Start() { Stop(); Watcher = new ScreenshotDirectoryWatcher(discoveryform, CallWithConverter); // pass function to get the convert going Watcher.OnScreenshot += ConvertCompleted; // and function for it to call when its over.. return(Watcher.Start(ScreenshotsDir, InputFileExtension.ToString())); // you can restart a watcher without stopping it.. }