Пример #1
0
        protected override ImageInfo Execute(TaskSettings taskSettings)
        {
            Rectangle rect      = CaptureHelpers.GetActiveScreenWorkingArea();
            ImageInfo imageInfo = CreateImageInfo(rect);

            imageInfo.Image = TaskHelpers.GetScreenshot(taskSettings).CaptureActiveMonitor();
            return(imageInfo);
        }
Пример #2
0
        protected override TaskMetadata Execute(TaskSettings taskSettings)
        {
            Rectangle    rect     = CaptureHelpers.GetActiveScreenWorkingArea();
            TaskMetadata metadata = CreateMetadata(rect);

            metadata.Image = TaskHelpers.GetScreenshot(taskSettings).CaptureActiveMonitor();
            return(metadata);
        }
Пример #3
0
        private void UpdatePosition()
        {
            Rectangle rectScreen = CaptureHelpers.GetScreenWorkingArea();

            if (!Program.Settings.SimpleActionsFormPosition.IsEmpty && rectScreen.Contains(Program.Settings.SimpleActionsFormPosition))
            {
                Location = Program.Settings.SimpleActionsFormPosition;
            }
            else
            {
                Rectangle rectActiveScreen = CaptureHelpers.GetActiveScreenWorkingArea();

                if (Width < rectActiveScreen.Width)
                {
                    Location = new Point(rectActiveScreen.X + rectActiveScreen.Width - Width, rectActiveScreen.Y + rectActiveScreen.Height - Height);
                }
                else
                {
                    Location = rectActiveScreen.Location;
                }
            }
        }
Пример #4
0
        private void CenterForm()
        {
            Rectangle rectScreen = CaptureHelpers.GetActiveScreenWorkingArea();

            Location = new Point(rectScreen.X + (rectScreen.Width / 2) - (ImageSize.Width / 2), rectScreen.Y + (rectScreen.Height / 2) - (ImageSize.Height / 2));
        }