コード例 #1
0
ファイル: MainForm.cs プロジェクト: jvanrhyn/Ember
 private void CaptureArea()
 {
     var screenshot = ScreenshotProvider.TakeScreenshot(SystemInformation.VirtualScreen);
     var dialog = new SelectAreaDialog(screenshot);
     if (dialog.ShowDialog() == DialogResult.OK)
     {
         Bitmap croppedScreenshot = screenshot.Clone(
             dialog.SelectedArea,
             screenshot.PixelFormat);
         ProcessScreenshot(croppedScreenshot);
     }
     dialog.Dispose();
 }
コード例 #2
0
        private void CaptureArea()
        {
            var screenshot = ScreenshotProvider.TakeScreenshot(SystemInformation.VirtualScreen);
            var dialog     = new SelectAreaDialog(screenshot);

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                Bitmap croppedScreenshot = screenshot.Clone(
                    dialog.SelectedArea,
                    screenshot.PixelFormat);
                ProcessScreenshot(croppedScreenshot);
            }
            dialog.Dispose();
        }