Beispiel #1
0
        /// <summary>
        /// Capture a screenshot
        /// </summary>
        private async void btnScreenshot_Click(object sender, EventArgs e)
        {
            btnScreenshot.Enabled = false;
            timerUpdate.Enabled   = false;
            imgDisplay.Image      = await Task.Run(() => zeitgeber.CaptureScreenImage());

            btnScreenshot.Enabled = true;
            timerUpdate.Enabled   = true;
        }
Beispiel #2
0
        /// <summary>
        /// Capture a screenshot and save to an image file
        /// </summary>
        /// <param name="filename"></param>
        private static void Screenshot(string filename)
        {
            if (args.verbose)
            {
                Console.WriteLine("Capturing image...");
            }

            var image = zeitgeber.CaptureScreenImage();

            image.Save(filename);
            Console.WriteLine("Saved to {0}", filename);
        }