Example #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);
        }
Example #2
0
        private void CaptureLightRectangle(TaskSettings taskSettings, bool autoHideForm = true)
        {
            DoCapture(() =>
            {
                Image img = null;

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

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