public static void CaptureRectangleTransparent(TaskSettings taskSettings = null, bool autoHideForm = true) { if (taskSettings == null) { taskSettings = TaskSettings.GetDefaultTaskSettings(); } DoCapture(() => { Image img = null; using (RegionCaptureTransparentForm rectangleTransparent = new RegionCaptureTransparentForm()) { if (rectangleTransparent.ShowDialog() == DialogResult.OK) { img = rectangleTransparent.GetAreaImage(TaskHelpers.GetScreenshot(taskSettings)); if (img != null) { lastRegionCaptureType = LastRegionCaptureType.Transparent; } } } return(img); }, CaptureType.Region, taskSettings, autoHideForm); }
private void ScreenshotArea() { using (RegionCaptureTransparentForm rectangleTransparent = new RegionCaptureTransparentForm()) { if (rectangleTransparent.ShowDialog() == DialogResult.OK) { Image img = rectangleTransparent.GetAreaImage(m_ScreenshotSettings); ScreenshotDone(img); } } }
protected ImageInfo ExecuteRegionCaptureTransparent(TaskSettings taskSettings) { Image img = null; using (RegionCaptureTransparentForm rectangleTransparent = new RegionCaptureTransparentForm()) { if (rectangleTransparent.ShowDialog() == DialogResult.OK) { img = rectangleTransparent.GetAreaImage(TaskHelpers.GetScreenshot(taskSettings)); if (img != null) { lastRegionCaptureType = RegionCaptureType.Transparent; } } } return(new ImageInfo(img)); }
protected TaskMetadata ExecuteRegionCaptureTransparent(TaskSettings taskSettings) { Bitmap bmp = null; using (RegionCaptureTransparentForm rectangleTransparent = new RegionCaptureTransparentForm()) { if (rectangleTransparent.ShowDialog() == DialogResult.OK) { bmp = rectangleTransparent.GetAreaImage(TaskHelpers.GetScreenshot(taskSettings)); if (bmp != null) { lastRegionCaptureType = RegionCaptureType.Transparent; } } } return(new TaskMetadata(bmp)); }
protected TaskMetadata ExecuteRegionCaptureTransparent(TaskSettings taskSettings) { bool activeMonitorMode = taskSettings.CaptureSettings.SurfaceOptions.ActiveMonitorMode; using (RegionCaptureTransparentForm rectangleTransparent = new RegionCaptureTransparentForm(activeMonitorMode)) { if (rectangleTransparent.ShowDialog() == DialogResult.OK) { Screenshot screenshot = TaskHelpers.GetScreenshot(taskSettings); Bitmap result = rectangleTransparent.GetAreaImage(screenshot); if (result != null) { lastRegionCaptureType = RegionCaptureType.Transparent; return(new TaskMetadata(result)); } } } return(null); }