public TimedScreenshotTaker(int msInterval, Window window)
 {
     this.scrTaker = new ScreenshotTaker();
     this.msInterval = msInterval;
     this.window = window;
     this.running = false;
 }
        /* Tools stuff */
        public bool TakeActiveWindowScreenshot(bool clientOnly)
        {
            if (windowsListener != null)
            {
                Window w = new Window(windowsListener.CurrentForegroundWindowTitle);

                ScreenshotTaker st = new ScreenshotTaker();
                Bitmap screenshot = st.Take(w, clientOnly, ScreenshotTaker.Mode.PrintScreen);

                try
                {
                    screenshot.Save(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\\screenshot.png");
                }
                catch (Exception)
                {
                    return false;
                }

                return true;
            }

            return false;
        }