Esempio n. 1
0
        private void CaptureLightRectangle(TaskSettings taskSettings = null, bool autoHideForm = true)
        {
            if (taskSettings == null)
            {
                taskSettings = TaskSettings.GetDefaultTaskSettings();
            }

            DoCapture(() =>
            {
                Image img = null;

                using (RectangleLight rectangleLight = new RectangleLight())
                {
                    if (rectangleLight.ShowDialog() == DialogResult.OK)
                    {
                        img = rectangleLight.GetAreaImage();

                        if (img != null)
                        {
                            isLightCapture = true;
                        }
                    }
                }

                return(img);
            }, CaptureType.Rectangle, taskSettings, autoHideForm);
        }