Ejemplo n.º 1
0
        protected override ImageInfo Execute(TaskSettings taskSettings)
        {
            Rectangle rect      = CaptureHelpers.GetActiveScreenWorkingArea();
            ImageInfo imageInfo = CreateImageInfo(rect);

            imageInfo.Image = TaskHelpers.GetScreenshot(taskSettings).CaptureActiveMonitor();
            return(imageInfo);
        }
Ejemplo n.º 2
0
        protected override TaskMetadata Execute(TaskSettings taskSettings)
        {
            Rectangle    rect     = CaptureHelpers.GetActiveScreenWorkingArea();
            TaskMetadata metadata = CreateMetadata(rect);

            metadata.Image = TaskHelpers.GetScreenshot(taskSettings).CaptureActiveMonitor();
            return(metadata);
        }
Ejemplo n.º 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;
                }
            }
        }
Ejemplo n.º 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));
        }