예제 #1
0
 private void CaptureLastRegion(TaskSettings taskSettings, bool autoHideForm = true)
 {
     if (!taskSettings.AdvancedSettings.UseLightRectangleCrop && Surface.LastRegionFillPath != null)
     {
         DoCapture(() =>
         {
             using (Image screenshot = Screenshot.CaptureFullscreen())
             {
                 return(ShapeCaptureHelpers.GetRegionImage(screenshot, Surface.LastRegionFillPath, Surface.LastRegionDrawPath, taskSettings.CaptureSettings.SurfaceOptions));
             }
         }, CaptureType.LastRegion, taskSettings, autoHideForm);
     }
     else if (taskSettings.AdvancedSettings.UseLightRectangleCrop && !RectangleLight.LastSelectionRectangle0Based.IsEmpty)
     {
         DoCapture(() =>
         {
             using (Image screenshot = Screenshot.CaptureFullscreen())
             {
                 return(ImageHelpers.CropImage(screenshot, RectangleLight.LastSelectionRectangle0Based));
             }
         }, CaptureType.LastRegion, taskSettings, autoHideForm);
     }
     else
     {
         CaptureRegion(CaptureType.Rectangle, taskSettings, autoHideForm);
     }
 }
예제 #2
0
 private void CaptureLastRegion(TaskSettings taskSettings, bool autoHideForm = true)
 {
     if (Surface.LastRegionFillPath != null)
     {
         DoCapture(() =>
         {
             using (Image screenshot = Screenshot.CaptureFullscreen())
             {
                 return(ShapeCaptureHelpers.GetRegionImage(screenshot, Surface.LastRegionFillPath, Surface.LastRegionDrawPath, taskSettings.CaptureSettings.SurfaceOptions));
             }
         }, CaptureType.LastRegion, taskSettings, autoHideForm);
     }
     else
     {
         CaptureRegion(CaptureType.Rectangle, taskSettings, autoHideForm);
     }
 }